Compare commits
33 Commits
v3.0.0-bet
...
v3.0.0-bet
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
28bdc1ab05 | ||
|
|
d53a1cdfde | ||
|
|
f863ba5554 | ||
|
|
c2937b00bd | ||
|
|
a7f885bf45 | ||
|
|
b60ed23e06 | ||
|
|
efd9eb0674 | ||
|
|
340567cb0e | ||
|
|
5c1e00d1af | ||
|
|
64cd9c9a45 | ||
|
|
29824e69f5 | ||
|
|
b212e6a739 | ||
|
|
8efbf9bf0f | ||
|
|
7e473efe3c | ||
|
|
dce3be8b28 | ||
|
|
5480f4325a | ||
|
|
d90aa53233 | ||
|
|
55e2a4b2cc | ||
|
|
cc6f999683 | ||
|
|
40fa6b52b3 | ||
|
|
396e5022f0 | ||
|
|
f48f2eb932 | ||
|
|
b7f83f6278 | ||
|
|
2a47cfc9ef | ||
|
|
1ff8cc40cc | ||
|
|
b96fde71c0 | ||
|
|
6701853927 | ||
|
|
bef1eaf1c0 | ||
|
|
1526738aa4 | ||
|
|
f3d5ec2073 | ||
|
|
def152b8a7 | ||
|
|
5d7307be63 | ||
|
|
525760a53f |
@@ -12,6 +12,6 @@ jobs:
|
|||||||
id-token: write
|
id-token: write
|
||||||
packages: write
|
packages: write
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v6
|
||||||
- name: Publish Immutable Action
|
- name: Publish Immutable Action
|
||||||
uses: actions/publish-immutable-action@v0.0.4
|
uses: actions/publish-immutable-action@v0.0.4
|
||||||
|
|||||||
5
.github/workflows/release.yml
vendored
5
.github/workflows/release.yml
vendored
@@ -18,14 +18,13 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
# build local version to create token
|
# build local version to create token
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v6
|
||||||
with:
|
with:
|
||||||
node-version-file: package.json
|
node-version-file: package.json
|
||||||
cache: 'npm'
|
|
||||||
|
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
- run: npm run build
|
- run: npm run build
|
||||||
|
|||||||
34
.github/workflows/stale.yml
vendored
Normal file
34
.github/workflows/stale.yml
vendored
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
# This workflow warns and then closes issues that have had no activity for a specified amount of time.
|
||||||
|
# https://github.com/actions/stale
|
||||||
|
|
||||||
|
name: Stale
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
schedule:
|
||||||
|
# 00:00 UTC on Mondays
|
||||||
|
- cron: '0 0 * * 1'
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
issues: write
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
|
env:
|
||||||
|
DAYS_BEFORE_STALE: 180
|
||||||
|
DAYS_BEFORE_CLOSE: 60
|
||||||
|
STALE_LABEL: 'stale'
|
||||||
|
STALE_LABEL_URL: ${{github.server_url}}/${{github.repository}}/labels/stale
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
stale:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/stale@v10
|
||||||
|
with:
|
||||||
|
operations-per-run: 100
|
||||||
|
days-before-stale: ${{ env.DAYS_BEFORE_STALE }}
|
||||||
|
days-before-close: ${{ env.DAYS_BEFORE_CLOSE }}
|
||||||
|
stale-issue-label: ${{ env.STALE_LABEL }}
|
||||||
|
stale-pr-label: ${{ env.STALE_LABEL }}
|
||||||
|
stale-issue-message: 'This issue has been marked ${{ env.STALE_LABEL_URL }} because it has been open for ${{ env.DAYS_BEFORE_STALE }} days with no activity. Please close this issue if it is no longer needed. If this issue is still relevant and you would like it to remain open, simply update it within the next ${{ env.DAYS_BEFORE_CLOSE }} days.'
|
||||||
|
stale-pr-message: 'This pull request has been marked ${{ env.STALE_LABEL_URL }} because it has been open for ${{ env.DAYS_BEFORE_STALE }} days with no activity. Please close this pull request if it is no longer needed. If this pull request is still relevant and you would like it to remain open, simply update it within the next ${{ env.DAYS_BEFORE_CLOSE }} days.'
|
||||||
17
.github/workflows/test.yml
vendored
17
.github/workflows/test.yml
vendored
@@ -6,6 +6,7 @@ on:
|
|||||||
- main
|
- main
|
||||||
- beta
|
- beta
|
||||||
pull_request:
|
pull_request:
|
||||||
|
merge_group:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
@@ -17,30 +18,28 @@ permissions:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
integration:
|
integration:
|
||||||
name: Integration
|
name: integration
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v6
|
||||||
|
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v6
|
||||||
with:
|
with:
|
||||||
node-version-file: package.json
|
node-version-file: package.json
|
||||||
cache: 'npm'
|
|
||||||
|
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
- run: npm test
|
- run: npm test
|
||||||
|
|
||||||
end-to-end:
|
end-to-end:
|
||||||
name: End-to-End
|
name: end-to-end
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
# do not run from forks, as forks don’t have access to repository secrets
|
# do not run from forks, as forks don’t have access to repository secrets
|
||||||
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.owner.login == github.event.pull_request.base.repo.owner.login
|
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.owner.login == github.event.pull_request.base.repo.owner.login
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v6
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v6
|
||||||
with:
|
with:
|
||||||
node-version-file: package.json
|
node-version-file: package.json
|
||||||
cache: 'npm'
|
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
- run: npm run build
|
- run: npm run build
|
||||||
- uses: ./ # Uses the action in the root directory
|
- uses: ./ # Uses the action in the root directory
|
||||||
@@ -57,7 +56,7 @@ jobs:
|
|||||||
- run: echo '${{ steps.get-repository.outputs.data }}'
|
- run: echo '${{ steps.get-repository.outputs.data }}'
|
||||||
|
|
||||||
end-to-end-proxy:
|
end-to-end-proxy:
|
||||||
name: End-to-End with unreachable proxy
|
name: end-to-end with unreachable proxy
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
# do not run from forks, as forks don’t have access to repository secrets
|
# do not run from forks, as forks don’t have access to repository secrets
|
||||||
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.owner.login == github.event.pull_request.base.repo.owner.login
|
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.owner.login == github.event.pull_request.base.repo.owner.login
|
||||||
|
|||||||
19
.github/workflows/update-permission-inputs.yml
vendored
19
.github/workflows/update-permission-inputs.yml
vendored
@@ -13,21 +13,30 @@ concurrency:
|
|||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
update-permission-inputs:
|
update-permission-inputs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
COMMIT_MESSAGE: 'feat: update permission inputs'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v6
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v6
|
||||||
with:
|
with:
|
||||||
node-version-file: package.json
|
node-version-file: package.json
|
||||||
cache: 'npm'
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
- name: Run permission inputs update script
|
- name: Run permission inputs update script
|
||||||
run: node scripts/update-permission-inputs.js
|
run: node scripts/update-permission-inputs.js
|
||||||
- name: Commit changes
|
- name: Commit changes
|
||||||
uses: stefanzweifel/git-auto-commit-action@b863ae1933cb653a53c021fe36dbb774e1fb9403 # v5.2.0
|
id: auto-commit
|
||||||
|
uses: stefanzweifel/git-auto-commit-action@04702edda442b2e678b25b537cec683a1493fcb9 # v7.1.0
|
||||||
with:
|
with:
|
||||||
commit_message: 'feat: update permission inputs'
|
commit_message: ${{ env.COMMIT_MESSAGE }}
|
||||||
|
- name: Update PR title
|
||||||
|
if: github.event_name == 'pull_request' && steps.auto-commit.outputs.changes_detected == 'true'
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
run: |
|
||||||
|
gh pr edit ${{ github.event.pull_request.number }} --title "${{ env.COMMIT_MESSAGE }}"
|
||||||
|
|||||||
@@ -37,12 +37,16 @@ inputs:
|
|||||||
description: "The level of permission to grant the access token to create, edit, delete, and list Codespaces. Can be set to 'read' or 'write'."
|
description: "The level of permission to grant the access token to create, edit, delete, and list Codespaces. Can be set to 'read' or 'write'."
|
||||||
permission-contents:
|
permission-contents:
|
||||||
description: "The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges. Can be set to 'read' or 'write'."
|
description: "The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges. Can be set to 'read' or 'write'."
|
||||||
|
permission-custom-properties-for-organizations:
|
||||||
|
description: "The level of permission to grant the access token to view and edit custom properties for an organization, when allowed by the property. Can be set to 'read' or 'write'."
|
||||||
permission-dependabot-secrets:
|
permission-dependabot-secrets:
|
||||||
description: "The level of permission to grant the access token to manage Dependabot secrets. Can be set to 'read' or 'write'."
|
description: "The level of permission to grant the access token to manage Dependabot secrets. Can be set to 'read' or 'write'."
|
||||||
permission-deployments:
|
permission-deployments:
|
||||||
description: "The level of permission to grant the access token for deployments and deployment statuses. Can be set to 'read' or 'write'."
|
description: "The level of permission to grant the access token for deployments and deployment statuses. Can be set to 'read' or 'write'."
|
||||||
permission-email-addresses:
|
permission-email-addresses:
|
||||||
description: "The level of permission to grant the access token to manage the email addresses belonging to a user. Can be set to 'read' or 'write'."
|
description: "The level of permission to grant the access token to manage the email addresses belonging to a user. Can be set to 'read' or 'write'."
|
||||||
|
permission-enterprise-custom-properties-for-organizations:
|
||||||
|
description: "The level of permission to grant the access token for organization custom properties management at the enterprise level. Can be set to 'read', 'write', or 'admin'."
|
||||||
permission-environments:
|
permission-environments:
|
||||||
description: "The level of permission to grant the access token for managing repository environments. Can be set to 'read' or 'write'."
|
description: "The level of permission to grant the access token for managing repository environments. Can be set to 'read' or 'write'."
|
||||||
permission-followers:
|
permission-followers:
|
||||||
@@ -68,7 +72,7 @@ inputs:
|
|||||||
permission-organization-custom-org-roles:
|
permission-organization-custom-org-roles:
|
||||||
description: "The level of permission to grant the access token for custom organization roles management. Can be set to 'read' or 'write'."
|
description: "The level of permission to grant the access token for custom organization roles management. Can be set to 'read' or 'write'."
|
||||||
permission-organization-custom-properties:
|
permission-organization-custom-properties:
|
||||||
description: "The level of permission to grant the access token for custom property management. Can be set to 'read', 'write', or 'admin'."
|
description: "The level of permission to grant the access token for repository custom properties management at the organization level. Can be set to 'read', 'write', or 'admin'."
|
||||||
permission-organization-custom-roles:
|
permission-organization-custom-roles:
|
||||||
description: "The level of permission to grant the access token for custom repository roles management. Can be set to 'read' or 'write'."
|
description: "The level of permission to grant the access token for custom repository roles management. Can be set to 'read' or 'write'."
|
||||||
permission-organization-events:
|
permission-organization-events:
|
||||||
|
|||||||
939
dist/main.cjs
vendored
939
dist/main.cjs
vendored
File diff suppressed because it is too large
Load Diff
460
dist/post.cjs
vendored
460
dist/post.cjs
vendored
@@ -227,10 +227,10 @@ var require_proxy = __commonJS({
|
|||||||
})();
|
})();
|
||||||
if (proxyVar) {
|
if (proxyVar) {
|
||||||
try {
|
try {
|
||||||
return new DecodedURL(proxyVar);
|
return new URL(proxyVar);
|
||||||
} catch (_a) {
|
} catch (_a) {
|
||||||
if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://"))
|
if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://"))
|
||||||
return new DecodedURL(`http://${proxyVar}`);
|
return new URL(`http://${proxyVar}`);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return void 0;
|
return void 0;
|
||||||
@@ -273,19 +273,6 @@ var require_proxy = __commonJS({
|
|||||||
const hostLower = host.toLowerCase();
|
const hostLower = host.toLowerCase();
|
||||||
return hostLower === "localhost" || hostLower.startsWith("127.") || hostLower.startsWith("[::1]") || hostLower.startsWith("[0:0:0:0:0:0:0:1]");
|
return hostLower === "localhost" || hostLower.startsWith("127.") || hostLower.startsWith("[::1]") || hostLower.startsWith("[0:0:0:0:0:0:0:1]");
|
||||||
}
|
}
|
||||||
var DecodedURL = class extends URL {
|
|
||||||
constructor(url, base) {
|
|
||||||
super(url, base);
|
|
||||||
this._decodedUsername = decodeURIComponent(super.username);
|
|
||||||
this._decodedPassword = decodeURIComponent(super.password);
|
|
||||||
}
|
|
||||||
get username() {
|
|
||||||
return this._decodedUsername;
|
|
||||||
}
|
|
||||||
get password() {
|
|
||||||
return this._decodedPassword;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -530,67 +517,67 @@ var require_tunnel2 = __commonJS({
|
|||||||
var require_symbols = __commonJS({
|
var require_symbols = __commonJS({
|
||||||
"node_modules/@actions/http-client/node_modules/undici/lib/core/symbols.js"(exports2, module2) {
|
"node_modules/@actions/http-client/node_modules/undici/lib/core/symbols.js"(exports2, module2) {
|
||||||
module2.exports = {
|
module2.exports = {
|
||||||
kClose: Symbol("close"),
|
kClose: /* @__PURE__ */ Symbol("close"),
|
||||||
kDestroy: Symbol("destroy"),
|
kDestroy: /* @__PURE__ */ Symbol("destroy"),
|
||||||
kDispatch: Symbol("dispatch"),
|
kDispatch: /* @__PURE__ */ Symbol("dispatch"),
|
||||||
kUrl: Symbol("url"),
|
kUrl: /* @__PURE__ */ Symbol("url"),
|
||||||
kWriting: Symbol("writing"),
|
kWriting: /* @__PURE__ */ Symbol("writing"),
|
||||||
kResuming: Symbol("resuming"),
|
kResuming: /* @__PURE__ */ Symbol("resuming"),
|
||||||
kQueue: Symbol("queue"),
|
kQueue: /* @__PURE__ */ Symbol("queue"),
|
||||||
kConnect: Symbol("connect"),
|
kConnect: /* @__PURE__ */ Symbol("connect"),
|
||||||
kConnecting: Symbol("connecting"),
|
kConnecting: /* @__PURE__ */ Symbol("connecting"),
|
||||||
kHeadersList: Symbol("headers list"),
|
kHeadersList: /* @__PURE__ */ Symbol("headers list"),
|
||||||
kKeepAliveDefaultTimeout: Symbol("default keep alive timeout"),
|
kKeepAliveDefaultTimeout: /* @__PURE__ */ Symbol("default keep alive timeout"),
|
||||||
kKeepAliveMaxTimeout: Symbol("max keep alive timeout"),
|
kKeepAliveMaxTimeout: /* @__PURE__ */ Symbol("max keep alive timeout"),
|
||||||
kKeepAliveTimeoutThreshold: Symbol("keep alive timeout threshold"),
|
kKeepAliveTimeoutThreshold: /* @__PURE__ */ Symbol("keep alive timeout threshold"),
|
||||||
kKeepAliveTimeoutValue: Symbol("keep alive timeout"),
|
kKeepAliveTimeoutValue: /* @__PURE__ */ Symbol("keep alive timeout"),
|
||||||
kKeepAlive: Symbol("keep alive"),
|
kKeepAlive: /* @__PURE__ */ Symbol("keep alive"),
|
||||||
kHeadersTimeout: Symbol("headers timeout"),
|
kHeadersTimeout: /* @__PURE__ */ Symbol("headers timeout"),
|
||||||
kBodyTimeout: Symbol("body timeout"),
|
kBodyTimeout: /* @__PURE__ */ Symbol("body timeout"),
|
||||||
kServerName: Symbol("server name"),
|
kServerName: /* @__PURE__ */ Symbol("server name"),
|
||||||
kLocalAddress: Symbol("local address"),
|
kLocalAddress: /* @__PURE__ */ Symbol("local address"),
|
||||||
kHost: Symbol("host"),
|
kHost: /* @__PURE__ */ Symbol("host"),
|
||||||
kNoRef: Symbol("no ref"),
|
kNoRef: /* @__PURE__ */ Symbol("no ref"),
|
||||||
kBodyUsed: Symbol("used"),
|
kBodyUsed: /* @__PURE__ */ Symbol("used"),
|
||||||
kRunning: Symbol("running"),
|
kRunning: /* @__PURE__ */ Symbol("running"),
|
||||||
kBlocking: Symbol("blocking"),
|
kBlocking: /* @__PURE__ */ Symbol("blocking"),
|
||||||
kPending: Symbol("pending"),
|
kPending: /* @__PURE__ */ Symbol("pending"),
|
||||||
kSize: Symbol("size"),
|
kSize: /* @__PURE__ */ Symbol("size"),
|
||||||
kBusy: Symbol("busy"),
|
kBusy: /* @__PURE__ */ Symbol("busy"),
|
||||||
kQueued: Symbol("queued"),
|
kQueued: /* @__PURE__ */ Symbol("queued"),
|
||||||
kFree: Symbol("free"),
|
kFree: /* @__PURE__ */ Symbol("free"),
|
||||||
kConnected: Symbol("connected"),
|
kConnected: /* @__PURE__ */ Symbol("connected"),
|
||||||
kClosed: Symbol("closed"),
|
kClosed: /* @__PURE__ */ Symbol("closed"),
|
||||||
kNeedDrain: Symbol("need drain"),
|
kNeedDrain: /* @__PURE__ */ Symbol("need drain"),
|
||||||
kReset: Symbol("reset"),
|
kReset: /* @__PURE__ */ Symbol("reset"),
|
||||||
kDestroyed: Symbol.for("nodejs.stream.destroyed"),
|
kDestroyed: /* @__PURE__ */ Symbol.for("nodejs.stream.destroyed"),
|
||||||
kMaxHeadersSize: Symbol("max headers size"),
|
kMaxHeadersSize: /* @__PURE__ */ Symbol("max headers size"),
|
||||||
kRunningIdx: Symbol("running index"),
|
kRunningIdx: /* @__PURE__ */ Symbol("running index"),
|
||||||
kPendingIdx: Symbol("pending index"),
|
kPendingIdx: /* @__PURE__ */ Symbol("pending index"),
|
||||||
kError: Symbol("error"),
|
kError: /* @__PURE__ */ Symbol("error"),
|
||||||
kClients: Symbol("clients"),
|
kClients: /* @__PURE__ */ Symbol("clients"),
|
||||||
kClient: Symbol("client"),
|
kClient: /* @__PURE__ */ Symbol("client"),
|
||||||
kParser: Symbol("parser"),
|
kParser: /* @__PURE__ */ Symbol("parser"),
|
||||||
kOnDestroyed: Symbol("destroy callbacks"),
|
kOnDestroyed: /* @__PURE__ */ Symbol("destroy callbacks"),
|
||||||
kPipelining: Symbol("pipelining"),
|
kPipelining: /* @__PURE__ */ Symbol("pipelining"),
|
||||||
kSocket: Symbol("socket"),
|
kSocket: /* @__PURE__ */ Symbol("socket"),
|
||||||
kHostHeader: Symbol("host header"),
|
kHostHeader: /* @__PURE__ */ Symbol("host header"),
|
||||||
kConnector: Symbol("connector"),
|
kConnector: /* @__PURE__ */ Symbol("connector"),
|
||||||
kStrictContentLength: Symbol("strict content length"),
|
kStrictContentLength: /* @__PURE__ */ Symbol("strict content length"),
|
||||||
kMaxRedirections: Symbol("maxRedirections"),
|
kMaxRedirections: /* @__PURE__ */ Symbol("maxRedirections"),
|
||||||
kMaxRequests: Symbol("maxRequestsPerClient"),
|
kMaxRequests: /* @__PURE__ */ Symbol("maxRequestsPerClient"),
|
||||||
kProxy: Symbol("proxy agent options"),
|
kProxy: /* @__PURE__ */ Symbol("proxy agent options"),
|
||||||
kCounter: Symbol("socket request counter"),
|
kCounter: /* @__PURE__ */ Symbol("socket request counter"),
|
||||||
kInterceptors: Symbol("dispatch interceptors"),
|
kInterceptors: /* @__PURE__ */ Symbol("dispatch interceptors"),
|
||||||
kMaxResponseSize: Symbol("max response size"),
|
kMaxResponseSize: /* @__PURE__ */ Symbol("max response size"),
|
||||||
kHTTP2Session: Symbol("http2Session"),
|
kHTTP2Session: /* @__PURE__ */ Symbol("http2Session"),
|
||||||
kHTTP2SessionState: Symbol("http2Session state"),
|
kHTTP2SessionState: /* @__PURE__ */ Symbol("http2Session state"),
|
||||||
kHTTP2BuildRequest: Symbol("http2 build request"),
|
kHTTP2BuildRequest: /* @__PURE__ */ Symbol("http2 build request"),
|
||||||
kHTTP1BuildRequest: Symbol("http1 build request"),
|
kHTTP1BuildRequest: /* @__PURE__ */ Symbol("http1 build request"),
|
||||||
kHTTP2CopyHeaders: Symbol("http2 copy headers"),
|
kHTTP2CopyHeaders: /* @__PURE__ */ Symbol("http2 copy headers"),
|
||||||
kHTTPConnVersion: Symbol("http connection version"),
|
kHTTPConnVersion: /* @__PURE__ */ Symbol("http connection version"),
|
||||||
kRetryHandlerDefaultRetry: Symbol("retry agent default retry"),
|
kRetryHandlerDefaultRetry: /* @__PURE__ */ Symbol("retry agent default retry"),
|
||||||
kConstruct: Symbol("constructable")
|
kConstruct: /* @__PURE__ */ Symbol("constructable")
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -3585,7 +3572,7 @@ var require_constants2 = __commonJS({
|
|||||||
var require_global = __commonJS({
|
var require_global = __commonJS({
|
||||||
"node_modules/@actions/http-client/node_modules/undici/lib/fetch/global.js"(exports2, module2) {
|
"node_modules/@actions/http-client/node_modules/undici/lib/fetch/global.js"(exports2, module2) {
|
||||||
"use strict";
|
"use strict";
|
||||||
var globalOrigin = Symbol.for("undici.globalOrigin.1");
|
var globalOrigin = /* @__PURE__ */ Symbol.for("undici.globalOrigin.1");
|
||||||
function getGlobalOrigin() {
|
function getGlobalOrigin() {
|
||||||
return globalThis[globalOrigin];
|
return globalThis[globalOrigin];
|
||||||
}
|
}
|
||||||
@@ -4237,12 +4224,12 @@ var require_symbols2 = __commonJS({
|
|||||||
"node_modules/@actions/http-client/node_modules/undici/lib/fetch/symbols.js"(exports2, module2) {
|
"node_modules/@actions/http-client/node_modules/undici/lib/fetch/symbols.js"(exports2, module2) {
|
||||||
"use strict";
|
"use strict";
|
||||||
module2.exports = {
|
module2.exports = {
|
||||||
kUrl: Symbol("url"),
|
kUrl: /* @__PURE__ */ Symbol("url"),
|
||||||
kHeaders: Symbol("headers"),
|
kHeaders: /* @__PURE__ */ Symbol("headers"),
|
||||||
kSignal: Symbol("signal"),
|
kSignal: /* @__PURE__ */ Symbol("signal"),
|
||||||
kState: Symbol("state"),
|
kState: /* @__PURE__ */ Symbol("state"),
|
||||||
kGuard: Symbol("guard"),
|
kGuard: /* @__PURE__ */ Symbol("guard"),
|
||||||
kRealm: Symbol("realm")
|
kRealm: /* @__PURE__ */ Symbol("realm")
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -5635,7 +5622,7 @@ var require_request = __commonJS({
|
|||||||
var tokenRegExp = /^[\^_`a-zA-Z\-0-9!#$%&'*+.|~]+$/;
|
var tokenRegExp = /^[\^_`a-zA-Z\-0-9!#$%&'*+.|~]+$/;
|
||||||
var headerCharRegex = /[^\t\x20-\x7e\x80-\xff]/;
|
var headerCharRegex = /[^\t\x20-\x7e\x80-\xff]/;
|
||||||
var invalidPathRegex = /[^\u0021-\u00ff]/;
|
var invalidPathRegex = /[^\u0021-\u00ff]/;
|
||||||
var kHandler = Symbol("handler");
|
var kHandler = /* @__PURE__ */ Symbol("handler");
|
||||||
var channels = {};
|
var channels = {};
|
||||||
var extractBody;
|
var extractBody;
|
||||||
try {
|
try {
|
||||||
@@ -6022,11 +6009,11 @@ var require_dispatcher_base = __commonJS({
|
|||||||
InvalidArgumentError
|
InvalidArgumentError
|
||||||
} = require_errors();
|
} = require_errors();
|
||||||
var { kDestroy, kClose, kDispatch, kInterceptors } = require_symbols();
|
var { kDestroy, kClose, kDispatch, kInterceptors } = require_symbols();
|
||||||
var kDestroyed = Symbol("destroyed");
|
var kDestroyed = /* @__PURE__ */ Symbol("destroyed");
|
||||||
var kClosed = Symbol("closed");
|
var kClosed = /* @__PURE__ */ Symbol("closed");
|
||||||
var kOnDestroyed = Symbol("onDestroyed");
|
var kOnDestroyed = /* @__PURE__ */ Symbol("onDestroyed");
|
||||||
var kOnClosed = Symbol("onClosed");
|
var kOnClosed = /* @__PURE__ */ Symbol("onClosed");
|
||||||
var kInterceptedDispatch = Symbol("Intercepted Dispatch");
|
var kInterceptedDispatch = /* @__PURE__ */ Symbol("Intercepted Dispatch");
|
||||||
var DispatcherBase = class extends Dispatcher {
|
var DispatcherBase = class extends Dispatcher {
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
@@ -6681,7 +6668,7 @@ var require_RedirectHandler = __commonJS({
|
|||||||
var { InvalidArgumentError } = require_errors();
|
var { InvalidArgumentError } = require_errors();
|
||||||
var EE = require("events");
|
var EE = require("events");
|
||||||
var redirectableStatusCodes = [300, 301, 302, 303, 307, 308];
|
var redirectableStatusCodes = [300, 301, 302, 303, 307, 308];
|
||||||
var kBody = Symbol("body");
|
var kBody = /* @__PURE__ */ Symbol("body");
|
||||||
var BodyAsyncIterable = class {
|
var BodyAsyncIterable = class {
|
||||||
constructor(body) {
|
constructor(body) {
|
||||||
this[kBody] = body;
|
this[kBody] = body;
|
||||||
@@ -6955,7 +6942,7 @@ var require_client = __commonJS({
|
|||||||
} = http2;
|
} = http2;
|
||||||
var h2ExperimentalWarned = false;
|
var h2ExperimentalWarned = false;
|
||||||
var FastBuffer = Buffer[Symbol.species];
|
var FastBuffer = Buffer[Symbol.species];
|
||||||
var kClosedResolve = Symbol("kClosedResolve");
|
var kClosedResolve = /* @__PURE__ */ Symbol("kClosedResolve");
|
||||||
var channels = {};
|
var channels = {};
|
||||||
try {
|
try {
|
||||||
const diagnosticsChannel = require("diagnostics_channel");
|
const diagnosticsChannel = require("diagnostics_channel");
|
||||||
@@ -8625,7 +8612,7 @@ var require_fixed_queue = __commonJS({
|
|||||||
var require_pool_stats = __commonJS({
|
var require_pool_stats = __commonJS({
|
||||||
"node_modules/@actions/http-client/node_modules/undici/lib/pool-stats.js"(exports2, module2) {
|
"node_modules/@actions/http-client/node_modules/undici/lib/pool-stats.js"(exports2, module2) {
|
||||||
var { kFree, kConnected, kPending, kQueued, kRunning, kSize } = require_symbols();
|
var { kFree, kConnected, kPending, kQueued, kRunning, kSize } = require_symbols();
|
||||||
var kPool = Symbol("pool");
|
var kPool = /* @__PURE__ */ Symbol("pool");
|
||||||
var PoolStats = class {
|
var PoolStats = class {
|
||||||
constructor(pool) {
|
constructor(pool) {
|
||||||
this[kPool] = pool;
|
this[kPool] = pool;
|
||||||
@@ -8661,18 +8648,18 @@ var require_pool_base = __commonJS({
|
|||||||
var FixedQueue = require_fixed_queue();
|
var FixedQueue = require_fixed_queue();
|
||||||
var { kConnected, kSize, kRunning, kPending, kQueued, kBusy, kFree, kUrl, kClose, kDestroy, kDispatch } = require_symbols();
|
var { kConnected, kSize, kRunning, kPending, kQueued, kBusy, kFree, kUrl, kClose, kDestroy, kDispatch } = require_symbols();
|
||||||
var PoolStats = require_pool_stats();
|
var PoolStats = require_pool_stats();
|
||||||
var kClients = Symbol("clients");
|
var kClients = /* @__PURE__ */ Symbol("clients");
|
||||||
var kNeedDrain = Symbol("needDrain");
|
var kNeedDrain = /* @__PURE__ */ Symbol("needDrain");
|
||||||
var kQueue = Symbol("queue");
|
var kQueue = /* @__PURE__ */ Symbol("queue");
|
||||||
var kClosedResolve = Symbol("closed resolve");
|
var kClosedResolve = /* @__PURE__ */ Symbol("closed resolve");
|
||||||
var kOnDrain = Symbol("onDrain");
|
var kOnDrain = /* @__PURE__ */ Symbol("onDrain");
|
||||||
var kOnConnect = Symbol("onConnect");
|
var kOnConnect = /* @__PURE__ */ Symbol("onConnect");
|
||||||
var kOnDisconnect = Symbol("onDisconnect");
|
var kOnDisconnect = /* @__PURE__ */ Symbol("onDisconnect");
|
||||||
var kOnConnectionError = Symbol("onConnectionError");
|
var kOnConnectionError = /* @__PURE__ */ Symbol("onConnectionError");
|
||||||
var kGetDispatcher = Symbol("get dispatcher");
|
var kGetDispatcher = /* @__PURE__ */ Symbol("get dispatcher");
|
||||||
var kAddClient = Symbol("add client");
|
var kAddClient = /* @__PURE__ */ Symbol("add client");
|
||||||
var kRemoveClient = Symbol("remove client");
|
var kRemoveClient = /* @__PURE__ */ Symbol("remove client");
|
||||||
var kStats = Symbol("stats");
|
var kStats = /* @__PURE__ */ Symbol("stats");
|
||||||
var PoolBase = class extends DispatcherBase {
|
var PoolBase = class extends DispatcherBase {
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
@@ -8826,9 +8813,9 @@ var require_pool = __commonJS({
|
|||||||
var util = require_util();
|
var util = require_util();
|
||||||
var { kUrl, kInterceptors } = require_symbols();
|
var { kUrl, kInterceptors } = require_symbols();
|
||||||
var buildConnector = require_connect();
|
var buildConnector = require_connect();
|
||||||
var kOptions = Symbol("options");
|
var kOptions = /* @__PURE__ */ Symbol("options");
|
||||||
var kConnections = Symbol("connections");
|
var kConnections = /* @__PURE__ */ Symbol("connections");
|
||||||
var kFactory = Symbol("factory");
|
var kFactory = /* @__PURE__ */ Symbol("factory");
|
||||||
function defaultFactory(origin, opts) {
|
function defaultFactory(origin, opts) {
|
||||||
return new Client(origin, opts);
|
return new Client(origin, opts);
|
||||||
}
|
}
|
||||||
@@ -8917,14 +8904,14 @@ var require_balanced_pool = __commonJS({
|
|||||||
var Pool = require_pool();
|
var Pool = require_pool();
|
||||||
var { kUrl, kInterceptors } = require_symbols();
|
var { kUrl, kInterceptors } = require_symbols();
|
||||||
var { parseOrigin } = require_util();
|
var { parseOrigin } = require_util();
|
||||||
var kFactory = Symbol("factory");
|
var kFactory = /* @__PURE__ */ Symbol("factory");
|
||||||
var kOptions = Symbol("options");
|
var kOptions = /* @__PURE__ */ Symbol("options");
|
||||||
var kGreatestCommonDivisor = Symbol("kGreatestCommonDivisor");
|
var kGreatestCommonDivisor = /* @__PURE__ */ Symbol("kGreatestCommonDivisor");
|
||||||
var kCurrentWeight = Symbol("kCurrentWeight");
|
var kCurrentWeight = /* @__PURE__ */ Symbol("kCurrentWeight");
|
||||||
var kIndex = Symbol("kIndex");
|
var kIndex = /* @__PURE__ */ Symbol("kIndex");
|
||||||
var kWeight = Symbol("kWeight");
|
var kWeight = /* @__PURE__ */ Symbol("kWeight");
|
||||||
var kMaxWeightPerServer = Symbol("kMaxWeightPerServer");
|
var kMaxWeightPerServer = /* @__PURE__ */ Symbol("kMaxWeightPerServer");
|
||||||
var kErrorPenalty = Symbol("kErrorPenalty");
|
var kErrorPenalty = /* @__PURE__ */ Symbol("kErrorPenalty");
|
||||||
function getGreatestCommonDivisor(a, b) {
|
function getGreatestCommonDivisor(a, b) {
|
||||||
if (b === 0) return a;
|
if (b === 0) return a;
|
||||||
return getGreatestCommonDivisor(b, a % b);
|
return getGreatestCommonDivisor(b, a % b);
|
||||||
@@ -9087,14 +9074,14 @@ var require_agent = __commonJS({
|
|||||||
var util = require_util();
|
var util = require_util();
|
||||||
var createRedirectInterceptor = require_redirectInterceptor();
|
var createRedirectInterceptor = require_redirectInterceptor();
|
||||||
var { WeakRef: WeakRef2, FinalizationRegistry } = require_dispatcher_weakref()();
|
var { WeakRef: WeakRef2, FinalizationRegistry } = require_dispatcher_weakref()();
|
||||||
var kOnConnect = Symbol("onConnect");
|
var kOnConnect = /* @__PURE__ */ Symbol("onConnect");
|
||||||
var kOnDisconnect = Symbol("onDisconnect");
|
var kOnDisconnect = /* @__PURE__ */ Symbol("onDisconnect");
|
||||||
var kOnConnectionError = Symbol("onConnectionError");
|
var kOnConnectionError = /* @__PURE__ */ Symbol("onConnectionError");
|
||||||
var kMaxRedirections = Symbol("maxRedirections");
|
var kMaxRedirections = /* @__PURE__ */ Symbol("maxRedirections");
|
||||||
var kOnDrain = Symbol("onDrain");
|
var kOnDrain = /* @__PURE__ */ Symbol("onDrain");
|
||||||
var kFactory = Symbol("factory");
|
var kFactory = /* @__PURE__ */ Symbol("factory");
|
||||||
var kFinalizer = Symbol("finalizer");
|
var kFinalizer = /* @__PURE__ */ Symbol("finalizer");
|
||||||
var kOptions = Symbol("options");
|
var kOptions = /* @__PURE__ */ Symbol("options");
|
||||||
function defaultFactory(origin, opts) {
|
function defaultFactory(origin, opts) {
|
||||||
return opts && opts.connections === 1 ? new Client(origin, opts) : new Pool(origin, opts);
|
return opts && opts.connections === 1 ? new Client(origin, opts) : new Pool(origin, opts);
|
||||||
}
|
}
|
||||||
@@ -9203,12 +9190,12 @@ var require_readable = __commonJS({
|
|||||||
var util = require_util();
|
var util = require_util();
|
||||||
var { ReadableStreamFrom, toUSVString } = require_util();
|
var { ReadableStreamFrom, toUSVString } = require_util();
|
||||||
var Blob2;
|
var Blob2;
|
||||||
var kConsume = Symbol("kConsume");
|
var kConsume = /* @__PURE__ */ Symbol("kConsume");
|
||||||
var kReading = Symbol("kReading");
|
var kReading = /* @__PURE__ */ Symbol("kReading");
|
||||||
var kBody = Symbol("kBody");
|
var kBody = /* @__PURE__ */ Symbol("kBody");
|
||||||
var kAbort = Symbol("abort");
|
var kAbort = /* @__PURE__ */ Symbol("abort");
|
||||||
var kContentType = Symbol("kContentType");
|
var kContentType = /* @__PURE__ */ Symbol("kContentType");
|
||||||
var noop = () => {
|
var noop2 = () => {
|
||||||
};
|
};
|
||||||
module2.exports = class BodyReadable extends Readable {
|
module2.exports = class BodyReadable extends Readable {
|
||||||
constructor({
|
constructor({
|
||||||
@@ -9330,7 +9317,7 @@ var require_readable = __commonJS({
|
|||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
const signalListenerCleanup = signal ? util.addAbortListener(signal, () => {
|
const signalListenerCleanup = signal ? util.addAbortListener(signal, () => {
|
||||||
this.destroy();
|
this.destroy();
|
||||||
}) : noop;
|
}) : noop2;
|
||||||
this.on("close", function() {
|
this.on("close", function() {
|
||||||
signalListenerCleanup();
|
signalListenerCleanup();
|
||||||
if (signal && signal.aborted) {
|
if (signal && signal.aborted) {
|
||||||
@@ -9338,7 +9325,7 @@ var require_readable = __commonJS({
|
|||||||
} else {
|
} else {
|
||||||
resolve(null);
|
resolve(null);
|
||||||
}
|
}
|
||||||
}).on("error", noop).on("data", function(chunk) {
|
}).on("error", noop2).on("data", function(chunk) {
|
||||||
limit -= chunk.length;
|
limit -= chunk.length;
|
||||||
if (limit <= 0) {
|
if (limit <= 0) {
|
||||||
this.destroy();
|
this.destroy();
|
||||||
@@ -9493,8 +9480,8 @@ var require_abort_signal = __commonJS({
|
|||||||
"node_modules/@actions/http-client/node_modules/undici/lib/api/abort-signal.js"(exports2, module2) {
|
"node_modules/@actions/http-client/node_modules/undici/lib/api/abort-signal.js"(exports2, module2) {
|
||||||
var { addAbortListener } = require_util();
|
var { addAbortListener } = require_util();
|
||||||
var { RequestAbortedError } = require_errors();
|
var { RequestAbortedError } = require_errors();
|
||||||
var kListener = Symbol("kListener");
|
var kListener = /* @__PURE__ */ Symbol("kListener");
|
||||||
var kSignal = Symbol("kSignal");
|
var kSignal = /* @__PURE__ */ Symbol("kSignal");
|
||||||
function abort(self) {
|
function abort(self) {
|
||||||
if (self.abort) {
|
if (self.abort) {
|
||||||
self.abort();
|
self.abort();
|
||||||
@@ -9883,7 +9870,7 @@ var require_api_pipeline = __commonJS({
|
|||||||
var { AsyncResource } = require("async_hooks");
|
var { AsyncResource } = require("async_hooks");
|
||||||
var { addSignal, removeSignal } = require_abort_signal();
|
var { addSignal, removeSignal } = require_abort_signal();
|
||||||
var assert = require("assert");
|
var assert = require("assert");
|
||||||
var kResume = Symbol("resume");
|
var kResume = /* @__PURE__ */ Symbol("resume");
|
||||||
var PipelineRequest = class extends Readable {
|
var PipelineRequest = class extends Readable {
|
||||||
constructor() {
|
constructor() {
|
||||||
super({ autoDestroy: true });
|
super({ autoDestroy: true });
|
||||||
@@ -10277,25 +10264,25 @@ var require_mock_symbols = __commonJS({
|
|||||||
"node_modules/@actions/http-client/node_modules/undici/lib/mock/mock-symbols.js"(exports2, module2) {
|
"node_modules/@actions/http-client/node_modules/undici/lib/mock/mock-symbols.js"(exports2, module2) {
|
||||||
"use strict";
|
"use strict";
|
||||||
module2.exports = {
|
module2.exports = {
|
||||||
kAgent: Symbol("agent"),
|
kAgent: /* @__PURE__ */ Symbol("agent"),
|
||||||
kOptions: Symbol("options"),
|
kOptions: /* @__PURE__ */ Symbol("options"),
|
||||||
kFactory: Symbol("factory"),
|
kFactory: /* @__PURE__ */ Symbol("factory"),
|
||||||
kDispatches: Symbol("dispatches"),
|
kDispatches: /* @__PURE__ */ Symbol("dispatches"),
|
||||||
kDispatchKey: Symbol("dispatch key"),
|
kDispatchKey: /* @__PURE__ */ Symbol("dispatch key"),
|
||||||
kDefaultHeaders: Symbol("default headers"),
|
kDefaultHeaders: /* @__PURE__ */ Symbol("default headers"),
|
||||||
kDefaultTrailers: Symbol("default trailers"),
|
kDefaultTrailers: /* @__PURE__ */ Symbol("default trailers"),
|
||||||
kContentLength: Symbol("content length"),
|
kContentLength: /* @__PURE__ */ Symbol("content length"),
|
||||||
kMockAgent: Symbol("mock agent"),
|
kMockAgent: /* @__PURE__ */ Symbol("mock agent"),
|
||||||
kMockAgentSet: Symbol("mock agent set"),
|
kMockAgentSet: /* @__PURE__ */ Symbol("mock agent set"),
|
||||||
kMockAgentGet: Symbol("mock agent get"),
|
kMockAgentGet: /* @__PURE__ */ Symbol("mock agent get"),
|
||||||
kMockDispatch: Symbol("mock dispatch"),
|
kMockDispatch: /* @__PURE__ */ Symbol("mock dispatch"),
|
||||||
kClose: Symbol("close"),
|
kClose: /* @__PURE__ */ Symbol("close"),
|
||||||
kOriginalClose: Symbol("original agent close"),
|
kOriginalClose: /* @__PURE__ */ Symbol("original agent close"),
|
||||||
kOrigin: Symbol("origin"),
|
kOrigin: /* @__PURE__ */ Symbol("origin"),
|
||||||
kIsMockActive: Symbol("is mock active"),
|
kIsMockActive: /* @__PURE__ */ Symbol("is mock active"),
|
||||||
kNetConnect: Symbol("net connect"),
|
kNetConnect: /* @__PURE__ */ Symbol("net connect"),
|
||||||
kGetNetConnect: Symbol("get net connect"),
|
kGetNetConnect: /* @__PURE__ */ Symbol("get net connect"),
|
||||||
kConnected: Symbol("connected")
|
kConnected: /* @__PURE__ */ Symbol("connected")
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -11067,12 +11054,12 @@ var require_proxy_agent = __commonJS({
|
|||||||
var DispatcherBase = require_dispatcher_base();
|
var DispatcherBase = require_dispatcher_base();
|
||||||
var { InvalidArgumentError, RequestAbortedError } = require_errors();
|
var { InvalidArgumentError, RequestAbortedError } = require_errors();
|
||||||
var buildConnector = require_connect();
|
var buildConnector = require_connect();
|
||||||
var kAgent = Symbol("proxy agent");
|
var kAgent = /* @__PURE__ */ Symbol("proxy agent");
|
||||||
var kClient = Symbol("proxy client");
|
var kClient = /* @__PURE__ */ Symbol("proxy client");
|
||||||
var kProxyHeaders = Symbol("proxy headers");
|
var kProxyHeaders = /* @__PURE__ */ Symbol("proxy headers");
|
||||||
var kRequestTls = Symbol("request tls settings");
|
var kRequestTls = /* @__PURE__ */ Symbol("request tls settings");
|
||||||
var kProxyTls = Symbol("proxy tls settings");
|
var kProxyTls = /* @__PURE__ */ Symbol("proxy tls settings");
|
||||||
var kConnectEndpoint = Symbol("connect endpoint function");
|
var kConnectEndpoint = /* @__PURE__ */ Symbol("connect endpoint function");
|
||||||
function defaultProtocolPort(protocol) {
|
function defaultProtocolPort(protocol) {
|
||||||
return protocol === "https:" ? 443 : 80;
|
return protocol === "https:" ? 443 : 80;
|
||||||
}
|
}
|
||||||
@@ -11479,7 +11466,7 @@ var require_RetryHandler = __commonJS({
|
|||||||
var require_global2 = __commonJS({
|
var require_global2 = __commonJS({
|
||||||
"node_modules/@actions/http-client/node_modules/undici/lib/global.js"(exports2, module2) {
|
"node_modules/@actions/http-client/node_modules/undici/lib/global.js"(exports2, module2) {
|
||||||
"use strict";
|
"use strict";
|
||||||
var globalDispatcher = Symbol.for("undici.globalDispatcher.1");
|
var globalDispatcher = /* @__PURE__ */ Symbol.for("undici.globalDispatcher.1");
|
||||||
var { InvalidArgumentError } = require_errors();
|
var { InvalidArgumentError } = require_errors();
|
||||||
var Agent = require_agent();
|
var Agent = require_agent();
|
||||||
if (getGlobalDispatcher() === void 0) {
|
if (getGlobalDispatcher() === void 0) {
|
||||||
@@ -11554,8 +11541,8 @@ var require_headers = __commonJS({
|
|||||||
var util = require("util");
|
var util = require("util");
|
||||||
var { webidl } = require_webidl();
|
var { webidl } = require_webidl();
|
||||||
var assert = require("assert");
|
var assert = require("assert");
|
||||||
var kHeadersMap = Symbol("headers map");
|
var kHeadersMap = /* @__PURE__ */ Symbol("headers map");
|
||||||
var kHeadersSortedMap = Symbol("headers map sorted");
|
var kHeadersSortedMap = /* @__PURE__ */ Symbol("headers map sorted");
|
||||||
function isHTTPWhiteSpaceCharCode(code) {
|
function isHTTPWhiteSpaceCharCode(code) {
|
||||||
return code === 10 || code === 13 || code === 9 || code === 32;
|
return code === 10 || code === 13 || code === 9 || code === 32;
|
||||||
}
|
}
|
||||||
@@ -11882,7 +11869,7 @@ var require_headers = __commonJS({
|
|||||||
callbackFn.apply(thisArg, [value, key, this]);
|
callbackFn.apply(thisArg, [value, key, this]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
[Symbol.for("nodejs.util.inspect.custom")]() {
|
[/* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom")]() {
|
||||||
webidl.brandCheck(this, _Headers);
|
webidl.brandCheck(this, _Headers);
|
||||||
return this[kHeadersList];
|
return this[kHeadersList];
|
||||||
}
|
}
|
||||||
@@ -12342,7 +12329,7 @@ var require_request2 = __commonJS({
|
|||||||
var assert = require("assert");
|
var assert = require("assert");
|
||||||
var { getMaxListeners, setMaxListeners, getEventListeners, defaultMaxListeners } = require("events");
|
var { getMaxListeners, setMaxListeners, getEventListeners, defaultMaxListeners } = require("events");
|
||||||
var TransformStream = globalThis.TransformStream;
|
var TransformStream = globalThis.TransformStream;
|
||||||
var kAbortController = Symbol("abortController");
|
var kAbortController = /* @__PURE__ */ Symbol("abortController");
|
||||||
var requestFinalizer = new FinalizationRegistry(({ signal, abort }) => {
|
var requestFinalizer = new FinalizationRegistry(({ signal, abort }) => {
|
||||||
signal.removeEventListener("abort", abort);
|
signal.removeEventListener("abort", abort);
|
||||||
});
|
});
|
||||||
@@ -13988,12 +13975,12 @@ var require_symbols3 = __commonJS({
|
|||||||
"node_modules/@actions/http-client/node_modules/undici/lib/fileapi/symbols.js"(exports2, module2) {
|
"node_modules/@actions/http-client/node_modules/undici/lib/fileapi/symbols.js"(exports2, module2) {
|
||||||
"use strict";
|
"use strict";
|
||||||
module2.exports = {
|
module2.exports = {
|
||||||
kState: Symbol("FileReader state"),
|
kState: /* @__PURE__ */ Symbol("FileReader state"),
|
||||||
kResult: Symbol("FileReader result"),
|
kResult: /* @__PURE__ */ Symbol("FileReader result"),
|
||||||
kError: Symbol("FileReader error"),
|
kError: /* @__PURE__ */ Symbol("FileReader error"),
|
||||||
kLastProgressEventFired: Symbol("FileReader last progress event fired timestamp"),
|
kLastProgressEventFired: /* @__PURE__ */ Symbol("FileReader last progress event fired timestamp"),
|
||||||
kEvents: Symbol("FileReader events"),
|
kEvents: /* @__PURE__ */ Symbol("FileReader events"),
|
||||||
kAborted: Symbol("FileReader aborted")
|
kAborted: /* @__PURE__ */ Symbol("FileReader aborted")
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -14003,7 +13990,7 @@ var require_progressevent = __commonJS({
|
|||||||
"node_modules/@actions/http-client/node_modules/undici/lib/fileapi/progressevent.js"(exports2, module2) {
|
"node_modules/@actions/http-client/node_modules/undici/lib/fileapi/progressevent.js"(exports2, module2) {
|
||||||
"use strict";
|
"use strict";
|
||||||
var { webidl } = require_webidl();
|
var { webidl } = require_webidl();
|
||||||
var kState = Symbol("ProgressEvent state");
|
var kState = /* @__PURE__ */ Symbol("ProgressEvent state");
|
||||||
var ProgressEvent = class _ProgressEvent extends Event {
|
var ProgressEvent = class _ProgressEvent extends Event {
|
||||||
constructor(type, eventInitDict = {}) {
|
constructor(type, eventInitDict = {}) {
|
||||||
type = webidl.converters.DOMString(type);
|
type = webidl.converters.DOMString(type);
|
||||||
@@ -15953,14 +15940,14 @@ var require_symbols5 = __commonJS({
|
|||||||
"node_modules/@actions/http-client/node_modules/undici/lib/websocket/symbols.js"(exports2, module2) {
|
"node_modules/@actions/http-client/node_modules/undici/lib/websocket/symbols.js"(exports2, module2) {
|
||||||
"use strict";
|
"use strict";
|
||||||
module2.exports = {
|
module2.exports = {
|
||||||
kWebSocketURL: Symbol("url"),
|
kWebSocketURL: /* @__PURE__ */ Symbol("url"),
|
||||||
kReadyState: Symbol("ready state"),
|
kReadyState: /* @__PURE__ */ Symbol("ready state"),
|
||||||
kController: Symbol("controller"),
|
kController: /* @__PURE__ */ Symbol("controller"),
|
||||||
kResponse: Symbol("response"),
|
kResponse: /* @__PURE__ */ Symbol("response"),
|
||||||
kBinaryType: Symbol("binary type"),
|
kBinaryType: /* @__PURE__ */ Symbol("binary type"),
|
||||||
kSentClose: Symbol("sent close"),
|
kSentClose: /* @__PURE__ */ Symbol("sent close"),
|
||||||
kReceivedClose: Symbol("received close"),
|
kReceivedClose: /* @__PURE__ */ Symbol("received close"),
|
||||||
kByteParser: Symbol("byte parser")
|
kByteParser: /* @__PURE__ */ Symbol("byte parser")
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -17825,7 +17812,7 @@ var require_lib = __commonJS({
|
|||||||
}
|
}
|
||||||
const usingSsl = parsedUrl.protocol === "https:";
|
const usingSsl = parsedUrl.protocol === "https:";
|
||||||
proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && {
|
proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && {
|
||||||
token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}`
|
token: `${proxyUrl.username}:${proxyUrl.password}`
|
||||||
}));
|
}));
|
||||||
this._proxyAgentDispatcher = proxyAgent;
|
this._proxyAgentDispatcher = proxyAgent;
|
||||||
if (usingSsl && this._ignoreSslError) {
|
if (usingSsl && this._ignoreSslError) {
|
||||||
@@ -20089,7 +20076,7 @@ function isKeyOperator(operator) {
|
|||||||
function getValues(context, operator, key, modifier) {
|
function getValues(context, operator, key, modifier) {
|
||||||
var value = context[key], result = [];
|
var value = context[key], result = [];
|
||||||
if (isDefined(value) && value !== "") {
|
if (isDefined(value) && value !== "") {
|
||||||
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
|
if (typeof value === "string" || typeof value === "number" || typeof value === "bigint" || typeof value === "boolean") {
|
||||||
value = value.toString();
|
value = value.toString();
|
||||||
if (modifier && modifier !== "*") {
|
if (modifier && modifier !== "*") {
|
||||||
value = value.substring(0, parseInt(modifier, 10));
|
value = value.substring(0, parseInt(modifier, 10));
|
||||||
@@ -20270,6 +20257,92 @@ var endpoint = withDefaults(null, DEFAULTS);
|
|||||||
// node_modules/@octokit/request/dist-bundle/index.js
|
// node_modules/@octokit/request/dist-bundle/index.js
|
||||||
var import_fast_content_type_parse = __toESM(require_fast_content_type_parse(), 1);
|
var import_fast_content_type_parse = __toESM(require_fast_content_type_parse(), 1);
|
||||||
|
|
||||||
|
// node_modules/json-with-bigint/json-with-bigint.js
|
||||||
|
var intRegex = /^-?\d+$/;
|
||||||
|
var noiseValue = /^-?\d+n+$/;
|
||||||
|
var originalStringify = JSON.stringify;
|
||||||
|
var originalParse = JSON.parse;
|
||||||
|
var customFormat = /^-?\d+n$/;
|
||||||
|
var bigIntsStringify = /([\[:])?"(-?\d+)n"($|([\\n]|\s)*(\s|[\\n])*[,\}\]])/g;
|
||||||
|
var noiseStringify = /([\[:])?("-?\d+n+)n("$|"([\\n]|\s)*(\s|[\\n])*[,\}\]])/g;
|
||||||
|
var JSONStringify = (value, replacer, space) => {
|
||||||
|
if ("rawJSON" in JSON) {
|
||||||
|
return originalStringify(
|
||||||
|
value,
|
||||||
|
(key, value2) => {
|
||||||
|
if (typeof value2 === "bigint") return JSON.rawJSON(value2.toString());
|
||||||
|
if (typeof replacer === "function") return replacer(key, value2);
|
||||||
|
if (Array.isArray(replacer) && replacer.includes(key)) return value2;
|
||||||
|
return value2;
|
||||||
|
},
|
||||||
|
space
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (!value) return originalStringify(value, replacer, space);
|
||||||
|
const convertedToCustomJSON = originalStringify(
|
||||||
|
value,
|
||||||
|
(key, value2) => {
|
||||||
|
const isNoise = typeof value2 === "string" && Boolean(value2.match(noiseValue));
|
||||||
|
if (isNoise) return value2.toString() + "n";
|
||||||
|
if (typeof value2 === "bigint") return value2.toString() + "n";
|
||||||
|
if (typeof replacer === "function") return replacer(key, value2);
|
||||||
|
if (Array.isArray(replacer) && replacer.includes(key)) return value2;
|
||||||
|
return value2;
|
||||||
|
},
|
||||||
|
space
|
||||||
|
);
|
||||||
|
const processedJSON = convertedToCustomJSON.replace(
|
||||||
|
bigIntsStringify,
|
||||||
|
"$1$2$3"
|
||||||
|
);
|
||||||
|
const denoisedJSON = processedJSON.replace(noiseStringify, "$1$2$3");
|
||||||
|
return denoisedJSON;
|
||||||
|
};
|
||||||
|
var isContextSourceSupported = () => JSON.parse("1", (_, __, context) => !!context && context.source === "1");
|
||||||
|
var convertMarkedBigIntsReviver = (key, value, context, userReviver) => {
|
||||||
|
const isCustomFormatBigInt = typeof value === "string" && value.match(customFormat);
|
||||||
|
if (isCustomFormatBigInt) return BigInt(value.slice(0, -1));
|
||||||
|
const isNoiseValue = typeof value === "string" && value.match(noiseValue);
|
||||||
|
if (isNoiseValue) return value.slice(0, -1);
|
||||||
|
if (typeof userReviver !== "function") return value;
|
||||||
|
return userReviver(key, value, context);
|
||||||
|
};
|
||||||
|
var JSONParseV2 = (text, reviver) => {
|
||||||
|
return JSON.parse(text, (key, value, context) => {
|
||||||
|
const isBigNumber = typeof value === "number" && (value > Number.MAX_SAFE_INTEGER || value < Number.MIN_SAFE_INTEGER);
|
||||||
|
const isInt = context && intRegex.test(context.source);
|
||||||
|
const isBigInt = isBigNumber && isInt;
|
||||||
|
if (isBigInt) return BigInt(context.source);
|
||||||
|
if (typeof reviver !== "function") return value;
|
||||||
|
return reviver(key, value, context);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
var MAX_INT = Number.MAX_SAFE_INTEGER.toString();
|
||||||
|
var MAX_DIGITS = MAX_INT.length;
|
||||||
|
var stringsOrLargeNumbers = /"(?:\\.|[^"])*"|-?(0|[1-9][0-9]*)(\.[0-9]+)?([eE][+-]?[0-9]+)?/g;
|
||||||
|
var noiseValueWithQuotes = /^"-?\d+n+"$/;
|
||||||
|
var JSONParse = (text, reviver) => {
|
||||||
|
if (!text) return originalParse(text, reviver);
|
||||||
|
if (isContextSourceSupported()) return JSONParseV2(text, reviver);
|
||||||
|
const serializedData = text.replace(
|
||||||
|
stringsOrLargeNumbers,
|
||||||
|
(text2, digits, fractional, exponential) => {
|
||||||
|
const isString = text2[0] === '"';
|
||||||
|
const isNoise = isString && Boolean(text2.match(noiseValueWithQuotes));
|
||||||
|
if (isNoise) return text2.substring(0, text2.length - 1) + 'n"';
|
||||||
|
const isFractionalOrExponential = fractional || exponential;
|
||||||
|
const isLessThanMaxSafeInt = digits && (digits.length < MAX_DIGITS || digits.length === MAX_DIGITS && digits <= MAX_INT);
|
||||||
|
if (isString || isFractionalOrExponential || isLessThanMaxSafeInt)
|
||||||
|
return text2;
|
||||||
|
return '"' + text2 + 'n"';
|
||||||
|
}
|
||||||
|
);
|
||||||
|
return originalParse(
|
||||||
|
serializedData,
|
||||||
|
(key, value, context) => convertMarkedBigIntsReviver(key, value, context, reviver)
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
// node_modules/@octokit/request-error/dist-src/index.js
|
// node_modules/@octokit/request-error/dist-src/index.js
|
||||||
var RequestError = class extends Error {
|
var RequestError = class extends Error {
|
||||||
name;
|
name;
|
||||||
@@ -20286,7 +20359,7 @@ var RequestError = class extends Error {
|
|||||||
*/
|
*/
|
||||||
response;
|
response;
|
||||||
constructor(message, statusCode, options) {
|
constructor(message, statusCode, options) {
|
||||||
super(message);
|
super(message, { cause: options.cause });
|
||||||
this.name = "HttpError";
|
this.name = "HttpError";
|
||||||
this.status = Number.parseInt(statusCode);
|
this.status = Number.parseInt(statusCode);
|
||||||
if (Number.isNaN(this.status)) {
|
if (Number.isNaN(this.status)) {
|
||||||
@@ -20310,7 +20383,7 @@ var RequestError = class extends Error {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// node_modules/@octokit/request/dist-bundle/index.js
|
// node_modules/@octokit/request/dist-bundle/index.js
|
||||||
var VERSION2 = "9.2.4";
|
var VERSION2 = "10.0.8";
|
||||||
var defaults_default = {
|
var defaults_default = {
|
||||||
headers: {
|
headers: {
|
||||||
"user-agent": `octokit-request.js/${VERSION2} ${getUserAgent()}`
|
"user-agent": `octokit-request.js/${VERSION2} ${getUserAgent()}`
|
||||||
@@ -20324,6 +20397,7 @@ function isPlainObject2(value) {
|
|||||||
const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor;
|
const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor;
|
||||||
return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);
|
return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);
|
||||||
}
|
}
|
||||||
|
var noop = () => "";
|
||||||
async function fetchWrapper(requestOptions) {
|
async function fetchWrapper(requestOptions) {
|
||||||
const fetch = requestOptions.request?.fetch || globalThis.fetch;
|
const fetch = requestOptions.request?.fetch || globalThis.fetch;
|
||||||
if (!fetch) {
|
if (!fetch) {
|
||||||
@@ -20333,7 +20407,7 @@ async function fetchWrapper(requestOptions) {
|
|||||||
}
|
}
|
||||||
const log = requestOptions.request?.log || console;
|
const log = requestOptions.request?.log || console;
|
||||||
const parseSuccessResponseBody = requestOptions.request?.parseSuccessResponseBody !== false;
|
const parseSuccessResponseBody = requestOptions.request?.parseSuccessResponseBody !== false;
|
||||||
const body = isPlainObject2(requestOptions.body) || Array.isArray(requestOptions.body) ? JSON.stringify(requestOptions.body) : requestOptions.body;
|
const body = isPlainObject2(requestOptions.body) || Array.isArray(requestOptions.body) ? JSONStringify(requestOptions.body) : requestOptions.body;
|
||||||
const requestHeaders = Object.fromEntries(
|
const requestHeaders = Object.fromEntries(
|
||||||
Object.entries(requestOptions.headers).map(([name, value]) => [
|
Object.entries(requestOptions.headers).map(([name, value]) => [
|
||||||
name,
|
name,
|
||||||
@@ -20425,21 +20499,24 @@ async function fetchWrapper(requestOptions) {
|
|||||||
async function getResponseData(response) {
|
async function getResponseData(response) {
|
||||||
const contentType = response.headers.get("content-type");
|
const contentType = response.headers.get("content-type");
|
||||||
if (!contentType) {
|
if (!contentType) {
|
||||||
return response.text().catch(() => "");
|
return response.text().catch(noop);
|
||||||
}
|
}
|
||||||
const mimetype = (0, import_fast_content_type_parse.safeParse)(contentType);
|
const mimetype = (0, import_fast_content_type_parse.safeParse)(contentType);
|
||||||
if (isJSONResponse(mimetype)) {
|
if (isJSONResponse(mimetype)) {
|
||||||
let text = "";
|
let text = "";
|
||||||
try {
|
try {
|
||||||
text = await response.text();
|
text = await response.text();
|
||||||
return JSON.parse(text);
|
return JSONParse(text);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
} else if (mimetype.type.startsWith("text/") || mimetype.parameters.charset?.toLowerCase() === "utf-8") {
|
} else if (mimetype.type.startsWith("text/") || mimetype.parameters.charset?.toLowerCase() === "utf-8") {
|
||||||
return response.text().catch(() => "");
|
return response.text().catch(noop);
|
||||||
} else {
|
} else {
|
||||||
return response.arrayBuffer().catch(() => new ArrayBuffer(0));
|
return response.arrayBuffer().catch(
|
||||||
|
/* v8 ignore next -- @preserve */
|
||||||
|
() => new ArrayBuffer(0)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function isJSONResponse(mimetype) {
|
function isJSONResponse(mimetype) {
|
||||||
@@ -20526,4 +20603,11 @@ undici/lib/fetch/body.js:
|
|||||||
|
|
||||||
undici/lib/websocket/frame.js:
|
undici/lib/websocket/frame.js:
|
||||||
(*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> *)
|
(*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> *)
|
||||||
|
|
||||||
|
@octokit/request-error/dist-src/index.js:
|
||||||
|
(* v8 ignore else -- @preserve -- Bug with vitest coverage where it sees an else branch that doesn't exist *)
|
||||||
|
|
||||||
|
@octokit/request/dist-bundle/index.js:
|
||||||
|
(* v8 ignore next -- @preserve *)
|
||||||
|
(* v8 ignore else -- @preserve *)
|
||||||
*/
|
*/
|
||||||
|
|||||||
10
lib/main.js
10
lib/main.js
@@ -89,12 +89,12 @@ export async function main(
|
|||||||
permissions
|
permissions
|
||||||
),
|
),
|
||||||
{
|
{
|
||||||
shouldRetry: (error) => error.status >= 500,
|
shouldRetry: ({ error }) => error.status >= 500,
|
||||||
onFailedAttempt: (error) => {
|
onFailedAttempt: (context) => {
|
||||||
core.info(
|
core.info(
|
||||||
`Failed to create token for "${parsedRepositoryNames.join(
|
`Failed to create token for "${parsedRepositoryNames.join(
|
||||||
","
|
","
|
||||||
)}" (attempt ${error.attemptNumber}): ${error.message}`
|
)}" (attempt ${context.attemptNumber}): ${context.error.message}`
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
retries: 3,
|
retries: 3,
|
||||||
@@ -105,9 +105,9 @@ export async function main(
|
|||||||
({ authentication, installationId, appSlug } = await pRetry(
|
({ authentication, installationId, appSlug } = await pRetry(
|
||||||
() => getTokenFromOwner(request, auth, parsedOwner, permissions),
|
() => getTokenFromOwner(request, auth, parsedOwner, permissions),
|
||||||
{
|
{
|
||||||
onFailedAttempt: (error) => {
|
onFailedAttempt: (context) => {
|
||||||
core.info(
|
core.info(
|
||||||
`Failed to create token for "${parsedOwner}" (attempt ${error.attemptNumber}): ${error.message}`
|
`Failed to create token for "${parsedOwner}" (attempt ${context.attemptNumber}): ${context.error.message}`
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
retries: 3,
|
retries: 3,
|
||||||
|
|||||||
2769
package-lock.json
generated
2769
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
24
package.json
24
package.json
@@ -2,35 +2,33 @@
|
|||||||
"name": "create-github-app-token",
|
"name": "create-github-app-token",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "3.0.0-beta.3",
|
"version": "3.0.0-beta.5",
|
||||||
"description": "GitHub Action for creating a GitHub App Installation Access Token",
|
"description": "GitHub Action for creating a GitHub App Installation Access Token",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=24.4.0"
|
"node": ">=24.4.0"
|
||||||
},
|
},
|
||||||
|
"packageManager": "npm@10.9.4",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "esbuild main.js post.js --bundle --outdir=dist --out-extension:.js=.cjs --platform=node --packages=bundle",
|
"build": "esbuild main.js post.js --bundle --outdir=dist --out-extension:.js=.cjs --platform=node --packages=bundle",
|
||||||
"test": "c8 --100 ava tests/index.js",
|
"test": "c8 --100 node --test tests/index.js",
|
||||||
"coverage": "c8 report --reporter html",
|
"coverage": "c8 report --reporter html",
|
||||||
"postcoverage": "open-cli coverage/index.html"
|
"postcoverage": "open-cli coverage/index.html"
|
||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.11.1",
|
"@actions/core": "^1.11.1",
|
||||||
"@octokit/auth-app": "^7.2.1",
|
"@octokit/auth-app": "^8.1.2",
|
||||||
"@octokit/request": "^9.2.2",
|
"@octokit/request": "^10.0.3",
|
||||||
"p-retry": "^6.2.1"
|
"p-retry": "^7.1.0",
|
||||||
|
"undici": "^7.16.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@octokit/openapi": "^19.1.0",
|
"@octokit/openapi": "^21.0.0",
|
||||||
"@sinonjs/fake-timers": "^14.0.0",
|
|
||||||
"ava": "^6.4.1",
|
|
||||||
"c8": "^10.1.3",
|
"c8": "^10.1.3",
|
||||||
"dotenv": "^17.2.1",
|
"dotenv": "^17.3.1",
|
||||||
"esbuild": "^0.25.8",
|
"esbuild": "^0.27.3",
|
||||||
"execa": "^9.6.0",
|
|
||||||
"open-cli": "^8.0.0",
|
"open-cli": "^8.0.0",
|
||||||
"undici": "^7.13.0",
|
"yaml": "^2.8.2"
|
||||||
"yaml": "^2.8.1"
|
|
||||||
},
|
},
|
||||||
"release": {
|
"release": {
|
||||||
"branches": [
|
"branches": [
|
||||||
|
|||||||
@@ -187,6 +187,14 @@
|
|||||||
"write"
|
"write"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"custom_properties_for_organizations": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "The level of permission to grant the access token to view and edit custom properties for an organization, when allowed by the property.",
|
||||||
|
"enum": [
|
||||||
|
"read",
|
||||||
|
"write"
|
||||||
|
]
|
||||||
|
},
|
||||||
"members": {
|
"members": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "The level of permission to grant the access token for organization teams and members.",
|
"description": "The level of permission to grant the access token for organization teams and members.",
|
||||||
@@ -221,7 +229,7 @@
|
|||||||
},
|
},
|
||||||
"organization_custom_properties": {
|
"organization_custom_properties": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "The level of permission to grant the access token for custom property management.",
|
"description": "The level of permission to grant the access token for repository custom properties management at the organization level.",
|
||||||
"enum": [
|
"enum": [
|
||||||
"read",
|
"read",
|
||||||
"write",
|
"write",
|
||||||
@@ -384,6 +392,15 @@
|
|||||||
"read",
|
"read",
|
||||||
"write"
|
"write"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"enterprise_custom_properties_for_organizations": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "The level of permission to grant the access token for organization custom properties management at the enterprise level.",
|
||||||
|
"enum": [
|
||||||
|
"read",
|
||||||
|
"write",
|
||||||
|
"admin"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"example": {
|
"example": {
|
||||||
|
|||||||
@@ -2,14 +2,14 @@
|
|||||||
|
|
||||||
Add one test file per scenario. You can run them in isolation with:
|
Add one test file per scenario. You can run them in isolation with:
|
||||||
|
|
||||||
```bash
|
```
|
||||||
node tests/post-token-set.test.js
|
node tests/post-token-set.test.js
|
||||||
```
|
```
|
||||||
|
|
||||||
All tests are run together in [tests/index.js](index.js), which can be executed with ava
|
All tests are run together in [tests/index.js](index.js), which can be executed with Node's built-in test runner
|
||||||
|
|
||||||
```
|
```
|
||||||
npx ava tests/index.js
|
node --test tests/index.js
|
||||||
```
|
```
|
||||||
|
|
||||||
or with npm
|
or with npm
|
||||||
@@ -20,7 +20,13 @@ npm test
|
|||||||
|
|
||||||
## How the tests work
|
## How the tests work
|
||||||
|
|
||||||
The output from the tests is captured into a snapshot ([tests/snapshots/index.js.md](snapshots/index.js.md)). It includes all requests sent by our scripts to verify it's working correctly and to prevent regressions.
|
The output from the tests is captured into a snapshot ([tests/index.js.snapshot](index.js.snapshot)). It includes all requests sent by our scripts to verify it's working correctly and to prevent regressions.
|
||||||
|
|
||||||
|
To update snapshots after an intentional change:
|
||||||
|
|
||||||
|
```
|
||||||
|
node --test --test-update-snapshots tests/index.js
|
||||||
|
```
|
||||||
|
|
||||||
## How to add a new test
|
## How to add a new test
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,23 @@
|
|||||||
import { readdirSync } from "node:fs";
|
import { readdirSync } from "node:fs";
|
||||||
|
import { execFile } from "node:child_process";
|
||||||
|
import { promisify } from "node:util";
|
||||||
|
|
||||||
import test from "ava";
|
import { snapshot, test } from "node:test";
|
||||||
import { execa } from "execa";
|
|
||||||
|
const execFileAsync = promisify(execFile);
|
||||||
|
|
||||||
|
// Serialize strings as-is so multiline output is human-readable in snapshots
|
||||||
|
snapshot.setDefaultSnapshotSerializers([
|
||||||
|
(value) => (typeof value === "string" ? value : undefined),
|
||||||
|
]);
|
||||||
|
|
||||||
// Get all files in tests directory
|
// Get all files in tests directory
|
||||||
const files = readdirSync("tests");
|
const files = readdirSync("tests");
|
||||||
|
|
||||||
// Files to ignore
|
// Files to ignore
|
||||||
const ignore = ["index.js", "main.js", "README.md", "snapshots"];
|
const ignore = ["index.js", "index.js.snapshot", "main.js", "README.md"];
|
||||||
|
|
||||||
const testFiles = files.filter((file) => !ignore.includes(file));
|
const testFiles = files.filter((file) => !ignore.includes(file)).sort();
|
||||||
|
|
||||||
// Throw an error if there is a file that does not end with test.js in the tests directory
|
// Throw an error if there is a file that does not end with test.js in the tests directory
|
||||||
for (const file of testFiles) {
|
for (const file of testFiles) {
|
||||||
@@ -18,20 +26,31 @@ for (const file of testFiles) {
|
|||||||
}
|
}
|
||||||
test(file, async (t) => {
|
test(file, async (t) => {
|
||||||
// Override Actions environment variables that change `core`’s behavior
|
// Override Actions environment variables that change `core`’s behavior
|
||||||
const env = {
|
const {
|
||||||
GITHUB_OUTPUT: undefined,
|
GITHUB_OUTPUT,
|
||||||
GITHUB_STATE: undefined,
|
GITHUB_STATE,
|
||||||
HTTP_PROXY: undefined,
|
HTTP_PROXY,
|
||||||
HTTPS_PROXY: undefined,
|
HTTPS_PROXY,
|
||||||
http_proxy: undefined,
|
http_proxy,
|
||||||
https_proxy: undefined,
|
https_proxy,
|
||||||
NO_PROXY: undefined,
|
NO_PROXY,
|
||||||
no_proxy: undefined,
|
no_proxy,
|
||||||
NODE_OPTIONS: undefined,
|
NODE_OPTIONS,
|
||||||
NODE_USE_ENV_PROXY: undefined,
|
NODE_USE_ENV_PROXY,
|
||||||
};
|
...env
|
||||||
const { stderr, stdout } = await execa("node", [`tests/${file}`], { env });
|
} = process.env;
|
||||||
t.snapshot(stderr, "stderr");
|
const { stderr, stdout } = await execFileAsync("node", [`tests/${file}`], {
|
||||||
t.snapshot(stdout, "stdout");
|
env,
|
||||||
|
});
|
||||||
|
const trimmedStderr = stderr.replace(/\r?\n$/, "");
|
||||||
|
const trimmedStdout = stdout.replace(/\r?\n$/, "");
|
||||||
|
await t.test("stderr", (t) => {
|
||||||
|
if (trimmedStderr) t.assert.snapshot(trimmedStderr);
|
||||||
|
else t.assert.strictEqual(trimmedStderr, "");
|
||||||
|
});
|
||||||
|
await t.test("stdout", (t) => {
|
||||||
|
if (trimmedStdout) t.assert.snapshot(trimmedStdout);
|
||||||
|
else t.assert.strictEqual(trimmedStdout, "");
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
274
tests/index.js.snapshot
Normal file
274
tests/index.js.snapshot
Normal file
@@ -0,0 +1,274 @@
|
|||||||
|
exports[`main-custom-github-api-url.test.js > stdout 1`] = `
|
||||||
|
Inputs 'owner' and 'repositories' are set. Creating token for the following repositories:
|
||||||
|
|
||||||
|
- actions/create-github-app-token
|
||||||
|
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a
|
||||||
|
|
||||||
|
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a
|
||||||
|
|
||||||
|
::set-output name=installation-id::123456
|
||||||
|
|
||||||
|
::set-output name=app-slug::github-actions
|
||||||
|
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a
|
||||||
|
::save-state name=expiresAt::2016-07-11T22:14:10Z
|
||||||
|
--- REQUESTS ---
|
||||||
|
GET /api/v3/repos/actions/create-github-app-token/installation
|
||||||
|
POST /api/v3/app/installations/123456/access_tokens
|
||||||
|
{"repositories":["create-github-app-token"]}
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`main-missing-owner.test.js > stderr 1`] = `
|
||||||
|
GITHUB_REPOSITORY_OWNER missing, must be set to '<owner>'
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`main-missing-repository.test.js > stderr 1`] = `
|
||||||
|
GITHUB_REPOSITORY missing, must be set to '<owner>/<repo>'
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`main-private-key-with-escaped-newlines.test.js > stdout 1`] = `
|
||||||
|
Inputs 'owner' and 'repositories' are not set. Creating token for this repository (actions/create-github-app-token).
|
||||||
|
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a
|
||||||
|
|
||||||
|
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a
|
||||||
|
|
||||||
|
::set-output name=installation-id::123456
|
||||||
|
|
||||||
|
::set-output name=app-slug::github-actions
|
||||||
|
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a
|
||||||
|
::save-state name=expiresAt::2016-07-11T22:14:10Z
|
||||||
|
--- REQUESTS ---
|
||||||
|
GET /repos/actions/create-github-app-token/installation
|
||||||
|
POST /app/installations/123456/access_tokens
|
||||||
|
{"repositories":["create-github-app-token"]}
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`main-proxy-requires-native-support.test.js > stderr 1`] = `
|
||||||
|
A proxy environment variable is set, but Node.js native proxy support is not enabled. Set NODE_USE_ENV_PROXY=1 for this action step.
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`main-proxy-requires-native-support.test.js > stdout 1`] = `
|
||||||
|
::error::A proxy environment variable is set, but Node.js native proxy support is not enabled. Set NODE_USE_ENV_PROXY=1 for this action step.
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`main-repo-skew.test.js > stderr 1`] = `
|
||||||
|
'Issued at' claim ('iat') must be an Integer representing the time that the assertion was issued.
|
||||||
|
[@octokit/auth-app] GitHub API time and system time are different by 30 seconds. Retrying request with the difference accounted for.
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`main-repo-skew.test.js > stdout 1`] = `
|
||||||
|
Inputs 'owner' and 'repositories' are set. Creating token for the following repositories:
|
||||||
|
|
||||||
|
- actions/failed-repo
|
||||||
|
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a
|
||||||
|
|
||||||
|
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a
|
||||||
|
|
||||||
|
::set-output name=installation-id::123456
|
||||||
|
|
||||||
|
::set-output name=app-slug::github-actions
|
||||||
|
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a
|
||||||
|
::save-state name=expiresAt::2016-07-11T22:14:10Z
|
||||||
|
--- REQUESTS ---
|
||||||
|
GET /repos/actions/failed-repo/installation
|
||||||
|
GET /repos/actions/failed-repo/installation
|
||||||
|
POST /app/installations/123456/access_tokens
|
||||||
|
{"repositories":["failed-repo"]}
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`main-token-get-owner-set-fail-response.test.js > stdout 1`] = `
|
||||||
|
Input 'repositories' is not set. Creating token for all repositories owned by smockle.
|
||||||
|
Failed to create token for "smockle" (attempt 1): GitHub API not available
|
||||||
|
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a
|
||||||
|
|
||||||
|
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a
|
||||||
|
|
||||||
|
::set-output name=installation-id::123456
|
||||||
|
|
||||||
|
::set-output name=app-slug::github-actions
|
||||||
|
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a
|
||||||
|
::save-state name=expiresAt::2016-07-11T22:14:10Z
|
||||||
|
--- REQUESTS ---
|
||||||
|
GET /users/smockle/installation
|
||||||
|
GET /users/smockle/installation
|
||||||
|
POST /app/installations/123456/access_tokens
|
||||||
|
null
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`main-token-get-owner-set-repo-fail-response.test.js > stdout 1`] = `
|
||||||
|
Inputs 'owner' and 'repositories' are set. Creating token for the following repositories:
|
||||||
|
|
||||||
|
- actions/failed-repo
|
||||||
|
Failed to create token for "failed-repo" (attempt 1): GitHub API not available
|
||||||
|
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a
|
||||||
|
|
||||||
|
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a
|
||||||
|
|
||||||
|
::set-output name=installation-id::123456
|
||||||
|
|
||||||
|
::set-output name=app-slug::github-actions
|
||||||
|
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a
|
||||||
|
::save-state name=expiresAt::2016-07-11T22:14:10Z
|
||||||
|
--- REQUESTS ---
|
||||||
|
GET /repos/actions/failed-repo/installation
|
||||||
|
GET /repos/actions/failed-repo/installation
|
||||||
|
POST /app/installations/123456/access_tokens
|
||||||
|
{"repositories":["failed-repo"]}
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`main-token-get-owner-set-repo-set-to-many-newline.test.js > stdout 1`] = `
|
||||||
|
Inputs 'owner' and 'repositories' are set. Creating token for the following repositories:
|
||||||
|
|
||||||
|
- actions/create-github-app-token
|
||||||
|
- actions/toolkit
|
||||||
|
- actions/checkout
|
||||||
|
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a
|
||||||
|
|
||||||
|
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a
|
||||||
|
|
||||||
|
::set-output name=installation-id::123456
|
||||||
|
|
||||||
|
::set-output name=app-slug::github-actions
|
||||||
|
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a
|
||||||
|
::save-state name=expiresAt::2016-07-11T22:14:10Z
|
||||||
|
--- REQUESTS ---
|
||||||
|
GET /repos/actions/create-github-app-token/installation
|
||||||
|
POST /app/installations/123456/access_tokens
|
||||||
|
{"repositories":["create-github-app-token","toolkit","checkout"]}
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`main-token-get-owner-set-repo-set-to-many.test.js > stdout 1`] = `
|
||||||
|
Inputs 'owner' and 'repositories' are set. Creating token for the following repositories:
|
||||||
|
|
||||||
|
- actions/create-github-app-token
|
||||||
|
- actions/toolkit
|
||||||
|
- actions/checkout
|
||||||
|
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a
|
||||||
|
|
||||||
|
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a
|
||||||
|
|
||||||
|
::set-output name=installation-id::123456
|
||||||
|
|
||||||
|
::set-output name=app-slug::github-actions
|
||||||
|
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a
|
||||||
|
::save-state name=expiresAt::2016-07-11T22:14:10Z
|
||||||
|
--- REQUESTS ---
|
||||||
|
GET /repos/actions/create-github-app-token/installation
|
||||||
|
POST /app/installations/123456/access_tokens
|
||||||
|
{"repositories":["create-github-app-token","toolkit","checkout"]}
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`main-token-get-owner-set-repo-set-to-one.test.js > stdout 1`] = `
|
||||||
|
Inputs 'owner' and 'repositories' are set. Creating token for the following repositories:
|
||||||
|
|
||||||
|
- actions/create-github-app-token
|
||||||
|
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a
|
||||||
|
|
||||||
|
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a
|
||||||
|
|
||||||
|
::set-output name=installation-id::123456
|
||||||
|
|
||||||
|
::set-output name=app-slug::github-actions
|
||||||
|
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a
|
||||||
|
::save-state name=expiresAt::2016-07-11T22:14:10Z
|
||||||
|
--- REQUESTS ---
|
||||||
|
GET /repos/actions/create-github-app-token/installation
|
||||||
|
POST /app/installations/123456/access_tokens
|
||||||
|
{"repositories":["create-github-app-token"]}
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`main-token-get-owner-set-repo-unset.test.js > stdout 1`] = `
|
||||||
|
Input 'repositories' is not set. Creating token for all repositories owned by actions.
|
||||||
|
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a
|
||||||
|
|
||||||
|
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a
|
||||||
|
|
||||||
|
::set-output name=installation-id::123456
|
||||||
|
|
||||||
|
::set-output name=app-slug::github-actions
|
||||||
|
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a
|
||||||
|
::save-state name=expiresAt::2016-07-11T22:14:10Z
|
||||||
|
--- REQUESTS ---
|
||||||
|
GET /users/actions/installation
|
||||||
|
POST /app/installations/123456/access_tokens
|
||||||
|
null
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`main-token-get-owner-unset-repo-set.test.js > stdout 1`] = `
|
||||||
|
No 'owner' input provided. Using default owner 'actions' to create token for the following repositories:
|
||||||
|
- actions/create-github-app-token
|
||||||
|
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a
|
||||||
|
|
||||||
|
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a
|
||||||
|
|
||||||
|
::set-output name=installation-id::123456
|
||||||
|
|
||||||
|
::set-output name=app-slug::github-actions
|
||||||
|
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a
|
||||||
|
::save-state name=expiresAt::2016-07-11T22:14:10Z
|
||||||
|
--- REQUESTS ---
|
||||||
|
GET /repos/actions/create-github-app-token/installation
|
||||||
|
POST /app/installations/123456/access_tokens
|
||||||
|
{"repositories":["create-github-app-token"]}
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`main-token-get-owner-unset-repo-unset.test.js > stdout 1`] = `
|
||||||
|
Inputs 'owner' and 'repositories' are not set. Creating token for this repository (actions/create-github-app-token).
|
||||||
|
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a
|
||||||
|
|
||||||
|
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a
|
||||||
|
|
||||||
|
::set-output name=installation-id::123456
|
||||||
|
|
||||||
|
::set-output name=app-slug::github-actions
|
||||||
|
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a
|
||||||
|
::save-state name=expiresAt::2016-07-11T22:14:10Z
|
||||||
|
--- REQUESTS ---
|
||||||
|
GET /repos/actions/create-github-app-token/installation
|
||||||
|
POST /app/installations/123456/access_tokens
|
||||||
|
{"repositories":["create-github-app-token"]}
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`main-token-permissions-set.test.js > stdout 1`] = `
|
||||||
|
Inputs 'owner' and 'repositories' are not set. Creating token for this repository (actions/create-github-app-token).
|
||||||
|
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a
|
||||||
|
|
||||||
|
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a
|
||||||
|
|
||||||
|
::set-output name=installation-id::123456
|
||||||
|
|
||||||
|
::set-output name=app-slug::github-actions
|
||||||
|
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a
|
||||||
|
::save-state name=expiresAt::2016-07-11T22:14:10Z
|
||||||
|
--- REQUESTS ---
|
||||||
|
GET /repos/actions/create-github-app-token/installation
|
||||||
|
POST /app/installations/123456/access_tokens
|
||||||
|
{"repositories":["create-github-app-token"],"permissions":{"issues":"write","pull_requests":"read"}}
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`post-proxy-requires-native-support.test.js > stderr 1`] = `
|
||||||
|
A proxy environment variable is set, but Node.js native proxy support is not enabled. Set NODE_USE_ENV_PROXY=1 for this action step.
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`post-proxy-requires-native-support.test.js > stdout 1`] = `
|
||||||
|
::error::A proxy environment variable is set, but Node.js native proxy support is not enabled. Set NODE_USE_ENV_PROXY=1 for this action step.
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`post-revoke-token-fail-response.test.js > stdout 1`] = `
|
||||||
|
::warning::Token revocation failed:
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`post-token-expired.test.js > stdout 1`] = `
|
||||||
|
Token expired, skipping token revocation
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`post-token-set.test.js > stdout 1`] = `
|
||||||
|
Token revoked
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`post-token-skipped.test.js > stdout 1`] = `
|
||||||
|
Token revocation was skipped
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`post-token-unset.test.js > stdout 1`] = `
|
||||||
|
Token is not set
|
||||||
|
`;
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import { test } from "./main.js";
|
import { mock } from "node:test";
|
||||||
|
|
||||||
import { install } from "@sinonjs/fake-timers";
|
import { test } from "./main.js";
|
||||||
|
|
||||||
// Verify `main` retry when the clock has drifted.
|
// Verify `main` retry when the clock has drifted.
|
||||||
await test((mockPool) => {
|
await test((mockPool) => {
|
||||||
@@ -11,7 +11,7 @@ await test((mockPool) => {
|
|||||||
const mockInstallationId = "123456";
|
const mockInstallationId = "123456";
|
||||||
const mockAppSlug = "github-actions";
|
const mockAppSlug = "github-actions";
|
||||||
|
|
||||||
install({ now: 0, toFake: ["Date"] });
|
mock.timers.enable({ apis: ["Date"], now: 0 });
|
||||||
|
|
||||||
mockPool
|
mockPool
|
||||||
.intercept({
|
.intercept({
|
||||||
@@ -59,4 +59,6 @@ await test((mockPool) => {
|
|||||||
};
|
};
|
||||||
})
|
})
|
||||||
.times(2);
|
.times(2);
|
||||||
|
}).finally(() => {
|
||||||
|
mock.timers.reset();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,404 +0,0 @@
|
|||||||
# Snapshot report for `tests/index.js`
|
|
||||||
|
|
||||||
The actual snapshot is saved in `index.js.snap`.
|
|
||||||
|
|
||||||
Generated by [AVA](https://avajs.dev).
|
|
||||||
|
|
||||||
## action-deprecated-inputs.test.js
|
|
||||||
|
|
||||||
> stderr
|
|
||||||
|
|
||||||
''
|
|
||||||
|
|
||||||
> stdout
|
|
||||||
|
|
||||||
''
|
|
||||||
|
|
||||||
## main-custom-github-api-url.test.js
|
|
||||||
|
|
||||||
> stderr
|
|
||||||
|
|
||||||
''
|
|
||||||
|
|
||||||
> stdout
|
|
||||||
|
|
||||||
`Inputs 'owner' and 'repositories' are set. Creating token for the following repositories:␊
|
|
||||||
␊
|
|
||||||
- actions/create-github-app-token␊
|
|
||||||
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
||||||
␊
|
|
||||||
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
||||||
␊
|
|
||||||
::set-output name=installation-id::123456␊
|
|
||||||
␊
|
|
||||||
::set-output name=app-slug::github-actions␊
|
|
||||||
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
||||||
::save-state name=expiresAt::2016-07-11T22:14:10Z␊
|
|
||||||
--- REQUESTS ---␊
|
|
||||||
GET /api/v3/repos/actions/create-github-app-token/installation␊
|
|
||||||
POST /api/v3/app/installations/123456/access_tokens␊
|
|
||||||
{"repositories":["create-github-app-token"]}`
|
|
||||||
|
|
||||||
## main-missing-owner.test.js
|
|
||||||
|
|
||||||
> stderr
|
|
||||||
|
|
||||||
'GITHUB_REPOSITORY_OWNER missing, must be set to \'<owner>\''
|
|
||||||
|
|
||||||
> stdout
|
|
||||||
|
|
||||||
''
|
|
||||||
|
|
||||||
## main-missing-repository.test.js
|
|
||||||
|
|
||||||
> stderr
|
|
||||||
|
|
||||||
'GITHUB_REPOSITORY missing, must be set to \'<owner>/<repo>\''
|
|
||||||
|
|
||||||
> stdout
|
|
||||||
|
|
||||||
''
|
|
||||||
|
|
||||||
## main-private-key-with-escaped-newlines.test.js
|
|
||||||
|
|
||||||
> stderr
|
|
||||||
|
|
||||||
''
|
|
||||||
|
|
||||||
> stdout
|
|
||||||
|
|
||||||
`Inputs 'owner' and 'repositories' are not set. Creating token for this repository (actions/create-github-app-token).␊
|
|
||||||
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
||||||
␊
|
|
||||||
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
||||||
␊
|
|
||||||
::set-output name=installation-id::123456␊
|
|
||||||
␊
|
|
||||||
::set-output name=app-slug::github-actions␊
|
|
||||||
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
||||||
::save-state name=expiresAt::2016-07-11T22:14:10Z␊
|
|
||||||
--- REQUESTS ---␊
|
|
||||||
GET /repos/actions/create-github-app-token/installation␊
|
|
||||||
POST /app/installations/123456/access_tokens␊
|
|
||||||
{"repositories":["create-github-app-token"]}`
|
|
||||||
|
|
||||||
## main-proxy-requires-native-support.test.js
|
|
||||||
|
|
||||||
> stderr
|
|
||||||
|
|
||||||
'A proxy environment variable is set, but Node.js native proxy support is not enabled. Set NODE_USE_ENV_PROXY=1 for this action step.'
|
|
||||||
|
|
||||||
> stdout
|
|
||||||
|
|
||||||
'::error::A proxy environment variable is set, but Node.js native proxy support is not enabled. Set NODE_USE_ENV_PROXY=1 for this action step.'
|
|
||||||
|
|
||||||
## main-repo-skew.test.js
|
|
||||||
|
|
||||||
> stderr
|
|
||||||
|
|
||||||
`'Issued at' claim ('iat') must be an Integer representing the time that the assertion was issued.␊
|
|
||||||
[@octokit/auth-app] GitHub API time and system time are different by 30 seconds. Retrying request with the difference accounted for.`
|
|
||||||
|
|
||||||
> stdout
|
|
||||||
|
|
||||||
`Inputs 'owner' and 'repositories' are set. Creating token for the following repositories:␊
|
|
||||||
␊
|
|
||||||
- actions/failed-repo␊
|
|
||||||
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
||||||
␊
|
|
||||||
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
||||||
␊
|
|
||||||
::set-output name=installation-id::123456␊
|
|
||||||
␊
|
|
||||||
::set-output name=app-slug::github-actions␊
|
|
||||||
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
||||||
::save-state name=expiresAt::2016-07-11T22:14:10Z␊
|
|
||||||
--- REQUESTS ---␊
|
|
||||||
GET /repos/actions/failed-repo/installation␊
|
|
||||||
GET /repos/actions/failed-repo/installation␊
|
|
||||||
POST /app/installations/123456/access_tokens␊
|
|
||||||
{"repositories":["failed-repo"]}`
|
|
||||||
|
|
||||||
## main-token-get-owner-set-fail-response.test.js
|
|
||||||
|
|
||||||
> stderr
|
|
||||||
|
|
||||||
''
|
|
||||||
|
|
||||||
> stdout
|
|
||||||
|
|
||||||
`Input 'repositories' is not set. Creating token for all repositories owned by smockle.␊
|
|
||||||
Failed to create token for "smockle" (attempt 1): GitHub API not available␊
|
|
||||||
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
||||||
␊
|
|
||||||
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
||||||
␊
|
|
||||||
::set-output name=installation-id::123456␊
|
|
||||||
␊
|
|
||||||
::set-output name=app-slug::github-actions␊
|
|
||||||
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
||||||
::save-state name=expiresAt::2016-07-11T22:14:10Z␊
|
|
||||||
--- REQUESTS ---␊
|
|
||||||
GET /users/smockle/installation␊
|
|
||||||
GET /users/smockle/installation␊
|
|
||||||
POST /app/installations/123456/access_tokens␊
|
|
||||||
null`
|
|
||||||
|
|
||||||
## main-token-get-owner-set-repo-fail-response.test.js
|
|
||||||
|
|
||||||
> stderr
|
|
||||||
|
|
||||||
''
|
|
||||||
|
|
||||||
> stdout
|
|
||||||
|
|
||||||
`Inputs 'owner' and 'repositories' are set. Creating token for the following repositories:␊
|
|
||||||
␊
|
|
||||||
- actions/failed-repo␊
|
|
||||||
Failed to create token for "failed-repo" (attempt 1): GitHub API not available␊
|
|
||||||
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
||||||
␊
|
|
||||||
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
||||||
␊
|
|
||||||
::set-output name=installation-id::123456␊
|
|
||||||
␊
|
|
||||||
::set-output name=app-slug::github-actions␊
|
|
||||||
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
||||||
::save-state name=expiresAt::2016-07-11T22:14:10Z␊
|
|
||||||
--- REQUESTS ---␊
|
|
||||||
GET /repos/actions/failed-repo/installation␊
|
|
||||||
GET /repos/actions/failed-repo/installation␊
|
|
||||||
POST /app/installations/123456/access_tokens␊
|
|
||||||
{"repositories":["failed-repo"]}`
|
|
||||||
|
|
||||||
## main-token-get-owner-set-repo-set-to-many-newline.test.js
|
|
||||||
|
|
||||||
> stderr
|
|
||||||
|
|
||||||
''
|
|
||||||
|
|
||||||
> stdout
|
|
||||||
|
|
||||||
`Inputs 'owner' and 'repositories' are set. Creating token for the following repositories:␊
|
|
||||||
␊
|
|
||||||
- actions/create-github-app-token␊
|
|
||||||
- actions/toolkit␊
|
|
||||||
- actions/checkout␊
|
|
||||||
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
||||||
␊
|
|
||||||
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
||||||
␊
|
|
||||||
::set-output name=installation-id::123456␊
|
|
||||||
␊
|
|
||||||
::set-output name=app-slug::github-actions␊
|
|
||||||
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
||||||
::save-state name=expiresAt::2016-07-11T22:14:10Z␊
|
|
||||||
--- REQUESTS ---␊
|
|
||||||
GET /repos/actions/create-github-app-token/installation␊
|
|
||||||
POST /app/installations/123456/access_tokens␊
|
|
||||||
{"repositories":["create-github-app-token","toolkit","checkout"]}`
|
|
||||||
|
|
||||||
## main-token-get-owner-set-repo-set-to-many.test.js
|
|
||||||
|
|
||||||
> stderr
|
|
||||||
|
|
||||||
''
|
|
||||||
|
|
||||||
> stdout
|
|
||||||
|
|
||||||
`Inputs 'owner' and 'repositories' are set. Creating token for the following repositories:␊
|
|
||||||
␊
|
|
||||||
- actions/create-github-app-token␊
|
|
||||||
- actions/toolkit␊
|
|
||||||
- actions/checkout␊
|
|
||||||
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
||||||
␊
|
|
||||||
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
||||||
␊
|
|
||||||
::set-output name=installation-id::123456␊
|
|
||||||
␊
|
|
||||||
::set-output name=app-slug::github-actions␊
|
|
||||||
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
||||||
::save-state name=expiresAt::2016-07-11T22:14:10Z␊
|
|
||||||
--- REQUESTS ---␊
|
|
||||||
GET /repos/actions/create-github-app-token/installation␊
|
|
||||||
POST /app/installations/123456/access_tokens␊
|
|
||||||
{"repositories":["create-github-app-token","toolkit","checkout"]}`
|
|
||||||
|
|
||||||
## main-token-get-owner-set-repo-set-to-one.test.js
|
|
||||||
|
|
||||||
> stderr
|
|
||||||
|
|
||||||
''
|
|
||||||
|
|
||||||
> stdout
|
|
||||||
|
|
||||||
`Inputs 'owner' and 'repositories' are set. Creating token for the following repositories:␊
|
|
||||||
␊
|
|
||||||
- actions/create-github-app-token␊
|
|
||||||
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
||||||
␊
|
|
||||||
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
||||||
␊
|
|
||||||
::set-output name=installation-id::123456␊
|
|
||||||
␊
|
|
||||||
::set-output name=app-slug::github-actions␊
|
|
||||||
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
||||||
::save-state name=expiresAt::2016-07-11T22:14:10Z␊
|
|
||||||
--- REQUESTS ---␊
|
|
||||||
GET /repos/actions/create-github-app-token/installation␊
|
|
||||||
POST /app/installations/123456/access_tokens␊
|
|
||||||
{"repositories":["create-github-app-token"]}`
|
|
||||||
|
|
||||||
## main-token-get-owner-set-repo-unset.test.js
|
|
||||||
|
|
||||||
> stderr
|
|
||||||
|
|
||||||
''
|
|
||||||
|
|
||||||
> stdout
|
|
||||||
|
|
||||||
`Input 'repositories' is not set. Creating token for all repositories owned by actions.␊
|
|
||||||
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
||||||
␊
|
|
||||||
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
||||||
␊
|
|
||||||
::set-output name=installation-id::123456␊
|
|
||||||
␊
|
|
||||||
::set-output name=app-slug::github-actions␊
|
|
||||||
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
||||||
::save-state name=expiresAt::2016-07-11T22:14:10Z␊
|
|
||||||
--- REQUESTS ---␊
|
|
||||||
GET /users/actions/installation␊
|
|
||||||
POST /app/installations/123456/access_tokens␊
|
|
||||||
null`
|
|
||||||
|
|
||||||
## main-token-get-owner-unset-repo-set.test.js
|
|
||||||
|
|
||||||
> stderr
|
|
||||||
|
|
||||||
''
|
|
||||||
|
|
||||||
> stdout
|
|
||||||
|
|
||||||
`No 'owner' input provided. Using default owner 'actions' to create token for the following repositories:␊
|
|
||||||
- actions/create-github-app-token␊
|
|
||||||
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
||||||
␊
|
|
||||||
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
||||||
␊
|
|
||||||
::set-output name=installation-id::123456␊
|
|
||||||
␊
|
|
||||||
::set-output name=app-slug::github-actions␊
|
|
||||||
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
||||||
::save-state name=expiresAt::2016-07-11T22:14:10Z␊
|
|
||||||
--- REQUESTS ---␊
|
|
||||||
GET /repos/actions/create-github-app-token/installation␊
|
|
||||||
POST /app/installations/123456/access_tokens␊
|
|
||||||
{"repositories":["create-github-app-token"]}`
|
|
||||||
|
|
||||||
## main-token-get-owner-unset-repo-unset.test.js
|
|
||||||
|
|
||||||
> stderr
|
|
||||||
|
|
||||||
''
|
|
||||||
|
|
||||||
> stdout
|
|
||||||
|
|
||||||
`Inputs 'owner' and 'repositories' are not set. Creating token for this repository (actions/create-github-app-token).␊
|
|
||||||
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
||||||
␊
|
|
||||||
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
||||||
␊
|
|
||||||
::set-output name=installation-id::123456␊
|
|
||||||
␊
|
|
||||||
::set-output name=app-slug::github-actions␊
|
|
||||||
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
||||||
::save-state name=expiresAt::2016-07-11T22:14:10Z␊
|
|
||||||
--- REQUESTS ---␊
|
|
||||||
GET /repos/actions/create-github-app-token/installation␊
|
|
||||||
POST /app/installations/123456/access_tokens␊
|
|
||||||
{"repositories":["create-github-app-token"]}`
|
|
||||||
|
|
||||||
## main-token-permissions-set.test.js
|
|
||||||
|
|
||||||
> stderr
|
|
||||||
|
|
||||||
''
|
|
||||||
|
|
||||||
> stdout
|
|
||||||
|
|
||||||
`Inputs 'owner' and 'repositories' are not set. Creating token for this repository (actions/create-github-app-token).␊
|
|
||||||
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
||||||
␊
|
|
||||||
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
||||||
␊
|
|
||||||
::set-output name=installation-id::123456␊
|
|
||||||
␊
|
|
||||||
::set-output name=app-slug::github-actions␊
|
|
||||||
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
||||||
::save-state name=expiresAt::2016-07-11T22:14:10Z␊
|
|
||||||
--- REQUESTS ---␊
|
|
||||||
GET /repos/actions/create-github-app-token/installation␊
|
|
||||||
POST /app/installations/123456/access_tokens␊
|
|
||||||
{"repositories":["create-github-app-token"],"permissions":{"issues":"write","pull_requests":"read"}}`
|
|
||||||
|
|
||||||
## post-proxy-requires-native-support.test.js
|
|
||||||
|
|
||||||
> stderr
|
|
||||||
|
|
||||||
'A proxy environment variable is set, but Node.js native proxy support is not enabled. Set NODE_USE_ENV_PROXY=1 for this action step.'
|
|
||||||
|
|
||||||
> stdout
|
|
||||||
|
|
||||||
'::error::A proxy environment variable is set, but Node.js native proxy support is not enabled. Set NODE_USE_ENV_PROXY=1 for this action step.'
|
|
||||||
|
|
||||||
## post-revoke-token-fail-response.test.js
|
|
||||||
|
|
||||||
> stderr
|
|
||||||
|
|
||||||
''
|
|
||||||
|
|
||||||
> stdout
|
|
||||||
|
|
||||||
'::warning::Token revocation failed: '
|
|
||||||
|
|
||||||
## post-token-expired.test.js
|
|
||||||
|
|
||||||
> stderr
|
|
||||||
|
|
||||||
''
|
|
||||||
|
|
||||||
> stdout
|
|
||||||
|
|
||||||
'Token expired, skipping token revocation'
|
|
||||||
|
|
||||||
## post-token-set.test.js
|
|
||||||
|
|
||||||
> stderr
|
|
||||||
|
|
||||||
''
|
|
||||||
|
|
||||||
> stdout
|
|
||||||
|
|
||||||
'Token revoked'
|
|
||||||
|
|
||||||
## post-token-skipped.test.js
|
|
||||||
|
|
||||||
> stderr
|
|
||||||
|
|
||||||
''
|
|
||||||
|
|
||||||
> stdout
|
|
||||||
|
|
||||||
'Token revocation was skipped'
|
|
||||||
|
|
||||||
## post-token-unset.test.js
|
|
||||||
|
|
||||||
> stderr
|
|
||||||
|
|
||||||
''
|
|
||||||
|
|
||||||
> stdout
|
|
||||||
|
|
||||||
'Token is not set'
|
|
||||||
Binary file not shown.
Reference in New Issue
Block a user