mirror of
https://github.com/actions/github-script.git
synced 2026-12-05 02:42:49 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9ac08808f9 | ||
|
|
53cdbb4a1b | ||
|
|
6b8d8aaad4 | ||
|
|
6689be4f99 | ||
|
|
5541733ecf | ||
|
|
cd8eebf4a5 | ||
|
|
72fadf4ee8 | ||
|
|
d526c0463a | ||
|
|
2c946f132f | ||
|
|
41e1ab4f53 | ||
|
|
d2ed94b14f | ||
|
|
e3cbab99d3 | ||
|
|
115b09eedf | ||
|
|
df46368761 | ||
|
|
faea5b2adf | ||
|
|
382585067c | ||
|
|
7b791155c1 | ||
|
|
f6f802415c | ||
|
|
0c6f007687 | ||
|
|
b3a068aede | ||
|
|
00e1b58cd9 | ||
|
|
c08c323075 | ||
|
|
9bb3853081 | ||
|
|
415189ab4b |
No files matched your search
@@ -14,11 +14,11 @@ jobs:
|
|||||||
name: Check licenses
|
name: Check licenses
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0 # prefer to use a full fetch for licensed workflows
|
||||||
|
# https://github.com/jonabc/setup-licensed/releases/tag/v1.1.1
|
||||||
|
- uses: jonabc/setup-licensed@82c5f4d19e8968efa74a25b132922382c2671fe2
|
||||||
|
with:
|
||||||
|
version: '3.x'
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
- name: Install licensed
|
|
||||||
run: |
|
|
||||||
cd $RUNNER_TEMP
|
|
||||||
curl -Lfs -o licensed.tar.gz https://github.com/github/licensed/releases/download/2.12.2/licensed-2.12.2-linux-x64.tar.gz
|
|
||||||
sudo tar -xzf licensed.tar.gz
|
|
||||||
sudo mv licensed /usr/local/bin/licensed
|
|
||||||
- run: licensed status
|
- run: licensed status
|
||||||
Executable
+4
@@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
. "$(dirname "$0")/_/husky.sh"
|
||||||
|
|
||||||
|
npm run pre-commit && git add dist/
|
||||||
Generated
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
name: "@actions/core"
|
name: "@actions/core"
|
||||||
version: 1.5.0
|
version: 1.6.0
|
||||||
type: npm
|
type: npm
|
||||||
summary: Actions core lib
|
summary: Actions core lib
|
||||||
homepage: https://github.com/actions/toolkit/tree/main/packages/core
|
homepage: https://github.com/actions/toolkit/tree/main/packages/core
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@ name: "@octokit/auth-token"
|
|||||||
version: 2.5.0
|
version: 2.5.0
|
||||||
type: npm
|
type: npm
|
||||||
summary: GitHub API token authentication for browsers and Node.js
|
summary: GitHub API token authentication for browsers and Node.js
|
||||||
homepage:
|
homepage: https://github.com/octokit/auth-token.js#readme
|
||||||
license: mit
|
license: mit
|
||||||
licenses:
|
licenses:
|
||||||
- sources: LICENSE
|
- sources: LICENSE
|
||||||
|
|||||||
Generated
+1
-1
@@ -3,7 +3,7 @@ name: "@octokit/endpoint"
|
|||||||
version: 6.0.12
|
version: 6.0.12
|
||||||
type: npm
|
type: npm
|
||||||
summary: Turns REST API endpoints into generic request options
|
summary: Turns REST API endpoints into generic request options
|
||||||
homepage:
|
homepage: https://github.com/octokit/endpoint.js#readme
|
||||||
license: mit
|
license: mit
|
||||||
licenses:
|
licenses:
|
||||||
- sources: LICENSE
|
- sources: LICENSE
|
||||||
|
|||||||
Generated
+1
-1
@@ -3,7 +3,7 @@ name: "@octokit/graphql"
|
|||||||
version: 4.8.0
|
version: 4.8.0
|
||||||
type: npm
|
type: npm
|
||||||
summary: GitHub GraphQL API client for browsers and Node
|
summary: GitHub GraphQL API client for browsers and Node
|
||||||
homepage:
|
homepage: https://github.com/octokit/graphql.js#readme
|
||||||
license: mit
|
license: mit
|
||||||
licenses:
|
licenses:
|
||||||
- sources: LICENSE
|
- sources: LICENSE
|
||||||
|
|||||||
+2
-2
@@ -1,9 +1,9 @@
|
|||||||
---
|
---
|
||||||
name: "@octokit/openapi-types"
|
name: "@octokit/openapi-types"
|
||||||
version: 10.5.0
|
version: 11.2.0
|
||||||
type: npm
|
type: npm
|
||||||
summary: Generated TypeScript definitions based on GitHub's OpenAPI spec for api.github.com
|
summary: Generated TypeScript definitions based on GitHub's OpenAPI spec for api.github.com
|
||||||
homepage:
|
homepage: https://github.com/octokit/openapi-types.ts#readme
|
||||||
license: mit
|
license: mit
|
||||||
licenses:
|
licenses:
|
||||||
- sources: LICENSE
|
- sources: LICENSE
|
||||||
|
|||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
---
|
---
|
||||||
name: "@octokit/plugin-paginate-rest"
|
name: "@octokit/plugin-paginate-rest"
|
||||||
version: 2.16.4
|
version: 2.17.0
|
||||||
type: npm
|
type: npm
|
||||||
summary: Octokit plugin to paginate REST API endpoint responses
|
summary:
|
||||||
homepage:
|
homepage:
|
||||||
license: mit
|
license: mit
|
||||||
licenses:
|
licenses:
|
||||||
|
|||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
---
|
---
|
||||||
name: "@octokit/plugin-rest-endpoint-methods"
|
name: "@octokit/plugin-rest-endpoint-methods"
|
||||||
version: 5.11.1
|
version: 5.13.0
|
||||||
type: npm
|
type: npm
|
||||||
summary: Octokit plugin adding one method for all of api.github.com REST API endpoints
|
summary:
|
||||||
homepage:
|
homepage:
|
||||||
license: mit
|
license: mit
|
||||||
licenses:
|
licenses:
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@ name: "@octokit/request-error"
|
|||||||
version: 2.1.0
|
version: 2.1.0
|
||||||
type: npm
|
type: npm
|
||||||
summary: Error class for Octokit request errors
|
summary: Error class for Octokit request errors
|
||||||
homepage:
|
homepage: https://github.com/octokit/request-error.js#readme
|
||||||
license: mit
|
license: mit
|
||||||
licenses:
|
licenses:
|
||||||
- sources: LICENSE
|
- sources: LICENSE
|
||||||
|
|||||||
Generated
+1
-1
@@ -4,7 +4,7 @@ version: 5.6.1
|
|||||||
type: npm
|
type: npm
|
||||||
summary: "Send parameterized requests to GitHubâ\x80\x99s APIs with sensible defaults
|
summary: "Send parameterized requests to GitHubâ\x80\x99s APIs with sensible defaults
|
||||||
in browsers and Node"
|
in browsers and Node"
|
||||||
homepage:
|
homepage: https://github.com/octokit/request.js#readme
|
||||||
license: mit
|
license: mit
|
||||||
licenses:
|
licenses:
|
||||||
- sources: LICENSE
|
- sources: LICENSE
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,9 +1,9 @@
|
|||||||
---
|
---
|
||||||
name: "@octokit/types"
|
name: "@octokit/types"
|
||||||
version: 6.31.0
|
version: 6.34.0
|
||||||
type: npm
|
type: npm
|
||||||
summary: Shared TypeScript definitions for Octokit projects
|
summary: Shared TypeScript definitions for Octokit projects
|
||||||
homepage:
|
homepage: https://github.com/octokit/types.ts#readme
|
||||||
license: mit
|
license: mit
|
||||||
licenses:
|
licenses:
|
||||||
- sources: LICENSE
|
- sources: LICENSE
|
||||||
|
|||||||
Generated
+1
-1
@@ -3,7 +3,7 @@ name: before-after-hook
|
|||||||
version: 2.2.2
|
version: 2.2.2
|
||||||
type: npm
|
type: npm
|
||||||
summary: asynchronous before/error/after hooks for internal functionality
|
summary: asynchronous before/error/after hooks for internal functionality
|
||||||
homepage:
|
homepage: https://github.com/gr2m/before-after-hook#readme
|
||||||
license: apache-2.0
|
license: apache-2.0
|
||||||
licenses:
|
licenses:
|
||||||
- sources: LICENSE
|
- sources: LICENSE
|
||||||
|
|||||||
Generated
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
name: node-fetch
|
name: node-fetch
|
||||||
version: 2.6.5
|
version: 2.6.7
|
||||||
type: npm
|
type: npm
|
||||||
summary: A light-weight module that brings window.fetch to node.js
|
summary: A light-weight module that brings window.fetch to node.js
|
||||||
homepage: https://github.com/bitinn/node-fetch
|
homepage: https://github.com/bitinn/node-fetch
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ version: 6.0.0
|
|||||||
type: npm
|
type: npm
|
||||||
summary: Get a user agent string in both browser and node
|
summary: Get a user agent string in both browser and node
|
||||||
homepage: https://github.com/gr2m/universal-user-agent#readme
|
homepage: https://github.com/gr2m/universal-user-agent#readme
|
||||||
license: other
|
license: isc
|
||||||
licenses:
|
licenses:
|
||||||
- sources: LICENSE.md
|
- sources: LICENSE.md
|
||||||
text: |
|
text: |
|
||||||
|
|||||||
Generated
+1
-1
@@ -3,7 +3,7 @@ name: webidl-conversions
|
|||||||
version: 3.0.1
|
version: 3.0.1
|
||||||
type: npm
|
type: npm
|
||||||
summary: Implements the WebIDL algorithms for converting to and from JavaScript values
|
summary: Implements the WebIDL algorithms for converting to and from JavaScript values
|
||||||
homepage:
|
homepage: https://github.com/jsdom/webidl-conversions#readme
|
||||||
license: bsd-2-clause
|
license: bsd-2-clause
|
||||||
licenses:
|
licenses:
|
||||||
- sources: LICENSE.md
|
- sources: LICENSE.md
|
||||||
|
|||||||
Generated
+1
-1
@@ -3,7 +3,7 @@ name: whatwg-url
|
|||||||
version: 5.0.0
|
version: 5.0.0
|
||||||
type: npm
|
type: npm
|
||||||
summary: An implementation of the WHATWG URL Standard's URL API and parsing machinery
|
summary: An implementation of the WHATWG URL Standard's URL API and parsing machinery
|
||||||
homepage:
|
homepage: https://github.com/jsdom/whatwg-url#readme
|
||||||
license: mit
|
license: mit
|
||||||
licenses:
|
licenses:
|
||||||
- sources: LICENSE.txt
|
- sources: LICENSE.txt
|
||||||
|
|||||||
@@ -27,12 +27,20 @@ arguments will be provided:
|
|||||||
our wrapping applied.
|
our wrapping applied.
|
||||||
|
|
||||||
Since the `script` is just a function body, these values will already be
|
Since the `script` is just a function body, these values will already be
|
||||||
defined, so you don't have to (see examples below).
|
defined, so you don't have to import them (see examples below).
|
||||||
|
|
||||||
See [octokit/rest.js](https://octokit.github.io/rest.js/) for the API client
|
See [octokit/rest.js](https://octokit.github.io/rest.js/) for the API client
|
||||||
documentation.
|
documentation.
|
||||||
|
|
||||||
## Breaking changes in V5
|
## Breaking Changes
|
||||||
|
|
||||||
|
### Breaking changes in V6
|
||||||
|
|
||||||
|
Version 6 of this action updated the runtime to Node 16 - https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#example-using-nodejs-v16
|
||||||
|
|
||||||
|
All scripts are now run with Node 16 instead of Node 12 and are affected by any breaking changes between Node 12 and 16.
|
||||||
|
|
||||||
|
### Breaking changes in V5
|
||||||
|
|
||||||
Version 5 of this action includes the version 5 of `@actions/github` and `@octokit/plugin-rest-endpoint-methods`. As part of this update, the Octokit context available via `github` no longer has REST methods directly. These methods are available via `github.rest.*` - https://github.com/octokit/plugin-rest-endpoint-methods.js/releases/tag/v5.0.0
|
Version 5 of this action includes the version 5 of `@actions/github` and `@octokit/plugin-rest-endpoint-methods`. As part of this update, the Octokit context available via `github` no longer has REST methods directly. These methods are available via `github.rest.*` - https://github.com/octokit/plugin-rest-endpoint-methods.js/releases/tag/v5.0.0
|
||||||
|
|
||||||
@@ -50,7 +58,7 @@ The return value of the script will be in the step's outputs under the
|
|||||||
"result" key.
|
"result" key.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: actions/github-script@v5
|
- uses: actions/github-script@v6
|
||||||
id: set-result
|
id: set-result
|
||||||
with:
|
with:
|
||||||
script: return "Hello!"
|
script: return "Hello!"
|
||||||
@@ -69,7 +77,7 @@ output of a github-script step. For some workflows, string encoding is preferred
|
|||||||
`result-encoding` input:
|
`result-encoding` input:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: actions/github-script@v5
|
- uses: actions/github-script@v6
|
||||||
id: my-script
|
id: my-script
|
||||||
with:
|
with:
|
||||||
result-encoding: string
|
result-encoding: string
|
||||||
@@ -87,7 +95,7 @@ By default, github-script will use the token provided to your workflow.
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: View context attributes
|
- name: View context attributes
|
||||||
uses: actions/github-script@v5
|
uses: actions/github-script@v6
|
||||||
with:
|
with:
|
||||||
script: console.log(context)
|
script: console.log(context)
|
||||||
```
|
```
|
||||||
@@ -103,7 +111,7 @@ jobs:
|
|||||||
comment:
|
comment:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/github-script@v5
|
- uses: actions/github-script@v6
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
github.rest.issues.createComment({
|
github.rest.issues.createComment({
|
||||||
@@ -125,7 +133,7 @@ jobs:
|
|||||||
apply-label:
|
apply-label:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/github-script@v5
|
- uses: actions/github-script@v6
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
github.rest.issues.addLabels({
|
github.rest.issues.addLabels({
|
||||||
@@ -145,7 +153,7 @@ jobs:
|
|||||||
welcome:
|
welcome:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/github-script@v5
|
- uses: actions/github-script@v6
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
// Get a list of all issues created by the PR opener
|
// Get a list of all issues created by the PR opener
|
||||||
@@ -188,7 +196,7 @@ jobs:
|
|||||||
diff:
|
diff:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/github-script@v5
|
- uses: actions/github-script@v6
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
const diff_url = context.payload.pull_request.diff_url
|
const diff_url = context.payload.pull_request.diff_url
|
||||||
@@ -212,7 +220,7 @@ jobs:
|
|||||||
list-issues:
|
list-issues:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/github-script@v5
|
- uses: actions/github-script@v6
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
const query = `query($owner:String!, $name:String!, $label:String!) {
|
const query = `query($owner:String!, $name:String!, $label:String!) {
|
||||||
@@ -246,7 +254,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions/github-script@v5
|
- uses: actions/github-script@v6
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
const script = require('./path/to/script.js')
|
const script = require('./path/to/script.js')
|
||||||
@@ -284,7 +292,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions/github-script@v5
|
- uses: actions/github-script@v6
|
||||||
env:
|
env:
|
||||||
SHA: '${{env.parentSHA}}'
|
SHA: '${{env.parentSHA}}'
|
||||||
with:
|
with:
|
||||||
@@ -298,7 +306,7 @@ And then export an async function from your module:
|
|||||||
```javascript
|
```javascript
|
||||||
module.exports = async ({github, context, core}) => {
|
module.exports = async ({github, context, core}) => {
|
||||||
const {SHA} = process.env
|
const {SHA} = process.env
|
||||||
const commit = await github.repos.getCommit({
|
const commit = await github.rest.repos.getCommit({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
ref: `${SHA}`
|
ref: `${SHA}`
|
||||||
@@ -328,7 +336,7 @@ jobs:
|
|||||||
- run: npm ci
|
- run: npm ci
|
||||||
# or one-off:
|
# or one-off:
|
||||||
- run: npm install execa
|
- run: npm install execa
|
||||||
- uses: actions/github-script@v5
|
- uses: actions/github-script@v6
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
const execa = require('execa')
|
const execa = require('execa')
|
||||||
@@ -338,6 +346,31 @@ jobs:
|
|||||||
console.log(stdout)
|
console.log(stdout)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Use ESM `import`
|
||||||
|
|
||||||
|
To import an ESM file, you'll need to reference your script by an absolute path and ensure you have a `package.json` file with `"type": "module"` specified.
|
||||||
|
|
||||||
|
For a script in your repository `src/print-stuff.js`:
|
||||||
|
```js
|
||||||
|
export default function printStuff() { console.log('stuff') }
|
||||||
|
```
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
on: push
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
print-stuff:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/github-script@v6
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
const { default: printStuff } = await import('${{ github.workspace }}/src/print-stuff.js')
|
||||||
|
|
||||||
|
await printStuff()
|
||||||
|
```
|
||||||
|
|
||||||
### Use env as input
|
### Use env as input
|
||||||
|
|
||||||
You can set env vars to use them in your script:
|
You can set env vars to use them in your script:
|
||||||
@@ -349,7 +382,7 @@ jobs:
|
|||||||
echo-input:
|
echo-input:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/github-script@v5
|
- uses: actions/github-script@v6
|
||||||
env:
|
env:
|
||||||
FIRST_NAME: Mona
|
FIRST_NAME: Mona
|
||||||
LAST_NAME: Octocat
|
LAST_NAME: Octocat
|
||||||
@@ -377,7 +410,7 @@ jobs:
|
|||||||
apply-label:
|
apply-label:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/github-script@v5
|
- uses: actions/github-script@v6
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.MY_PAT }}
|
github-token: ${{ secrets.MY_PAT }}
|
||||||
script: |
|
script: |
|
||||||
|
|||||||
+1
-1
@@ -27,5 +27,5 @@ outputs:
|
|||||||
result:
|
result:
|
||||||
description: The return value of the script, stringified with `JSON.stringify`
|
description: The return value of the script, stringified with `JSON.stringify`
|
||||||
runs:
|
runs:
|
||||||
using: node12
|
using: node16
|
||||||
main: dist/index.js
|
main: dist/index.js
|
||||||
Vendored
+347
-399
@@ -1585,6 +1585,90 @@ module.exports.parseURL = function (input, options) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 41:
|
||||||
|
/***/ (function(__unusedmodule, exports, __webpack_require__) {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||||
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||||
|
return new (P || (P = Promise))(function (resolve, reject) {
|
||||||
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||||
|
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||||
|
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||||
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||||
|
});
|
||||||
|
};
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.OidcClient = void 0;
|
||||||
|
const http_client_1 = __webpack_require__(925);
|
||||||
|
const auth_1 = __webpack_require__(702);
|
||||||
|
const core_1 = __webpack_require__(186);
|
||||||
|
class OidcClient {
|
||||||
|
static createHttpClient(allowRetry = true, maxRetry = 10) {
|
||||||
|
const requestOptions = {
|
||||||
|
allowRetries: allowRetry,
|
||||||
|
maxRetries: maxRetry
|
||||||
|
};
|
||||||
|
return new http_client_1.HttpClient('actions/oidc-client', [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions);
|
||||||
|
}
|
||||||
|
static getRequestToken() {
|
||||||
|
const token = process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN'];
|
||||||
|
if (!token) {
|
||||||
|
throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable');
|
||||||
|
}
|
||||||
|
return token;
|
||||||
|
}
|
||||||
|
static getIDTokenUrl() {
|
||||||
|
const runtimeUrl = process.env['ACTIONS_ID_TOKEN_REQUEST_URL'];
|
||||||
|
if (!runtimeUrl) {
|
||||||
|
throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable');
|
||||||
|
}
|
||||||
|
return runtimeUrl;
|
||||||
|
}
|
||||||
|
static getCall(id_token_url) {
|
||||||
|
var _a;
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
const httpclient = OidcClient.createHttpClient();
|
||||||
|
const res = yield httpclient
|
||||||
|
.getJson(id_token_url)
|
||||||
|
.catch(error => {
|
||||||
|
throw new Error(`Failed to get ID Token. \n
|
||||||
|
Error Code : ${error.statusCode}\n
|
||||||
|
Error Message: ${error.result.message}`);
|
||||||
|
});
|
||||||
|
const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value;
|
||||||
|
if (!id_token) {
|
||||||
|
throw new Error('Response json body do not have ID Token field');
|
||||||
|
}
|
||||||
|
return id_token;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
static getIDToken(audience) {
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
try {
|
||||||
|
// New ID Token is requested from action service
|
||||||
|
let id_token_url = OidcClient.getIDTokenUrl();
|
||||||
|
if (audience) {
|
||||||
|
const encodedAudience = encodeURIComponent(audience);
|
||||||
|
id_token_url = `${id_token_url}&audience=${encodedAudience}`;
|
||||||
|
}
|
||||||
|
core_1.debug(`ID token url is ${id_token_url}`);
|
||||||
|
const id_token = yield OidcClient.getCall(id_token_url);
|
||||||
|
core_1.setSecret(id_token);
|
||||||
|
return id_token;
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
throw new Error(`Error message: ${error.message}`);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
exports.OidcClient = OidcClient;
|
||||||
|
//# sourceMappingURL=oidc-utils.js.map
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 44:
|
/***/ 44:
|
||||||
@@ -1673,6 +1757,7 @@ const Endpoints = {
|
|||||||
disableWorkflow: ["PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable"],
|
disableWorkflow: ["PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable"],
|
||||||
downloadArtifact: ["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}"],
|
downloadArtifact: ["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}"],
|
||||||
downloadJobLogsForWorkflowRun: ["GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs"],
|
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"],
|
downloadWorkflowRunLogs: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs"],
|
||||||
enableSelectedRepositoryGithubActionsOrganization: ["PUT /orgs/{org}/actions/permissions/repositories/{repository_id}"],
|
enableSelectedRepositoryGithubActionsOrganization: ["PUT /orgs/{org}/actions/permissions/repositories/{repository_id}"],
|
||||||
enableWorkflow: ["PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable"],
|
enableWorkflow: ["PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable"],
|
||||||
@@ -1697,11 +1782,13 @@ const Endpoints = {
|
|||||||
getSelfHostedRunnerForRepo: ["GET /repos/{owner}/{repo}/actions/runners/{runner_id}"],
|
getSelfHostedRunnerForRepo: ["GET /repos/{owner}/{repo}/actions/runners/{runner_id}"],
|
||||||
getWorkflow: ["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}"],
|
getWorkflow: ["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}"],
|
||||||
getWorkflowRun: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}"],
|
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"],
|
getWorkflowRunUsage: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing"],
|
||||||
getWorkflowUsage: ["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing"],
|
getWorkflowUsage: ["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing"],
|
||||||
listArtifactsForRepo: ["GET /repos/{owner}/{repo}/actions/artifacts"],
|
listArtifactsForRepo: ["GET /repos/{owner}/{repo}/actions/artifacts"],
|
||||||
listEnvironmentSecrets: ["GET /repositories/{repository_id}/environments/{environment_name}/secrets"],
|
listEnvironmentSecrets: ["GET /repositories/{repository_id}/environments/{environment_name}/secrets"],
|
||||||
listJobsForWorkflowRun: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs"],
|
listJobsForWorkflowRun: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs"],
|
||||||
|
listJobsForWorkflowRunAttempt: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs"],
|
||||||
listOrgSecrets: ["GET /orgs/{org}/actions/secrets"],
|
listOrgSecrets: ["GET /orgs/{org}/actions/secrets"],
|
||||||
listRepoSecrets: ["GET /repos/{owner}/{repo}/actions/secrets"],
|
listRepoSecrets: ["GET /repos/{owner}/{repo}/actions/secrets"],
|
||||||
listRepoWorkflows: ["GET /repos/{owner}/{repo}/actions/workflows"],
|
listRepoWorkflows: ["GET /repos/{owner}/{repo}/actions/workflows"],
|
||||||
@@ -1715,7 +1802,6 @@ const Endpoints = {
|
|||||||
listWorkflowRuns: ["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs"],
|
listWorkflowRuns: ["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs"],
|
||||||
listWorkflowRunsForRepo: ["GET /repos/{owner}/{repo}/actions/runs"],
|
listWorkflowRunsForRepo: ["GET /repos/{owner}/{repo}/actions/runs"],
|
||||||
removeSelectedRepoFromOrgSecret: ["DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}"],
|
removeSelectedRepoFromOrgSecret: ["DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}"],
|
||||||
retryWorkflow: ["POST /repos/{owner}/{repo}/actions/runs/{run_id}/retry"],
|
|
||||||
reviewPendingDeploymentsForRun: ["POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments"],
|
reviewPendingDeploymentsForRun: ["POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments"],
|
||||||
setAllowedActionsOrganization: ["PUT /orgs/{org}/actions/permissions/selected-actions"],
|
setAllowedActionsOrganization: ["PUT /orgs/{org}/actions/permissions/selected-actions"],
|
||||||
setAllowedActionsRepository: ["PUT /repos/{owner}/{repo}/actions/permissions/selected-actions"],
|
setAllowedActionsRepository: ["PUT /repos/{owner}/{repo}/actions/permissions/selected-actions"],
|
||||||
@@ -1758,7 +1844,10 @@ const Endpoints = {
|
|||||||
unstarRepoForAuthenticatedUser: ["DELETE /user/starred/{owner}/{repo}"]
|
unstarRepoForAuthenticatedUser: ["DELETE /user/starred/{owner}/{repo}"]
|
||||||
},
|
},
|
||||||
apps: {
|
apps: {
|
||||||
addRepoToInstallation: ["PUT /user/installations/{installation_id}/repositories/{repository_id}"],
|
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"],
|
checkToken: ["POST /applications/{client_id}/token"],
|
||||||
createContentAttachment: ["POST /content_references/{content_reference_id}/attachments", {
|
createContentAttachment: ["POST /content_references/{content_reference_id}/attachments", {
|
||||||
mediaType: {
|
mediaType: {
|
||||||
@@ -1797,7 +1886,10 @@ const Endpoints = {
|
|||||||
listSubscriptionsForAuthenticatedUserStubbed: ["GET /user/marketplace_purchases/stubbed"],
|
listSubscriptionsForAuthenticatedUserStubbed: ["GET /user/marketplace_purchases/stubbed"],
|
||||||
listWebhookDeliveries: ["GET /app/hook/deliveries"],
|
listWebhookDeliveries: ["GET /app/hook/deliveries"],
|
||||||
redeliverWebhookDelivery: ["POST /app/hook/deliveries/{delivery_id}/attempts"],
|
redeliverWebhookDelivery: ["POST /app/hook/deliveries/{delivery_id}/attempts"],
|
||||||
removeRepoFromInstallation: ["DELETE /user/installations/{installation_id}/repositories/{repository_id}"],
|
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"],
|
resetToken: ["PATCH /applications/{client_id}/token"],
|
||||||
revokeInstallationAccessToken: ["DELETE /installation/token"],
|
revokeInstallationAccessToken: ["DELETE /installation/token"],
|
||||||
scopeToken: ["POST /applications/{client_id}/token/scoped"],
|
scopeToken: ["POST /applications/{client_id}/token/scoped"],
|
||||||
@@ -1822,6 +1914,7 @@ const Endpoints = {
|
|||||||
listForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/check-runs"],
|
listForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/check-runs"],
|
||||||
listForSuite: ["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs"],
|
listForSuite: ["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs"],
|
||||||
listSuitesForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/check-suites"],
|
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"],
|
rerequestSuite: ["POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest"],
|
||||||
setSuitesPreferences: ["PATCH /repos/{owner}/{repo}/check-suites/preferences"],
|
setSuitesPreferences: ["PATCH /repos/{owner}/{repo}/check-suites/preferences"],
|
||||||
update: ["PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}"]
|
update: ["PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}"]
|
||||||
@@ -1846,12 +1939,7 @@ const Endpoints = {
|
|||||||
},
|
},
|
||||||
codesOfConduct: {
|
codesOfConduct: {
|
||||||
getAllCodesOfConduct: ["GET /codes_of_conduct"],
|
getAllCodesOfConduct: ["GET /codes_of_conduct"],
|
||||||
getConductCode: ["GET /codes_of_conduct/{key}"],
|
getConductCode: ["GET /codes_of_conduct/{key}"]
|
||||||
getForRepo: ["GET /repos/{owner}/{repo}/community/code_of_conduct", {
|
|
||||||
mediaType: {
|
|
||||||
previews: ["scarlet-witch"]
|
|
||||||
}
|
|
||||||
}]
|
|
||||||
},
|
},
|
||||||
emojis: {
|
emojis: {
|
||||||
get: ["GET /emojis"]
|
get: ["GET /emojis"]
|
||||||
@@ -1989,74 +2077,29 @@ const Endpoints = {
|
|||||||
},
|
},
|
||||||
migrations: {
|
migrations: {
|
||||||
cancelImport: ["DELETE /repos/{owner}/{repo}/import"],
|
cancelImport: ["DELETE /repos/{owner}/{repo}/import"],
|
||||||
deleteArchiveForAuthenticatedUser: ["DELETE /user/migrations/{migration_id}/archive", {
|
deleteArchiveForAuthenticatedUser: ["DELETE /user/migrations/{migration_id}/archive"],
|
||||||
mediaType: {
|
deleteArchiveForOrg: ["DELETE /orgs/{org}/migrations/{migration_id}/archive"],
|
||||||
previews: ["wyandotte"]
|
downloadArchiveForOrg: ["GET /orgs/{org}/migrations/{migration_id}/archive"],
|
||||||
}
|
getArchiveForAuthenticatedUser: ["GET /user/migrations/{migration_id}/archive"],
|
||||||
}],
|
|
||||||
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"],
|
getCommitAuthors: ["GET /repos/{owner}/{repo}/import/authors"],
|
||||||
getImportStatus: ["GET /repos/{owner}/{repo}/import"],
|
getImportStatus: ["GET /repos/{owner}/{repo}/import"],
|
||||||
getLargeFiles: ["GET /repos/{owner}/{repo}/import/large_files"],
|
getLargeFiles: ["GET /repos/{owner}/{repo}/import/large_files"],
|
||||||
getStatusForAuthenticatedUser: ["GET /user/migrations/{migration_id}", {
|
getStatusForAuthenticatedUser: ["GET /user/migrations/{migration_id}"],
|
||||||
mediaType: {
|
getStatusForOrg: ["GET /orgs/{org}/migrations/{migration_id}"],
|
||||||
previews: ["wyandotte"]
|
listForAuthenticatedUser: ["GET /user/migrations"],
|
||||||
}
|
listForOrg: ["GET /orgs/{org}/migrations"],
|
||||||
}],
|
listReposForAuthenticatedUser: ["GET /user/migrations/{migration_id}/repositories"],
|
||||||
getStatusForOrg: ["GET /orgs/{org}/migrations/{migration_id}", {
|
listReposForOrg: ["GET /orgs/{org}/migrations/{migration_id}/repositories"],
|
||||||
mediaType: {
|
listReposForUser: ["GET /user/migrations/{migration_id}/repositories", {}, {
|
||||||
previews: ["wyandotte"]
|
renamed: ["migrations", "listReposForAuthenticatedUser"]
|
||||||
}
|
|
||||||
}],
|
|
||||||
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"]
|
|
||||||
}
|
|
||||||
}],
|
}],
|
||||||
mapCommitAuthor: ["PATCH /repos/{owner}/{repo}/import/authors/{author_id}"],
|
mapCommitAuthor: ["PATCH /repos/{owner}/{repo}/import/authors/{author_id}"],
|
||||||
setLfsPreference: ["PATCH /repos/{owner}/{repo}/import/lfs"],
|
setLfsPreference: ["PATCH /repos/{owner}/{repo}/import/lfs"],
|
||||||
startForAuthenticatedUser: ["POST /user/migrations"],
|
startForAuthenticatedUser: ["POST /user/migrations"],
|
||||||
startForOrg: ["POST /orgs/{org}/migrations"],
|
startForOrg: ["POST /orgs/{org}/migrations"],
|
||||||
startImport: ["PUT /repos/{owner}/{repo}/import"],
|
startImport: ["PUT /repos/{owner}/{repo}/import"],
|
||||||
unlockRepoForAuthenticatedUser: ["DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock", {
|
unlockRepoForAuthenticatedUser: ["DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock"],
|
||||||
mediaType: {
|
unlockRepoForOrg: ["DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock"],
|
||||||
previews: ["wyandotte"]
|
|
||||||
}
|
|
||||||
}],
|
|
||||||
unlockRepoForOrg: ["DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock", {
|
|
||||||
mediaType: {
|
|
||||||
previews: ["wyandotte"]
|
|
||||||
}
|
|
||||||
}],
|
|
||||||
updateImport: ["PATCH /repos/{owner}/{repo}/import"]
|
updateImport: ["PATCH /repos/{owner}/{repo}/import"]
|
||||||
},
|
},
|
||||||
orgs: {
|
orgs: {
|
||||||
@@ -2136,131 +2179,31 @@ const Endpoints = {
|
|||||||
restorePackageVersionForUser: ["POST /users/{username}/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: {
|
projects: {
|
||||||
addCollaborator: ["PUT /projects/{project_id}/collaborators/{username}", {
|
addCollaborator: ["PUT /projects/{project_id}/collaborators/{username}"],
|
||||||
mediaType: {
|
createCard: ["POST /projects/columns/{column_id}/cards"],
|
||||||
previews: ["inertia"]
|
createColumn: ["POST /projects/{project_id}/columns"],
|
||||||
}
|
createForAuthenticatedUser: ["POST /user/projects"],
|
||||||
}],
|
createForOrg: ["POST /orgs/{org}/projects"],
|
||||||
createCard: ["POST /projects/columns/{column_id}/cards", {
|
createForRepo: ["POST /repos/{owner}/{repo}/projects"],
|
||||||
mediaType: {
|
delete: ["DELETE /projects/{project_id}"],
|
||||||
previews: ["inertia"]
|
deleteCard: ["DELETE /projects/columns/cards/{card_id}"],
|
||||||
}
|
deleteColumn: ["DELETE /projects/columns/{column_id}"],
|
||||||
}],
|
get: ["GET /projects/{project_id}"],
|
||||||
createColumn: ["POST /projects/{project_id}/columns", {
|
getCard: ["GET /projects/columns/cards/{card_id}"],
|
||||||
mediaType: {
|
getColumn: ["GET /projects/columns/{column_id}"],
|
||||||
previews: ["inertia"]
|
getPermissionForUser: ["GET /projects/{project_id}/collaborators/{username}/permission"],
|
||||||
}
|
listCards: ["GET /projects/columns/{column_id}/cards"],
|
||||||
}],
|
listCollaborators: ["GET /projects/{project_id}/collaborators"],
|
||||||
createForAuthenticatedUser: ["POST /user/projects", {
|
listColumns: ["GET /projects/{project_id}/columns"],
|
||||||
mediaType: {
|
listForOrg: ["GET /orgs/{org}/projects"],
|
||||||
previews: ["inertia"]
|
listForRepo: ["GET /repos/{owner}/{repo}/projects"],
|
||||||
}
|
listForUser: ["GET /users/{username}/projects"],
|
||||||
}],
|
moveCard: ["POST /projects/columns/cards/{card_id}/moves"],
|
||||||
createForOrg: ["POST /orgs/{org}/projects", {
|
moveColumn: ["POST /projects/columns/{column_id}/moves"],
|
||||||
mediaType: {
|
removeCollaborator: ["DELETE /projects/{project_id}/collaborators/{username}"],
|
||||||
previews: ["inertia"]
|
update: ["PATCH /projects/{project_id}"],
|
||||||
}
|
updateCard: ["PATCH /projects/columns/cards/{card_id}"],
|
||||||
}],
|
updateColumn: ["PATCH /projects/columns/{column_id}"]
|
||||||
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"]
|
|
||||||
}
|
|
||||||
}]
|
|
||||||
},
|
},
|
||||||
pulls: {
|
pulls: {
|
||||||
checkIfMerged: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/merge"],
|
checkIfMerged: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/merge"],
|
||||||
@@ -2287,11 +2230,7 @@ const Endpoints = {
|
|||||||
requestReviewers: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"],
|
requestReviewers: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"],
|
||||||
submitReview: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events"],
|
submitReview: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events"],
|
||||||
update: ["PATCH /repos/{owner}/{repo}/pulls/{pull_number}"],
|
update: ["PATCH /repos/{owner}/{repo}/pulls/{pull_number}"],
|
||||||
updateBranch: ["PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch", {
|
updateBranch: ["PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch"],
|
||||||
mediaType: {
|
|
||||||
previews: ["lydian"]
|
|
||||||
}
|
|
||||||
}],
|
|
||||||
updateReview: ["PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"],
|
updateReview: ["PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"],
|
||||||
updateReviewComment: ["PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}"]
|
updateReviewComment: ["PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}"]
|
||||||
},
|
},
|
||||||
@@ -2299,111 +2238,31 @@ const Endpoints = {
|
|||||||
get: ["GET /rate_limit"]
|
get: ["GET /rate_limit"]
|
||||||
},
|
},
|
||||||
reactions: {
|
reactions: {
|
||||||
createForCommitComment: ["POST /repos/{owner}/{repo}/comments/{comment_id}/reactions", {
|
createForCommitComment: ["POST /repos/{owner}/{repo}/comments/{comment_id}/reactions"],
|
||||||
mediaType: {
|
createForIssue: ["POST /repos/{owner}/{repo}/issues/{issue_number}/reactions"],
|
||||||
previews: ["squirrel-girl"]
|
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"],
|
||||||
createForIssue: ["POST /repos/{owner}/{repo}/issues/{issue_number}/reactions", {
|
createForTeamDiscussionCommentInOrg: ["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions"],
|
||||||
mediaType: {
|
createForTeamDiscussionInOrg: ["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions"],
|
||||||
previews: ["squirrel-girl"]
|
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}"],
|
||||||
createForIssueComment: ["POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", {
|
deleteForPullRequestComment: ["DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}"],
|
||||||
mediaType: {
|
deleteForTeamDiscussion: ["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}"],
|
||||||
previews: ["squirrel-girl"]
|
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"],
|
||||||
createForPullRequestReviewComment: ["POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", {
|
listForIssueComment: ["GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions"],
|
||||||
mediaType: {
|
listForPullRequestReviewComment: ["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions"],
|
||||||
previews: ["squirrel-girl"]
|
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"]
|
||||||
}],
|
|
||||||
createForRelease: ["POST /repos/{owner}/{repo}/releases/{release_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.rest.reactions.deleteLegacy() is deprecated, see https://docs.github.com/rest/reference/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"]
|
|
||||||
}
|
|
||||||
}]
|
|
||||||
},
|
},
|
||||||
repos: {
|
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", {}, {
|
addAppAccessRestrictions: ["POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", {}, {
|
||||||
mapToData: "apps"
|
mapToData: "apps"
|
||||||
}],
|
}],
|
||||||
@@ -2418,20 +2277,12 @@ const Endpoints = {
|
|||||||
mapToData: "users"
|
mapToData: "users"
|
||||||
}],
|
}],
|
||||||
checkCollaborator: ["GET /repos/{owner}/{repo}/collaborators/{username}"],
|
checkCollaborator: ["GET /repos/{owner}/{repo}/collaborators/{username}"],
|
||||||
checkVulnerabilityAlerts: ["GET /repos/{owner}/{repo}/vulnerability-alerts", {
|
checkVulnerabilityAlerts: ["GET /repos/{owner}/{repo}/vulnerability-alerts"],
|
||||||
mediaType: {
|
|
||||||
previews: ["dorian"]
|
|
||||||
}
|
|
||||||
}],
|
|
||||||
compareCommits: ["GET /repos/{owner}/{repo}/compare/{base}...{head}"],
|
compareCommits: ["GET /repos/{owner}/{repo}/compare/{base}...{head}"],
|
||||||
compareCommitsWithBasehead: ["GET /repos/{owner}/{repo}/compare/{basehead}"],
|
compareCommitsWithBasehead: ["GET /repos/{owner}/{repo}/compare/{basehead}"],
|
||||||
createAutolink: ["POST /repos/{owner}/{repo}/autolinks"],
|
createAutolink: ["POST /repos/{owner}/{repo}/autolinks"],
|
||||||
createCommitComment: ["POST /repos/{owner}/{repo}/commits/{commit_sha}/comments"],
|
createCommitComment: ["POST /repos/{owner}/{repo}/commits/{commit_sha}/comments"],
|
||||||
createCommitSignatureProtection: ["POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", {
|
createCommitSignatureProtection: ["POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures"],
|
||||||
mediaType: {
|
|
||||||
previews: ["zzzax"]
|
|
||||||
}
|
|
||||||
}],
|
|
||||||
createCommitStatus: ["POST /repos/{owner}/{repo}/statuses/{sha}"],
|
createCommitStatus: ["POST /repos/{owner}/{repo}/statuses/{sha}"],
|
||||||
createDeployKey: ["POST /repos/{owner}/{repo}/keys"],
|
createDeployKey: ["POST /repos/{owner}/{repo}/keys"],
|
||||||
createDeployment: ["POST /repos/{owner}/{repo}/deployments"],
|
createDeployment: ["POST /repos/{owner}/{repo}/deployments"],
|
||||||
@@ -2442,19 +2293,14 @@ const Endpoints = {
|
|||||||
createInOrg: ["POST /orgs/{org}/repos"],
|
createInOrg: ["POST /orgs/{org}/repos"],
|
||||||
createOrUpdateEnvironment: ["PUT /repos/{owner}/{repo}/environments/{environment_name}"],
|
createOrUpdateEnvironment: ["PUT /repos/{owner}/{repo}/environments/{environment_name}"],
|
||||||
createOrUpdateFileContents: ["PUT /repos/{owner}/{repo}/contents/{path}"],
|
createOrUpdateFileContents: ["PUT /repos/{owner}/{repo}/contents/{path}"],
|
||||||
createPagesSite: ["POST /repos/{owner}/{repo}/pages", {
|
createPagesSite: ["POST /repos/{owner}/{repo}/pages"],
|
||||||
mediaType: {
|
|
||||||
previews: ["switcheroo"]
|
|
||||||
}
|
|
||||||
}],
|
|
||||||
createRelease: ["POST /repos/{owner}/{repo}/releases"],
|
createRelease: ["POST /repos/{owner}/{repo}/releases"],
|
||||||
createUsingTemplate: ["POST /repos/{template_owner}/{template_repo}/generate", {
|
createUsingTemplate: ["POST /repos/{template_owner}/{template_repo}/generate"],
|
||||||
mediaType: {
|
|
||||||
previews: ["baptiste"]
|
|
||||||
}
|
|
||||||
}],
|
|
||||||
createWebhook: ["POST /repos/{owner}/{repo}/hooks"],
|
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}"],
|
delete: ["DELETE /repos/{owner}/{repo}"],
|
||||||
deleteAccessRestrictions: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions"],
|
deleteAccessRestrictions: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions"],
|
||||||
deleteAdminBranchProtection: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"],
|
deleteAdminBranchProtection: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"],
|
||||||
@@ -2462,51 +2308,28 @@ const Endpoints = {
|
|||||||
deleteAutolink: ["DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}"],
|
deleteAutolink: ["DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}"],
|
||||||
deleteBranchProtection: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection"],
|
deleteBranchProtection: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection"],
|
||||||
deleteCommitComment: ["DELETE /repos/{owner}/{repo}/comments/{comment_id}"],
|
deleteCommitComment: ["DELETE /repos/{owner}/{repo}/comments/{comment_id}"],
|
||||||
deleteCommitSignatureProtection: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", {
|
deleteCommitSignatureProtection: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures"],
|
||||||
mediaType: {
|
|
||||||
previews: ["zzzax"]
|
|
||||||
}
|
|
||||||
}],
|
|
||||||
deleteDeployKey: ["DELETE /repos/{owner}/{repo}/keys/{key_id}"],
|
deleteDeployKey: ["DELETE /repos/{owner}/{repo}/keys/{key_id}"],
|
||||||
deleteDeployment: ["DELETE /repos/{owner}/{repo}/deployments/{deployment_id}"],
|
deleteDeployment: ["DELETE /repos/{owner}/{repo}/deployments/{deployment_id}"],
|
||||||
deleteFile: ["DELETE /repos/{owner}/{repo}/contents/{path}"],
|
deleteFile: ["DELETE /repos/{owner}/{repo}/contents/{path}"],
|
||||||
deleteInvitation: ["DELETE /repos/{owner}/{repo}/invitations/{invitation_id}"],
|
deleteInvitation: ["DELETE /repos/{owner}/{repo}/invitations/{invitation_id}"],
|
||||||
deletePagesSite: ["DELETE /repos/{owner}/{repo}/pages", {
|
deletePagesSite: ["DELETE /repos/{owner}/{repo}/pages"],
|
||||||
mediaType: {
|
|
||||||
previews: ["switcheroo"]
|
|
||||||
}
|
|
||||||
}],
|
|
||||||
deletePullRequestReviewProtection: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"],
|
deletePullRequestReviewProtection: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"],
|
||||||
deleteRelease: ["DELETE /repos/{owner}/{repo}/releases/{release_id}"],
|
deleteRelease: ["DELETE /repos/{owner}/{repo}/releases/{release_id}"],
|
||||||
deleteReleaseAsset: ["DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}"],
|
deleteReleaseAsset: ["DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}"],
|
||||||
deleteWebhook: ["DELETE /repos/{owner}/{repo}/hooks/{hook_id}"],
|
deleteWebhook: ["DELETE /repos/{owner}/{repo}/hooks/{hook_id}"],
|
||||||
disableAutomatedSecurityFixes: ["DELETE /repos/{owner}/{repo}/automated-security-fixes", {
|
disableAutomatedSecurityFixes: ["DELETE /repos/{owner}/{repo}/automated-security-fixes"],
|
||||||
mediaType: {
|
|
||||||
previews: ["london"]
|
|
||||||
}
|
|
||||||
}],
|
|
||||||
disableLfsForRepo: ["DELETE /repos/{owner}/{repo}/lfs"],
|
disableLfsForRepo: ["DELETE /repos/{owner}/{repo}/lfs"],
|
||||||
disableVulnerabilityAlerts: ["DELETE /repos/{owner}/{repo}/vulnerability-alerts", {
|
disableVulnerabilityAlerts: ["DELETE /repos/{owner}/{repo}/vulnerability-alerts"],
|
||||||
mediaType: {
|
|
||||||
previews: ["dorian"]
|
|
||||||
}
|
|
||||||
}],
|
|
||||||
downloadArchive: ["GET /repos/{owner}/{repo}/zipball/{ref}", {}, {
|
downloadArchive: ["GET /repos/{owner}/{repo}/zipball/{ref}", {}, {
|
||||||
renamed: ["repos", "downloadZipballArchive"]
|
renamed: ["repos", "downloadZipballArchive"]
|
||||||
}],
|
}],
|
||||||
downloadTarballArchive: ["GET /repos/{owner}/{repo}/tarball/{ref}"],
|
downloadTarballArchive: ["GET /repos/{owner}/{repo}/tarball/{ref}"],
|
||||||
downloadZipballArchive: ["GET /repos/{owner}/{repo}/zipball/{ref}"],
|
downloadZipballArchive: ["GET /repos/{owner}/{repo}/zipball/{ref}"],
|
||||||
enableAutomatedSecurityFixes: ["PUT /repos/{owner}/{repo}/automated-security-fixes", {
|
enableAutomatedSecurityFixes: ["PUT /repos/{owner}/{repo}/automated-security-fixes"],
|
||||||
mediaType: {
|
|
||||||
previews: ["london"]
|
|
||||||
}
|
|
||||||
}],
|
|
||||||
enableLfsForRepo: ["PUT /repos/{owner}/{repo}/lfs"],
|
enableLfsForRepo: ["PUT /repos/{owner}/{repo}/lfs"],
|
||||||
enableVulnerabilityAlerts: ["PUT /repos/{owner}/{repo}/vulnerability-alerts", {
|
enableVulnerabilityAlerts: ["PUT /repos/{owner}/{repo}/vulnerability-alerts"],
|
||||||
mediaType: {
|
generateReleaseNotes: ["POST /repos/{owner}/{repo}/releases/generate-notes"],
|
||||||
previews: ["dorian"]
|
|
||||||
}
|
|
||||||
}],
|
|
||||||
get: ["GET /repos/{owner}/{repo}"],
|
get: ["GET /repos/{owner}/{repo}"],
|
||||||
getAccessRestrictions: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions"],
|
getAccessRestrictions: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions"],
|
||||||
getAdminBranchProtection: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"],
|
getAdminBranchProtection: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"],
|
||||||
@@ -2528,11 +2351,7 @@ const Endpoints = {
|
|||||||
getCommit: ["GET /repos/{owner}/{repo}/commits/{ref}"],
|
getCommit: ["GET /repos/{owner}/{repo}/commits/{ref}"],
|
||||||
getCommitActivityStats: ["GET /repos/{owner}/{repo}/stats/commit_activity"],
|
getCommitActivityStats: ["GET /repos/{owner}/{repo}/stats/commit_activity"],
|
||||||
getCommitComment: ["GET /repos/{owner}/{repo}/comments/{comment_id}"],
|
getCommitComment: ["GET /repos/{owner}/{repo}/comments/{comment_id}"],
|
||||||
getCommitSignatureProtection: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", {
|
getCommitSignatureProtection: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures"],
|
||||||
mediaType: {
|
|
||||||
previews: ["zzzax"]
|
|
||||||
}
|
|
||||||
}],
|
|
||||||
getCommunityProfileMetrics: ["GET /repos/{owner}/{repo}/community/profile"],
|
getCommunityProfileMetrics: ["GET /repos/{owner}/{repo}/community/profile"],
|
||||||
getContent: ["GET /repos/{owner}/{repo}/contents/{path}"],
|
getContent: ["GET /repos/{owner}/{repo}/contents/{path}"],
|
||||||
getContributorsStats: ["GET /repos/{owner}/{repo}/stats/contributors"],
|
getContributorsStats: ["GET /repos/{owner}/{repo}/stats/contributors"],
|
||||||
@@ -2650,11 +2469,7 @@ const Endpoints = {
|
|||||||
},
|
},
|
||||||
search: {
|
search: {
|
||||||
code: ["GET /search/code"],
|
code: ["GET /search/code"],
|
||||||
commits: ["GET /search/commits", {
|
commits: ["GET /search/commits"],
|
||||||
mediaType: {
|
|
||||||
previews: ["cloak"]
|
|
||||||
}
|
|
||||||
}],
|
|
||||||
issuesAndPullRequests: ["GET /search/issues"],
|
issuesAndPullRequests: ["GET /search/issues"],
|
||||||
labels: ["GET /search/labels"],
|
labels: ["GET /search/labels"],
|
||||||
repos: ["GET /search/repositories"],
|
repos: ["GET /search/repositories"],
|
||||||
@@ -2673,17 +2488,9 @@ const Endpoints = {
|
|||||||
},
|
},
|
||||||
teams: {
|
teams: {
|
||||||
addOrUpdateMembershipForUserInOrg: ["PUT /orgs/{org}/teams/{team_slug}/memberships/{username}"],
|
addOrUpdateMembershipForUserInOrg: ["PUT /orgs/{org}/teams/{team_slug}/memberships/{username}"],
|
||||||
addOrUpdateProjectPermissionsInOrg: ["PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}", {
|
addOrUpdateProjectPermissionsInOrg: ["PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}"],
|
||||||
mediaType: {
|
|
||||||
previews: ["inertia"]
|
|
||||||
}
|
|
||||||
}],
|
|
||||||
addOrUpdateRepoPermissionsInOrg: ["PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"],
|
addOrUpdateRepoPermissionsInOrg: ["PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"],
|
||||||
checkPermissionsForProjectInOrg: ["GET /orgs/{org}/teams/{team_slug}/projects/{project_id}", {
|
checkPermissionsForProjectInOrg: ["GET /orgs/{org}/teams/{team_slug}/projects/{project_id}"],
|
||||||
mediaType: {
|
|
||||||
previews: ["inertia"]
|
|
||||||
}
|
|
||||||
}],
|
|
||||||
checkPermissionsForRepoInOrg: ["GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"],
|
checkPermissionsForRepoInOrg: ["GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"],
|
||||||
create: ["POST /orgs/{org}/teams"],
|
create: ["POST /orgs/{org}/teams"],
|
||||||
createDiscussionCommentInOrg: ["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments"],
|
createDiscussionCommentInOrg: ["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments"],
|
||||||
@@ -2702,11 +2509,7 @@ const Endpoints = {
|
|||||||
listForAuthenticatedUser: ["GET /user/teams"],
|
listForAuthenticatedUser: ["GET /user/teams"],
|
||||||
listMembersInOrg: ["GET /orgs/{org}/teams/{team_slug}/members"],
|
listMembersInOrg: ["GET /orgs/{org}/teams/{team_slug}/members"],
|
||||||
listPendingInvitationsInOrg: ["GET /orgs/{org}/teams/{team_slug}/invitations"],
|
listPendingInvitationsInOrg: ["GET /orgs/{org}/teams/{team_slug}/invitations"],
|
||||||
listProjectsInOrg: ["GET /orgs/{org}/teams/{team_slug}/projects", {
|
listProjectsInOrg: ["GET /orgs/{org}/teams/{team_slug}/projects"],
|
||||||
mediaType: {
|
|
||||||
previews: ["inertia"]
|
|
||||||
}
|
|
||||||
}],
|
|
||||||
listReposInOrg: ["GET /orgs/{org}/teams/{team_slug}/repos"],
|
listReposInOrg: ["GET /orgs/{org}/teams/{team_slug}/repos"],
|
||||||
removeMembershipForUserInOrg: ["DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}"],
|
removeMembershipForUserInOrg: ["DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}"],
|
||||||
removeProjectInOrg: ["DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}"],
|
removeProjectInOrg: ["DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}"],
|
||||||
@@ -2716,42 +2519,87 @@ const Endpoints = {
|
|||||||
updateInOrg: ["PATCH /orgs/{org}/teams/{team_slug}"]
|
updateInOrg: ["PATCH /orgs/{org}/teams/{team_slug}"]
|
||||||
},
|
},
|
||||||
users: {
|
users: {
|
||||||
addEmailForAuthenticated: ["POST /user/emails"],
|
addEmailForAuthenticated: ["POST /user/emails", {}, {
|
||||||
|
renamed: ["users", "addEmailForAuthenticatedUser"]
|
||||||
|
}],
|
||||||
|
addEmailForAuthenticatedUser: ["POST /user/emails"],
|
||||||
block: ["PUT /user/blocks/{username}"],
|
block: ["PUT /user/blocks/{username}"],
|
||||||
checkBlocked: ["GET /user/blocks/{username}"],
|
checkBlocked: ["GET /user/blocks/{username}"],
|
||||||
checkFollowingForUser: ["GET /users/{username}/following/{target_user}"],
|
checkFollowingForUser: ["GET /users/{username}/following/{target_user}"],
|
||||||
checkPersonIsFollowedByAuthenticated: ["GET /user/following/{username}"],
|
checkPersonIsFollowedByAuthenticated: ["GET /user/following/{username}"],
|
||||||
createGpgKeyForAuthenticated: ["POST /user/gpg_keys"],
|
createGpgKeyForAuthenticated: ["POST /user/gpg_keys", {}, {
|
||||||
createPublicSshKeyForAuthenticated: ["POST /user/keys"],
|
renamed: ["users", "createGpgKeyForAuthenticatedUser"]
|
||||||
deleteEmailForAuthenticated: ["DELETE /user/emails"],
|
}],
|
||||||
deleteGpgKeyForAuthenticated: ["DELETE /user/gpg_keys/{gpg_key_id}"],
|
createGpgKeyForAuthenticatedUser: ["POST /user/gpg_keys"],
|
||||||
deletePublicSshKeyForAuthenticated: ["DELETE /user/keys/{key_id}"],
|
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}"],
|
follow: ["PUT /user/following/{username}"],
|
||||||
getAuthenticated: ["GET /user"],
|
getAuthenticated: ["GET /user"],
|
||||||
getByUsername: ["GET /users/{username}"],
|
getByUsername: ["GET /users/{username}"],
|
||||||
getContextForUser: ["GET /users/{username}/hovercard"],
|
getContextForUser: ["GET /users/{username}/hovercard"],
|
||||||
getGpgKeyForAuthenticated: ["GET /user/gpg_keys/{gpg_key_id}"],
|
getGpgKeyForAuthenticated: ["GET /user/gpg_keys/{gpg_key_id}", {}, {
|
||||||
getPublicSshKeyForAuthenticated: ["GET /user/keys/{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"],
|
list: ["GET /users"],
|
||||||
listBlockedByAuthenticated: ["GET /user/blocks"],
|
listBlockedByAuthenticated: ["GET /user/blocks", {}, {
|
||||||
listEmailsForAuthenticated: ["GET /user/emails"],
|
renamed: ["users", "listBlockedByAuthenticatedUser"]
|
||||||
listFollowedByAuthenticated: ["GET /user/following"],
|
}],
|
||||||
|
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"],
|
listFollowersForAuthenticatedUser: ["GET /user/followers"],
|
||||||
listFollowersForUser: ["GET /users/{username}/followers"],
|
listFollowersForUser: ["GET /users/{username}/followers"],
|
||||||
listFollowingForUser: ["GET /users/{username}/following"],
|
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"],
|
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"],
|
listPublicKeysForUser: ["GET /users/{username}/keys"],
|
||||||
listPublicSshKeysForAuthenticated: ["GET /user/keys"],
|
listPublicSshKeysForAuthenticated: ["GET /user/keys", {}, {
|
||||||
setPrimaryEmailVisibilityForAuthenticated: ["PATCH /user/email/visibility"],
|
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}"],
|
unblock: ["DELETE /user/blocks/{username}"],
|
||||||
unfollow: ["DELETE /user/following/{username}"],
|
unfollow: ["DELETE /user/following/{username}"],
|
||||||
updateAuthenticated: ["PATCH /user"]
|
updateAuthenticated: ["PATCH /user"]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const VERSION = "5.11.1";
|
const VERSION = "5.13.0";
|
||||||
|
|
||||||
function endpointsToMethods(octokit, endpointsMap) {
|
function endpointsToMethods(octokit, endpointsMap) {
|
||||||
const newMethods = {};
|
const newMethods = {};
|
||||||
@@ -3684,12 +3532,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0;
|
exports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0;
|
||||||
const command_1 = __webpack_require__(351);
|
const command_1 = __webpack_require__(351);
|
||||||
const file_command_1 = __webpack_require__(717);
|
const file_command_1 = __webpack_require__(717);
|
||||||
const utils_1 = __webpack_require__(278);
|
const utils_1 = __webpack_require__(278);
|
||||||
const os = __importStar(__webpack_require__(87));
|
const os = __importStar(__webpack_require__(87));
|
||||||
const path = __importStar(__webpack_require__(622));
|
const path = __importStar(__webpack_require__(622));
|
||||||
|
const oidc_utils_1 = __webpack_require__(41);
|
||||||
/**
|
/**
|
||||||
* The code to exit an action
|
* The code to exit an action
|
||||||
*/
|
*/
|
||||||
@@ -3958,6 +3807,12 @@ function getState(name) {
|
|||||||
return process.env[`STATE_${name}`] || '';
|
return process.env[`STATE_${name}`] || '';
|
||||||
}
|
}
|
||||||
exports.getState = getState;
|
exports.getState = getState;
|
||||||
|
function getIDToken(aud) {
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
return yield oidc_utils_1.OidcClient.getIDToken(aud);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
exports.getIDToken = getIDToken;
|
||||||
//# sourceMappingURL=core.js.map
|
//# sourceMappingURL=core.js.map
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
@@ -3970,7 +3825,7 @@ exports.getState = getState;
|
|||||||
|
|
||||||
Object.defineProperty(exports, '__esModule', { value: true });
|
Object.defineProperty(exports, '__esModule', { value: true });
|
||||||
|
|
||||||
const VERSION = "2.16.4";
|
const VERSION = "2.17.0";
|
||||||
|
|
||||||
function ownKeys(object, enumerableOnly) {
|
function ownKeys(object, enumerableOnly) {
|
||||||
var keys = Object.keys(object);
|
var keys = Object.keys(object);
|
||||||
@@ -4154,7 +4009,7 @@ const composePaginateRest = Object.assign(paginate, {
|
|||||||
iterator
|
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}/actions/runners/downloads", "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 /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/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/runners/downloads", "GET /orgs/{org}/actions/secrets", "GET /orgs/{org}/actions/secrets/{secret_name}/repositories", "GET /orgs/{org}/blocks", "GET /orgs/{org}/credential-authorizations", "GET /orgs/{org}/events", "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}/projects", "GET /orgs/{org}/public_members", "GET /orgs/{org}/repos", "GET /orgs/{org}/secret-scanning/alerts", "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}/team-sync/group-mappings", "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/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/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}/autolinks", "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}/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}/branches-where-head", "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}/statuses", "GET /repos/{owner}/{repo}/contributors", "GET /repos/{owner}/{repo}/deployments", "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses", "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_numbLine truncated
|
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}/actions/runners/downloads", "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 /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/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/runners/downloads", "GET /orgs/{org}/actions/secrets", "GET /orgs/{org}/actions/secrets/{secret_name}/repositories", "GET /orgs/{org}/blocks", "GET /orgs/{org}/credential-authorizations", "GET /orgs/{org}/events", "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}/projects", "GET /orgs/{org}/public_members", "GET /orgs/{org}/repos", "GET /orgs/{org}/secret-scanning/alerts", "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}/team-sync/group-mappings", "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/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}/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}/autolinks", "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}/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}/branches-where-head", "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}/statuses", "GET /repos/{owner}/{repo}/contributors", "GET /repos/{owner}/{repo}/deployments", "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses", "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}/{reLine truncated
|
||||||
|
|
||||||
function isPaginatingEndpoint(arg) {
|
function isPaginatingEndpoint(arg) {
|
||||||
if (typeof arg === "string") {
|
if (typeof arg === "string") {
|
||||||
@@ -5091,6 +4946,7 @@ function toCommandProperties(annotationProperties) {
|
|||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
title: annotationProperties.title,
|
title: annotationProperties.title,
|
||||||
|
file: annotationProperties.file,
|
||||||
line: annotationProperties.startLine,
|
line: annotationProperties.startLine,
|
||||||
endLine: annotationProperties.endLine,
|
endLine: annotationProperties.endLine,
|
||||||
col: annotationProperties.startColumn,
|
col: annotationProperties.startColumn,
|
||||||
@@ -8004,7 +7860,7 @@ Object.defineProperty(Response.prototype, Symbol.toStringTag, {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const INTERNALS$2 = Symbol('Request internals');
|
const INTERNALS$2 = Symbol('Request internals');
|
||||||
const URL = whatwgUrl.URL;
|
const URL = Url.URL || whatwgUrl.URL;
|
||||||
|
|
||||||
// fix an issue where "format", "parse" aren't a named export for node <10
|
// fix an issue where "format", "parse" aren't a named export for node <10
|
||||||
const parse_url = Url.parse;
|
const parse_url = Url.parse;
|
||||||
@@ -8267,9 +8123,17 @@ AbortError.prototype = Object.create(Error.prototype);
|
|||||||
AbortError.prototype.constructor = AbortError;
|
AbortError.prototype.constructor = AbortError;
|
||||||
AbortError.prototype.name = 'AbortError';
|
AbortError.prototype.name = 'AbortError';
|
||||||
|
|
||||||
|
const URL$1 = Url.URL || whatwgUrl.URL;
|
||||||
|
|
||||||
// fix an issue where "PassThrough", "resolve" aren't a named export for node <10
|
// fix an issue where "PassThrough", "resolve" aren't a named export for node <10
|
||||||
const PassThrough$1 = Stream.PassThrough;
|
const PassThrough$1 = Stream.PassThrough;
|
||||||
const resolve_url = Url.resolve;
|
|
||||||
|
const isDomainOrSubdomain = function isDomainOrSubdomain(destination, original) {
|
||||||
|
const orig = new URL$1(original).hostname;
|
||||||
|
const dest = new URL$1(destination).hostname;
|
||||||
|
|
||||||
|
return orig === dest || orig[orig.length - dest.length - 1] === '.' && orig.endsWith(dest);
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetch function
|
* Fetch function
|
||||||
@@ -8357,7 +8221,19 @@ function fetch(url, opts) {
|
|||||||
const location = headers.get('Location');
|
const location = headers.get('Location');
|
||||||
|
|
||||||
// HTTP fetch step 5.3
|
// HTTP fetch step 5.3
|
||||||
const locationURL = location === null ? null : resolve_url(request.url, location);
|
let locationURL = null;
|
||||||
|
try {
|
||||||
|
locationURL = location === null ? null : new URL$1(location, request.url).toString();
|
||||||
|
} catch (err) {
|
||||||
|
// error here can only be invalid URL in Location: header
|
||||||
|
// do not throw when options.redirect == manual
|
||||||
|
// let the user extract the errorneous redirect URL
|
||||||
|
if (request.redirect !== 'manual') {
|
||||||
|
reject(new FetchError(`uri requested responds with an invalid redirect URL: ${location}`, 'invalid-redirect'));
|
||||||
|
finalize();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// HTTP fetch step 5.5
|
// HTTP fetch step 5.5
|
||||||
switch (request.redirect) {
|
switch (request.redirect) {
|
||||||
@@ -8405,6 +8281,12 @@ function fetch(url, opts) {
|
|||||||
size: request.size
|
size: request.size
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (!isDomainOrSubdomain(request.url, locationURL)) {
|
||||||
|
for (const name of ['authorization', 'www-authenticate', 'cookie', 'cookie2']) {
|
||||||
|
requestOpts.headers.delete(name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// HTTP-redirect fetch step 9
|
// HTTP-redirect fetch step 9
|
||||||
if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) {
|
if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) {
|
||||||
reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect'));
|
reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect'));
|
||||||
@@ -9510,6 +9392,72 @@ module.exports.Singular = Hook.Singular
|
|||||||
module.exports.Collection = Hook.Collection
|
module.exports.Collection = Hook.Collection
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 702:
|
||||||
|
/***/ (function(__unusedmodule, exports) {
|
||||||
|
|
||||||
|
"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;
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 717:
|
/***/ 717:
|
||||||
|
|||||||
+1
-1
@@ -25,4 +25,4 @@ Releases are done manually, for now:
|
|||||||
1. Ensure that the build is up to date with `npm run build`. It's also good to ensure you have the correct dependencies installed by running `npm install` before you build.
|
1. Ensure that the build is up to date with `npm run build`. It's also good to ensure you have the correct dependencies installed by running `npm install` before you build.
|
||||||
1. Bump the [package.json](/package.json#L3) and [package-lock.json](/package-lock.json#L3) version numbers and commit them. I like to do this with `npm version {major,minor,patch} --no-git-tag-version`. This will bump the version numbers but let you manually commit and tag, yourself.
|
1. Bump the [package.json](/package.json#L3) and [package-lock.json](/package-lock.json#L3) version numbers and commit them. I like to do this with `npm version {major,minor,patch} --no-git-tag-version`. This will bump the version numbers but let you manually commit and tag, yourself.
|
||||||
1. Update documentation (including updated version numbers).
|
1. Update documentation (including updated version numbers).
|
||||||
1. Tag main with the new version number and create a GitHub release. Make sure you also force-create and force-push tags for minor and patch updates. For example, when creating v5.1.0 (a minor bump), you want to create (or update) `v5`, `v5.1`, and `v5.1.0`.
|
1. Tag main with the new version number and create a GitHub release. Make sure you also force-create and force-push tags for minor and patch updates. For example, when creating v5.2.0 (a minor bump), you want to create (or update) `v5`, `v5.2`, and `v5.2.0`.
|
||||||
Generated
+1627
-5071
File diff suppressed because it is too large.
Load diff
+10
-14
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "github-script",
|
"name": "github-script",
|
||||||
"description": "A GitHub action for executing a simple script",
|
"description": "A GitHub action for executing a simple script",
|
||||||
"version": "5.0.0",
|
"version": "6.0.0",
|
||||||
"author": "GitHub",
|
"author": "GitHub",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
@@ -14,12 +14,8 @@
|
|||||||
"style:check": "run-p --continue-on-error --aggregate-output format:check lint",
|
"style:check": "run-p --continue-on-error --aggregate-output format:check lint",
|
||||||
"style:write": "run-p --continue-on-error --aggregate-output format:write lint",
|
"style:write": "run-p --continue-on-error --aggregate-output format:write lint",
|
||||||
"pre-commit": "run-s style:write test build",
|
"pre-commit": "run-s style:write test build",
|
||||||
"test": "jest"
|
"test": "jest",
|
||||||
},
|
"prepare": "husky install"
|
||||||
"husky": {
|
|
||||||
"hooks": {
|
|
||||||
"pre-commit": "npm run pre-commit && git add dist/"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"jest": {
|
"jest": {
|
||||||
"preset": "ts-jest",
|
"preset": "ts-jest",
|
||||||
@@ -35,27 +31,27 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.5.0",
|
"@actions/core": "^1.6.0",
|
||||||
"@actions/exec": "^1.1.0",
|
"@actions/exec": "^1.1.0",
|
||||||
"@actions/github": "^5.0.0",
|
"@actions/github": "^5.0.0",
|
||||||
"@actions/glob": "^0.2.0",
|
"@actions/glob": "^0.2.0",
|
||||||
"@actions/io": "^1.1.1",
|
"@actions/io": "^1.1.1",
|
||||||
"@octokit/core": "^3.5.1",
|
"@octokit/core": "^3.5.1",
|
||||||
"@octokit/plugin-paginate-rest": "^2.16.4",
|
"@octokit/plugin-paginate-rest": "^2.17.0",
|
||||||
"@octokit/plugin-rest-endpoint-methods": "^5.11.1"
|
"@octokit/plugin-rest-endpoint-methods": "^5.13.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^26.0.24",
|
"@types/jest": "^27.0.2",
|
||||||
"@typescript-eslint/eslint-plugin": "^3.10.1",
|
"@typescript-eslint/eslint-plugin": "^3.10.1",
|
||||||
"@typescript-eslint/parser": "^3.10.1",
|
"@typescript-eslint/parser": "^3.10.1",
|
||||||
"@vercel/ncc": "^0.23.0",
|
"@vercel/ncc": "^0.23.0",
|
||||||
"eslint": "^7.32.0",
|
"eslint": "^7.32.0",
|
||||||
"eslint-config-prettier": "^6.15.0",
|
"eslint-config-prettier": "^6.15.0",
|
||||||
"husky": "^4.2.5",
|
"husky": "^7.0.0",
|
||||||
"jest": "^26.6.3",
|
"jest": "^27.2.5",
|
||||||
"npm-run-all": "^4.1.5",
|
"npm-run-all": "^4.1.5",
|
||||||
"prettier": "^2.0.5",
|
"prettier": "^2.0.5",
|
||||||
"ts-jest": "^26.5.6",
|
"ts-jest": "^27.0.5",
|
||||||
"typescript": "^4.3.5"
|
"typescript": "^4.3.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user