mirror of
https://github.com/actions/github-script.git
synced 2026-10-15 20:06:55 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d7906e4ad0 | ||
|
|
ea954ff83a | ||
|
|
57c10d434e | ||
|
|
eae7dc1b88 | ||
|
|
f1ab5779d6 | ||
|
|
8d9f8fc050 | ||
|
|
a4f398e58b | ||
|
|
806be26275 | ||
|
|
8d76c9a913 | ||
|
|
78f623b2da | ||
|
|
98814c53be | ||
|
|
ba6cf3fe7c | ||
|
|
bcc389184d | ||
|
|
da8818015e | ||
|
|
4d93f38890 | ||
|
|
0550e85801 | ||
|
|
5420835fff | ||
|
|
03377835c3 | ||
|
|
8c6dda0186 | ||
|
|
ee0d992b06 | ||
|
|
00be60ac26 | ||
|
|
b7f2567036 | ||
|
|
4a65b1d78b | ||
|
|
5a2006bc4f | ||
|
|
b4677cbffd | ||
|
|
f34078a491 | ||
|
|
311d596c3d | ||
|
|
7dc29a470d | ||
|
|
570fe7c5f7 | ||
|
|
454eac42ff | ||
|
|
e0306a3c1d | ||
|
|
20fcf2e7fe |
No files matched your search
@@ -6,8 +6,11 @@ extends:
|
|||||||
- plugin:@typescript-eslint/eslint-recommended
|
- plugin:@typescript-eslint/eslint-recommended
|
||||||
- plugin:@typescript-eslint/recommended
|
- plugin:@typescript-eslint/recommended
|
||||||
- prettier/@typescript-eslint
|
- prettier/@typescript-eslint
|
||||||
|
parserOptions:
|
||||||
|
project: ['tsconfig.eslint.json']
|
||||||
rules:
|
rules:
|
||||||
# '@typescript-eslint/explicit-function-return-type': 0
|
# '@typescript-eslint/explicit-function-return-type': 0
|
||||||
'@typescript-eslint/no-use-before-define':
|
'@typescript-eslint/no-use-before-define':
|
||||||
- 2
|
- 2
|
||||||
- functions: false
|
- functions: false
|
||||||
|
'@typescript-eslint/no-unnecessary-condition': error
|
||||||
@@ -22,12 +22,13 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Set Node.js 12.x
|
- name: Set Node.js 16.x
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 12.x
|
node-version: 16.x
|
||||||
|
cache: npm
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
@@ -45,7 +46,7 @@ jobs:
|
|||||||
id: diff
|
id: diff
|
||||||
|
|
||||||
# If index.js was different than expected, upload the expected version as an artifact
|
# If index.js was different than expected, upload the expected version as an artifact
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v3
|
||||||
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
|
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
|
||||||
with:
|
with:
|
||||||
name: dist
|
name: dist
|
||||||
|
|||||||
@@ -10,10 +10,10 @@ jobs:
|
|||||||
ci:
|
ci:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-node@v2
|
- uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 12
|
node-version: 16
|
||||||
cache: npm
|
cache: npm
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
- run: npm run style:check
|
- run: npm run style:check
|
||||||
|
|||||||
@@ -8,9 +8,10 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test-return:
|
test-return:
|
||||||
|
name: 'Integration test: return'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- id: output-set
|
- id: output-set
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
@@ -18,42 +19,252 @@ jobs:
|
|||||||
result-encoding: string
|
result-encoding: string
|
||||||
input-value: output
|
input-value: output
|
||||||
- run: |
|
- run: |
|
||||||
if [[ "${{steps.output-set.outputs.result}}" != "output" ]]; then
|
echo "- Validating output is produced"
|
||||||
|
expected="output"
|
||||||
|
if [[ "${{steps.output-set.outputs.result}}" != "$expected" ]]; then
|
||||||
|
echo $'::error::\u274C' "Expected '$expected', got ${{steps.output-set.outputs.result}}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
echo $'\u2705 Test passed' | tee -a $GITHUB_STEP_SUMMARY
|
||||||
|
|
||||||
test-relative-require:
|
test-relative-require:
|
||||||
|
name: 'Integration test: relative-path require'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- id: output-set
|
- id: relative-require
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
script: return require('./package.json').name
|
script: return require('./package.json').name
|
||||||
result-encoding: string
|
result-encoding: string
|
||||||
input-value: output
|
|
||||||
- run: |
|
- run: |
|
||||||
if [[ "${{steps.output-set.outputs.result}}" != "github-script" ]]; then
|
echo "- Validating relative require output"
|
||||||
|
if [[ "${{steps.relative-require.outputs.result}}" != "github-script" ]]; then
|
||||||
|
echo $'::error::\u274C' "Expected '$expected', got ${{steps.relative-require.outputs.result}}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
echo $'\u2705 Test passed' | tee -a $GITHUB_STEP_SUMMARY
|
||||||
|
|
||||||
test-npm-require:
|
test-npm-require:
|
||||||
|
name: 'Integration test: npm package require'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/cache@v2
|
- uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: ~/.npm
|
path: ~/.npm
|
||||||
key: ${{runner.os}}-npm-${{hashFiles('**/package-lock.json')}}
|
key: ${{runner.os}}-npm-${{hashFiles('**/package-lock.json')}}
|
||||||
restore-keys: ${{runner.os}}-npm-
|
restore-keys: ${{runner.os}}-npm-
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
- id: output-set
|
- id: npm-require
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
script: return require('@actions/core/package.json').name
|
script: return require('@actions/core/package.json').name
|
||||||
result-encoding: string
|
result-encoding: string
|
||||||
input-value: output
|
|
||||||
- run: |
|
- run: |
|
||||||
if [[ "${{steps.output-set.outputs.result}}" != "@actions/core" ]]; then
|
echo "- Validating npm require output"
|
||||||
|
expected="@actions/core"
|
||||||
|
if [[ "${{steps.npm-require.outputs.result}}" != "$expected" ]]; then
|
||||||
|
echo $'::error::\u274C' "Expected '$expected', got ${{steps.npm-require.outputs.result}}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
echo $'\u2705 Test passed' | tee -a $GITHUB_STEP_SUMMARY
|
||||||
|
|
||||||
|
test-previews:
|
||||||
|
name: 'Integration test: previews option'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ~/.npm
|
||||||
|
key: ${{runner.os}}-npm-${{hashFiles('**/package-lock.json')}}
|
||||||
|
restore-keys: ${{runner.os}}-npm-
|
||||||
|
- run: npm ci
|
||||||
|
- id: previews-default
|
||||||
|
name: Default previews not set
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
const endpoint = github.request.endpoint
|
||||||
|
return endpoint({}).headers.accept
|
||||||
|
result-encoding: string
|
||||||
|
- id: previews-set-single
|
||||||
|
name: Previews set to a single value
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
previews: foo
|
||||||
|
script: |
|
||||||
|
const endpoint = github.request.endpoint
|
||||||
|
return endpoint({}).headers.accept
|
||||||
|
result-encoding: string
|
||||||
|
- id: previews-set-multiple
|
||||||
|
name: Previews set to comma-separated list
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
previews: foo,bar,baz
|
||||||
|
script: |
|
||||||
|
const endpoint = github.request.endpoint
|
||||||
|
return endpoint({}).headers.accept
|
||||||
|
result-encoding: string
|
||||||
|
- run: |
|
||||||
|
echo "- Validating previews default"
|
||||||
|
expected="application/vnd.github.v3+json"
|
||||||
|
if [[ "${{steps.previews-default.outputs.result}}" != $expected ]]; then
|
||||||
|
echo $'::error::\u274C' "Expected '$expected', got ${{steps.previews-default.outputs.result}}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "- Validating previews set to a single value"
|
||||||
|
expected="application/vnd.github.foo-preview+json"
|
||||||
|
if [[ "${{steps.previews-set-single.outputs.result}}" != $expected ]]; then
|
||||||
|
echo $'::error::\u274C' "Expected '$expected', got ${{steps.previews-set-single.outputs.result}}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "- Validating previews set to multiple values"
|
||||||
|
expected="application/vnd.github.foo-preview+json,application/vnd.github.bar-preview+json,application/vnd.github.baz-preview+json"
|
||||||
|
if [[ "${{steps.previews-set-multiple.outputs.result}}" != $expected ]]; then
|
||||||
|
echo $'::error::\u274C' "Expected '$expected', got ${{steps.previews-set-multiple.outputs.result}}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo $'\u2705 Test passed' | tee -a $GITHUB_STEP_SUMMARY
|
||||||
|
|
||||||
|
test-user-agent:
|
||||||
|
name: 'Integration test: user-agent option'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ~/.npm
|
||||||
|
key: ${{runner.os}}-npm-${{hashFiles('**/package-lock.json')}}
|
||||||
|
restore-keys: ${{runner.os}}-npm-
|
||||||
|
- run: npm ci
|
||||||
|
- id: user-agent-default
|
||||||
|
name: Default user-agent not set
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
const endpoint = github.request.endpoint
|
||||||
|
return endpoint({}).headers['user-agent']
|
||||||
|
result-encoding: string
|
||||||
|
- id: user-agent-set
|
||||||
|
name: User-agent set
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
user-agent: foobar
|
||||||
|
script: |
|
||||||
|
const endpoint = github.request.endpoint
|
||||||
|
return endpoint({}).headers['user-agent']
|
||||||
|
result-encoding: string
|
||||||
|
- id: user-agent-empty
|
||||||
|
name: User-agent set to an empty string
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
user-agent: ''
|
||||||
|
script: |
|
||||||
|
const endpoint = github.request.endpoint
|
||||||
|
return endpoint({}).headers['user-agent']
|
||||||
|
result-encoding: string
|
||||||
|
- run: |
|
||||||
|
echo "- Validating user-agent default"
|
||||||
|
expected="actions/github-script octokit-core.js/"
|
||||||
|
if [[ "${{steps.user-agent-default.outputs.result}}" != "$expected"* ]]; then
|
||||||
|
echo $'::error::\u274C' "Expected user-agent to start with '$expected', got ${{steps.user-agent-default.outputs.result}}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "- Validating user-agent set to a value"
|
||||||
|
expected="foobar octokit-core.js/"
|
||||||
|
if [[ "${{steps.user-agent-set.outputs.result}}" != "$expected"* ]]; then
|
||||||
|
echo $'::error::\u274C' "Expected user-agent to start with '$expected', got ${{steps.user-agent-set.outputs.result}}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "- Validating user-agent set to an empty string"
|
||||||
|
expected="octokit-core.js/"
|
||||||
|
if [[ "${{steps.user-agent-empty.outputs.result}}" != "$expected"* ]]; then
|
||||||
|
echo $'::error::\u274C' "Expected user-agent to start with '$expected', got ${{steps.user-agent-empty.outputs.result}}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo $'\u2705 Test passed' | tee -a $GITHUB_STEP_SUMMARY
|
||||||
|
|
||||||
|
test-debug:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
environment: ['', 'debug-integration-test']
|
||||||
|
environment: ${{ matrix.environment }}
|
||||||
|
name: "Integration test: debug option (runner.debug mode ${{ matrix.environment && 'enabled' || 'disabled' }})"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ~/.npm
|
||||||
|
key: ${{runner.os}}-npm-${{hashFiles('**/package-lock.json')}}
|
||||||
|
restore-keys: ${{runner.os}}-npm-
|
||||||
|
- run: npm ci
|
||||||
|
- id: debug-default
|
||||||
|
name: Default debug not set
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
const log = github.log
|
||||||
|
return {
|
||||||
|
runnerDebugMode: core.isDebug(),
|
||||||
|
debug: log.debug === console.debug,
|
||||||
|
info: log.info === console.info
|
||||||
|
}
|
||||||
|
- id: debug-true
|
||||||
|
name: Debug set to true
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
debug: true
|
||||||
|
script: |
|
||||||
|
const log = github.log
|
||||||
|
return {
|
||||||
|
runnerDebugMode: core.isDebug(),
|
||||||
|
debug: log.debug === console.debug,
|
||||||
|
info: log.info === console.info
|
||||||
|
}
|
||||||
|
- id: debug-false
|
||||||
|
name: Debug set to false
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
debug: false
|
||||||
|
script: |
|
||||||
|
const log = github.log
|
||||||
|
return {
|
||||||
|
runnerDebugMode: core.isDebug(),
|
||||||
|
debug: log.debug === console.debug,
|
||||||
|
info: log.info === console.info
|
||||||
|
}
|
||||||
|
- id: evaluate-tests
|
||||||
|
name: Evaluate test outputs
|
||||||
|
env:
|
||||||
|
RDMODE: ${{ runner.debug == '1' }}
|
||||||
|
run: |
|
||||||
|
# tests table, pipe separated: label | output | expected
|
||||||
|
# leading and trailing spaces on any field are trimmed
|
||||||
|
tests=$(cat << 'TESTS'
|
||||||
|
Validating debug default |\
|
||||||
|
${{ steps.debug-default.outputs.result }} |\
|
||||||
|
{"runnerDebugMode":${{ env.RDMODE }},"debug":${{ env.RDMODE }},"info":${{ env.RDMODE }}}
|
||||||
|
Validating debug set to true |\
|
||||||
|
${{ steps.debug-true.outputs.result }} |\
|
||||||
|
{"runnerDebugMode":${{ env.RDMODE }},"debug":true,"info":true}
|
||||||
|
Validating debug set to false |\
|
||||||
|
${{ steps.debug-false.outputs.result }} |\
|
||||||
|
{"runnerDebugMode":${{ env.RDMODE }},"debug":false,"info":false}
|
||||||
|
TESTS
|
||||||
|
)
|
||||||
|
|
||||||
|
strim() { shopt -s extglob; lt="${1##+( )}"; echo "${lt%%+( )}"; }
|
||||||
|
while IFS='|' read label output expected; do
|
||||||
|
label="$(strim "$label")"; output="$(strim "$output")"; expected="$(strim "$expected")"
|
||||||
|
echo -n "- $label:"
|
||||||
|
if [[ "$output" != "$expected" ]]; then
|
||||||
|
echo $'\n::error::\u274C' "Expected '$expected', got '$output'"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo $' \u2705'
|
||||||
|
done <<< "$tests"
|
||||||
|
|
||||||
|
echo $'\u2705 Test passed' | tee -a $GITHUB_STEP_SUMMARY
|
||||||
@@ -13,7 +13,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: Check licenses
|
name: Check licenses
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0 # prefer to use a full fetch for licensed workflows
|
fetch-depth: 0 # prefer to use a full fetch for licensed workflows
|
||||||
# https://github.com/jonabc/setup-licensed/releases/tag/v1.1.1
|
# https://github.com/jonabc/setup-licensed/releases/tag/v1.1.1
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ jobs:
|
|||||||
pull-request-test:
|
pull-request-test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- uses: ./
|
- uses: ./
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
|
|||||||
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
@@ -18,6 +18,7 @@ The following arguments will be provided:
|
|||||||
- `glob` A reference to the [@actions/glob](https://github.com/actions/toolkit/tree/main/packages/glob) package
|
- `glob` A reference to the [@actions/glob](https://github.com/actions/toolkit/tree/main/packages/glob) package
|
||||||
- `io` A reference to the [@actions/io](https://github.com/actions/toolkit/tree/main/packages/io) package
|
- `io` A reference to the [@actions/io](https://github.com/actions/toolkit/tree/main/packages/io) package
|
||||||
- `exec` A reference to the [@actions/exec](https://github.com/actions/toolkit/tree/main/packages/exec) package
|
- `exec` A reference to the [@actions/exec](https://github.com/actions/toolkit/tree/main/packages/exec) package
|
||||||
|
- `fetch` A reference to the [node-fetch](https://github.com/node-fetch/node-fetch) package
|
||||||
- `require` A proxy wrapper around the normal Node.js `require` to enable
|
- `require` A proxy wrapper around the normal Node.js `require` to enable
|
||||||
requiring relative paths (relative to the current working directory) and
|
requiring relative paths (relative to the current working directory) and
|
||||||
requiring npm packages installed in the current working directory. If for
|
requiring npm packages installed in the current working directory. If for
|
||||||
@@ -297,7 +298,7 @@ jobs:
|
|||||||
echo-input:
|
echo-input:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/github-script@v6
|
- uses: actions/github-script@v6
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
@@ -335,7 +336,7 @@ jobs:
|
|||||||
echo-input:
|
echo-input:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/github-script@v6
|
- uses: actions/github-script@v6
|
||||||
env:
|
env:
|
||||||
SHA: '${{env.parentSHA}}'
|
SHA: '${{env.parentSHA}}'
|
||||||
@@ -373,10 +374,10 @@ jobs:
|
|||||||
echo-input:
|
echo-input:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-node@v2
|
- uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 14
|
node-version: 16
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
# or one-off:
|
# or one-off:
|
||||||
- run: npm install execa
|
- run: npm install execa
|
||||||
@@ -409,7 +410,7 @@ jobs:
|
|||||||
print-stuff:
|
print-stuff:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/github-script@v6
|
- uses: actions/github-script@v6
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
|
|||||||
+2
-2
@@ -13,8 +13,8 @@ inputs:
|
|||||||
default: ${{ github.token }}
|
default: ${{ github.token }}
|
||||||
required: false
|
required: false
|
||||||
debug:
|
debug:
|
||||||
description: Whether to tell the GitHub client to log details of its requests
|
description: Whether to tell the GitHub client to log details of its requests. true or false. Default is to run in debug mode when the GitHub Actions step debug logging is turned on.
|
||||||
default: false
|
default: ${{ runner.debug == '1' }}
|
||||||
user-agent:
|
user-agent:
|
||||||
description: An optional user-agent string
|
description: An optional user-agent string
|
||||||
default: actions/github-script
|
default: actions/github-script
|
||||||
|
|||||||
Vendored
+10134
-10083
File diff suppressed because it is too large.
Load diff
Generated
+61
-96
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "github-script",
|
"name": "github-script",
|
||||||
"version": "6.3.3",
|
"version": "6.4.0",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "github-script",
|
"name": "github-script",
|
||||||
"version": "6.3.3",
|
"version": "6.4.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.10.0",
|
"@actions/core": "^1.10.0",
|
||||||
@@ -15,15 +15,16 @@
|
|||||||
"@actions/glob": "^0.3.0",
|
"@actions/glob": "^0.3.0",
|
||||||
"@actions/io": "^1.1.1",
|
"@actions/io": "^1.1.1",
|
||||||
"@octokit/core": "^3.5.1",
|
"@octokit/core": "^3.5.1",
|
||||||
"@octokit/plugin-paginate-rest": "^2.17.0",
|
"@octokit/plugin-request-log": "^1.0.4",
|
||||||
"@octokit/plugin-rest-endpoint-methods": "^6.3.0",
|
"@octokit/plugin-retry": "^3.0.9",
|
||||||
"@octokit/plugin-retry": "^3.0.9"
|
"node-fetch": "^2.6.7"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^27.0.2",
|
"@types/jest": "^27.0.2",
|
||||||
|
"@types/node-fetch": "^2.6.2",
|
||||||
"@typescript-eslint/eslint-plugin": "^3.10.1",
|
"@typescript-eslint/eslint-plugin": "^3.10.1",
|
||||||
"@typescript-eslint/parser": "^3.10.1",
|
"@typescript-eslint/parser": "^3.10.1",
|
||||||
"@vercel/ncc": "^0.23.0",
|
"@vercel/ncc": "^0.36.0",
|
||||||
"eslint": "^7.32.0",
|
"eslint": "^7.32.0",
|
||||||
"eslint-config-prettier": "^6.15.0",
|
"eslint-config-prettier": "^6.15.0",
|
||||||
"husky": "^7.0.0",
|
"husky": "^7.0.0",
|
||||||
@@ -1123,34 +1124,14 @@
|
|||||||
"@octokit/core": ">=2"
|
"@octokit/core": ">=2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/plugin-rest-endpoint-methods": {
|
"node_modules/@octokit/plugin-request-log": {
|
||||||
"version": "6.3.0",
|
"version": "1.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-6.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-1.0.4.tgz",
|
||||||
"integrity": "sha512-qEu2wn6E7hqluZwIEUnDxWROvKjov3zMIAi4H4d7cmKWNMeBprEXZzJe8pE5eStUYC1ysGhD0B7L6IeG1Rfb+g==",
|
"integrity": "sha512-mLUsMkgP7K/cnFEw07kWqXGF5LKrOkD+lhCrKvPHXWDywAwuDUeDwWBpc69XK3pNX0uKiVt8g5z96PJ6z9xCFA==",
|
||||||
"dependencies": {
|
|
||||||
"@octokit/types": "^7.0.0",
|
|
||||||
"deprecation": "^2.3.1"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 14"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@octokit/core": ">=3"
|
"@octokit/core": ">=3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/openapi-types": {
|
|
||||||
"version": "13.2.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-13.2.0.tgz",
|
|
||||||
"integrity": "sha512-1BhjsVrCe2cyE36Rorpeq331bcYzdb9ksCpkFdAN6RVtW67YdO3Pl4YXDC5dF2D1ia76MssJdn5RV+Gj9Fu7dQ=="
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types": {
|
|
||||||
"version": "7.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-7.1.0.tgz",
|
|
||||||
"integrity": "sha512-+ClA0jRc9zGFj5mfQeQNfgTlelzhpAexbAueQG1t2Xn8yhgnsjkF8bgLcUUpwrpqkv296uXyiGwkqXRSU7KYzQ==",
|
|
||||||
"dependencies": {
|
|
||||||
"@octokit/openapi-types": "^13.1.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/plugin-retry": {
|
"node_modules/@octokit/plugin-retry": {
|
||||||
"version": "3.0.9",
|
"version": "3.0.9",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-retry/-/plugin-retry-3.0.9.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/plugin-retry/-/plugin-retry-3.0.9.tgz",
|
||||||
@@ -1326,6 +1307,16 @@
|
|||||||
"integrity": "sha512-EITwVTX5B4nDjXjGeQAfXOrm+Jn+qNjDmyDRtWoD+wZsl/RDPRTFRKivs4Mt74iOFlLOrE5+Kf+p5yjyhm3+cA==",
|
"integrity": "sha512-EITwVTX5B4nDjXjGeQAfXOrm+Jn+qNjDmyDRtWoD+wZsl/RDPRTFRKivs4Mt74iOFlLOrE5+Kf+p5yjyhm3+cA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"node_modules/@types/node-fetch": {
|
||||||
|
"version": "2.6.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.2.tgz",
|
||||||
|
"integrity": "sha512-DHqhlq5jeESLy19TYhLakJ07kNumXWjcDdxXsLUMJZ6ue8VZJj4kLPQVE/2mdHh3xZziNF1xppu5lwmS53HR+A==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@types/node": "*",
|
||||||
|
"form-data": "^3.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@types/prettier": {
|
"node_modules/@types/prettier": {
|
||||||
"version": "2.4.1",
|
"version": "2.4.1",
|
||||||
"resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.4.1.tgz",
|
||||||
@@ -1519,9 +1510,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@vercel/ncc": {
|
"node_modules/@vercel/ncc": {
|
||||||
"version": "0.23.0",
|
"version": "0.36.0",
|
||||||
"resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.23.0.tgz",
|
"resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.36.0.tgz",
|
||||||
"integrity": "sha512-Fcr1qlG9t54X4X9qbo/+jr1+t5Qc6H3TgIRBXmKkF/WDs6YFulAN6ilq2Ehx38RbgIOFxaZnjlAQ50GyexnMpQ==",
|
"integrity": "sha512-/ZTUJ/ZkRt694k7KJNimgmHjtQcRuVwsST2Z6XfYveQIuBbHR+EqkTc1jfgPkQmMyk/vtpxo3nVxe8CNuau86A==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"bin": {
|
"bin": {
|
||||||
"ncc": "dist/ncc/cli.js"
|
"ncc": "dist/ncc/cli.js"
|
||||||
@@ -4511,13 +4502,10 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/json5": {
|
"node_modules/json5": {
|
||||||
"version": "2.1.3",
|
"version": "2.2.3",
|
||||||
"resolved": "https://registry.npmjs.org/json5/-/json5-2.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
|
||||||
"integrity": "sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==",
|
"integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
|
||||||
"minimist": "^1.2.5"
|
|
||||||
},
|
|
||||||
"bin": {
|
"bin": {
|
||||||
"json5": "lib/cli.js"
|
"json5": "lib/cli.js"
|
||||||
},
|
},
|
||||||
@@ -4739,9 +4727,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/minimatch": {
|
"node_modules/minimatch": {
|
||||||
"version": "3.0.4",
|
"version": "3.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
|
||||||
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
|
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"brace-expansion": "^1.1.7"
|
"brace-expansion": "^1.1.7"
|
||||||
},
|
},
|
||||||
@@ -4749,12 +4737,6 @@
|
|||||||
"node": "*"
|
"node": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/minimist": {
|
|
||||||
"version": "1.2.6",
|
|
||||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
|
|
||||||
"integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"node_modules/ms": {
|
"node_modules/ms": {
|
||||||
"version": "2.1.2",
|
"version": "2.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
||||||
@@ -4795,17 +4777,17 @@
|
|||||||
"node_modules/node-fetch/node_modules/tr46": {
|
"node_modules/node-fetch/node_modules/tr46": {
|
||||||
"version": "0.0.3",
|
"version": "0.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
|
||||||
"integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o="
|
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="
|
||||||
},
|
},
|
||||||
"node_modules/node-fetch/node_modules/webidl-conversions": {
|
"node_modules/node-fetch/node_modules/webidl-conversions": {
|
||||||
"version": "3.0.1",
|
"version": "3.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
|
||||||
"integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE="
|
"integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="
|
||||||
},
|
},
|
||||||
"node_modules/node-fetch/node_modules/whatwg-url": {
|
"node_modules/node-fetch/node_modules/whatwg-url": {
|
||||||
"version": "5.0.0",
|
"version": "5.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
|
||||||
"integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=",
|
"integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"tr46": "~0.0.3",
|
"tr46": "~0.0.3",
|
||||||
"webidl-conversions": "^3.0.0"
|
"webidl-conversions": "^3.0.0"
|
||||||
@@ -7089,29 +7071,11 @@
|
|||||||
"@octokit/types": "^6.34.0"
|
"@octokit/types": "^6.34.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@octokit/plugin-rest-endpoint-methods": {
|
"@octokit/plugin-request-log": {
|
||||||
"version": "6.3.0",
|
"version": "1.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-6.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-1.0.4.tgz",
|
||||||
"integrity": "sha512-qEu2wn6E7hqluZwIEUnDxWROvKjov3zMIAi4H4d7cmKWNMeBprEXZzJe8pE5eStUYC1ysGhD0B7L6IeG1Rfb+g==",
|
"integrity": "sha512-mLUsMkgP7K/cnFEw07kWqXGF5LKrOkD+lhCrKvPHXWDywAwuDUeDwWBpc69XK3pNX0uKiVt8g5z96PJ6z9xCFA==",
|
||||||
"requires": {
|
"requires": {}
|
||||||
"@octokit/types": "^7.0.0",
|
|
||||||
"deprecation": "^2.3.1"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"@octokit/openapi-types": {
|
|
||||||
"version": "13.2.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-13.2.0.tgz",
|
|
||||||
"integrity": "sha512-1BhjsVrCe2cyE36Rorpeq331bcYzdb9ksCpkFdAN6RVtW67YdO3Pl4YXDC5dF2D1ia76MssJdn5RV+Gj9Fu7dQ=="
|
|
||||||
},
|
|
||||||
"@octokit/types": {
|
|
||||||
"version": "7.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-7.1.0.tgz",
|
|
||||||
"integrity": "sha512-+ClA0jRc9zGFj5mfQeQNfgTlelzhpAexbAueQG1t2Xn8yhgnsjkF8bgLcUUpwrpqkv296uXyiGwkqXRSU7KYzQ==",
|
|
||||||
"requires": {
|
|
||||||
"@octokit/openapi-types": "^13.1.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"@octokit/plugin-retry": {
|
"@octokit/plugin-retry": {
|
||||||
"version": "3.0.9",
|
"version": "3.0.9",
|
||||||
@@ -7285,6 +7249,16 @@
|
|||||||
"integrity": "sha512-EITwVTX5B4nDjXjGeQAfXOrm+Jn+qNjDmyDRtWoD+wZsl/RDPRTFRKivs4Mt74iOFlLOrE5+Kf+p5yjyhm3+cA==",
|
"integrity": "sha512-EITwVTX5B4nDjXjGeQAfXOrm+Jn+qNjDmyDRtWoD+wZsl/RDPRTFRKivs4Mt74iOFlLOrE5+Kf+p5yjyhm3+cA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"@types/node-fetch": {
|
||||||
|
"version": "2.6.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.2.tgz",
|
||||||
|
"integrity": "sha512-DHqhlq5jeESLy19TYhLakJ07kNumXWjcDdxXsLUMJZ6ue8VZJj4kLPQVE/2mdHh3xZziNF1xppu5lwmS53HR+A==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@types/node": "*",
|
||||||
|
"form-data": "^3.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"@types/prettier": {
|
"@types/prettier": {
|
||||||
"version": "2.4.1",
|
"version": "2.4.1",
|
||||||
"resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.4.1.tgz",
|
||||||
@@ -7403,9 +7377,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@vercel/ncc": {
|
"@vercel/ncc": {
|
||||||
"version": "0.23.0",
|
"version": "0.36.0",
|
||||||
"resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.23.0.tgz",
|
"resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.36.0.tgz",
|
||||||
"integrity": "sha512-Fcr1qlG9t54X4X9qbo/+jr1+t5Qc6H3TgIRBXmKkF/WDs6YFulAN6ilq2Ehx38RbgIOFxaZnjlAQ50GyexnMpQ==",
|
"integrity": "sha512-/ZTUJ/ZkRt694k7KJNimgmHjtQcRuVwsST2Z6XfYveQIuBbHR+EqkTc1jfgPkQmMyk/vtpxo3nVxe8CNuau86A==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"abab": {
|
"abab": {
|
||||||
@@ -9670,13 +9644,10 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"json5": {
|
"json5": {
|
||||||
"version": "2.1.3",
|
"version": "2.2.3",
|
||||||
"resolved": "https://registry.npmjs.org/json5/-/json5-2.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
|
||||||
"integrity": "sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==",
|
"integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
|
||||||
"dev": true,
|
"dev": true
|
||||||
"requires": {
|
|
||||||
"minimist": "^1.2.5"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"kleur": {
|
"kleur": {
|
||||||
"version": "3.0.3",
|
"version": "3.0.3",
|
||||||
@@ -9848,19 +9819,13 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"minimatch": {
|
"minimatch": {
|
||||||
"version": "3.0.4",
|
"version": "3.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
|
||||||
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
|
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"brace-expansion": "^1.1.7"
|
"brace-expansion": "^1.1.7"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"minimist": {
|
|
||||||
"version": "1.2.6",
|
|
||||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
|
|
||||||
"integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"ms": {
|
"ms": {
|
||||||
"version": "2.1.2",
|
"version": "2.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
||||||
@@ -9890,17 +9855,17 @@
|
|||||||
"tr46": {
|
"tr46": {
|
||||||
"version": "0.0.3",
|
"version": "0.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
|
||||||
"integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o="
|
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="
|
||||||
},
|
},
|
||||||
"webidl-conversions": {
|
"webidl-conversions": {
|
||||||
"version": "3.0.1",
|
"version": "3.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
|
||||||
"integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE="
|
"integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="
|
||||||
},
|
},
|
||||||
"whatwg-url": {
|
"whatwg-url": {
|
||||||
"version": "5.0.0",
|
"version": "5.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
|
||||||
"integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=",
|
"integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"tr46": "~0.0.3",
|
"tr46": "~0.0.3",
|
||||||
"webidl-conversions": "^3.0.0"
|
"webidl-conversions": "^3.0.0"
|
||||||
|
|||||||
+6
-5
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "github-script",
|
"name": "github-script",
|
||||||
"description": "A GitHub action for executing a simple script",
|
"description": "A GitHub action for executing a simple script",
|
||||||
"version": "6.3.3",
|
"version": "6.4.0",
|
||||||
"author": "GitHub",
|
"author": "GitHub",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
@@ -37,15 +37,16 @@
|
|||||||
"@actions/glob": "^0.3.0",
|
"@actions/glob": "^0.3.0",
|
||||||
"@actions/io": "^1.1.1",
|
"@actions/io": "^1.1.1",
|
||||||
"@octokit/core": "^3.5.1",
|
"@octokit/core": "^3.5.1",
|
||||||
"@octokit/plugin-paginate-rest": "^2.17.0",
|
"@octokit/plugin-request-log": "^1.0.4",
|
||||||
"@octokit/plugin-rest-endpoint-methods": "^6.3.0",
|
"@octokit/plugin-retry": "^3.0.9",
|
||||||
"@octokit/plugin-retry": "^3.0.9"
|
"node-fetch": "^2.6.7"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^27.0.2",
|
"@types/jest": "^27.0.2",
|
||||||
|
"@types/node-fetch": "^2.6.2",
|
||||||
"@typescript-eslint/eslint-plugin": "^3.10.1",
|
"@typescript-eslint/eslint-plugin": "^3.10.1",
|
||||||
"@typescript-eslint/parser": "^3.10.1",
|
"@typescript-eslint/parser": "^3.10.1",
|
||||||
"@vercel/ncc": "^0.23.0",
|
"@vercel/ncc": "^0.36.0",
|
||||||
"eslint": "^7.32.0",
|
"eslint": "^7.32.0",
|
||||||
"eslint-config-prettier": "^6.15.0",
|
"eslint-config-prettier": "^6.15.0",
|
||||||
"husky": "^7.0.0",
|
"husky": "^7.0.0",
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import {Context} from '@actions/github/lib/context'
|
|||||||
import {GitHub} from '@actions/github/lib/utils'
|
import {GitHub} from '@actions/github/lib/utils'
|
||||||
import * as glob from '@actions/glob'
|
import * as glob from '@actions/glob'
|
||||||
import * as io from '@actions/io'
|
import * as io from '@actions/io'
|
||||||
|
import fetch from 'node-fetch'
|
||||||
|
|
||||||
const AsyncFunction = Object.getPrototypeOf(async () => null).constructor
|
const AsyncFunction = Object.getPrototypeOf(async () => null).constructor
|
||||||
|
|
||||||
@@ -14,6 +15,7 @@ type AsyncFunctionArguments = {
|
|||||||
exec: typeof exec
|
exec: typeof exec
|
||||||
glob: typeof glob
|
glob: typeof glob
|
||||||
io: typeof io
|
io: typeof io
|
||||||
|
fetch: typeof fetch
|
||||||
require: NodeRequire
|
require: NodeRequire
|
||||||
__original_require__: NodeRequire
|
__original_require__: NodeRequire
|
||||||
}
|
}
|
||||||
|
|||||||
+14
-10
@@ -4,10 +4,12 @@ import {context, getOctokit} from '@actions/github'
|
|||||||
import {defaults as defaultGitHubOptions} from '@actions/github/lib/utils'
|
import {defaults as defaultGitHubOptions} from '@actions/github/lib/utils'
|
||||||
import * as glob from '@actions/glob'
|
import * as glob from '@actions/glob'
|
||||||
import * as io from '@actions/io'
|
import * as io from '@actions/io'
|
||||||
|
import {requestLog} from '@octokit/plugin-request-log'
|
||||||
import {retry} from '@octokit/plugin-retry'
|
import {retry} from '@octokit/plugin-retry'
|
||||||
import {RequestRequestOptions} from '@octokit/types'
|
import {RequestRequestOptions} from '@octokit/types'
|
||||||
|
import fetch from 'node-fetch'
|
||||||
import {callAsyncFunction} from './async-function'
|
import {callAsyncFunction} from './async-function'
|
||||||
import {getRetryOptions, parseNumberArray, RetryOptions} from './retry-options'
|
import {RetryOptions, getRetryOptions, parseNumberArray} from './retry-options'
|
||||||
import {wrapRequire} from './wrap-require'
|
import {wrapRequire} from './wrap-require'
|
||||||
|
|
||||||
process.on('unhandledRejection', handleError)
|
process.on('unhandledRejection', handleError)
|
||||||
@@ -23,7 +25,7 @@ type Options = {
|
|||||||
|
|
||||||
async function main(): Promise<void> {
|
async function main(): Promise<void> {
|
||||||
const token = core.getInput('github-token', {required: true})
|
const token = core.getInput('github-token', {required: true})
|
||||||
const debug = core.getInput('debug')
|
const debug = core.getBooleanInput('debug')
|
||||||
const userAgent = core.getInput('user-agent')
|
const userAgent = core.getInput('user-agent')
|
||||||
const previews = core.getInput('previews')
|
const previews = core.getInput('previews')
|
||||||
const retries = parseInt(core.getInput('retries'))
|
const retries = parseInt(core.getInput('retries'))
|
||||||
@@ -36,14 +38,15 @@ async function main(): Promise<void> {
|
|||||||
defaultGitHubOptions
|
defaultGitHubOptions
|
||||||
)
|
)
|
||||||
|
|
||||||
const opts: Options = {}
|
const opts: Options = {
|
||||||
if (debug === 'true') opts.log = console
|
log: debug ? console : undefined,
|
||||||
if (userAgent != null) opts.userAgent = userAgent
|
userAgent: userAgent || undefined,
|
||||||
if (previews != null) opts.previews = previews.split(',')
|
previews: previews ? previews.split(',') : undefined,
|
||||||
if (retryOpts) opts.retry = retryOpts
|
retry: retryOpts,
|
||||||
if (requestOpts) opts.request = requestOpts
|
request: requestOpts
|
||||||
|
}
|
||||||
|
|
||||||
const github = getOctokit(token, opts, retry)
|
const github = getOctokit(token, opts, retry, requestLog)
|
||||||
const script = core.getInput('script', {required: true})
|
const script = core.getInput('script', {required: true})
|
||||||
|
|
||||||
// Using property/value shorthand on `require` (e.g. `{require}`) causes compilation errors.
|
// Using property/value shorthand on `require` (e.g. `{require}`) causes compilation errors.
|
||||||
@@ -56,7 +59,8 @@ async function main(): Promise<void> {
|
|||||||
core,
|
core,
|
||||||
exec,
|
exec,
|
||||||
glob,
|
glob,
|
||||||
io
|
io,
|
||||||
|
fetch
|
||||||
},
|
},
|
||||||
script
|
script
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ export function getRetryOptions(
|
|||||||
`GitHub client configured with: (retries: ${
|
`GitHub client configured with: (retries: ${
|
||||||
requestOptions.retries
|
requestOptions.retries
|
||||||
}, retry-exempt-status-code: ${
|
}, retry-exempt-status-code: ${
|
||||||
retryOptions?.doNotRetry ?? 'octokit default: [400, 401, 403, 404, 422]'
|
retryOptions.doNotRetry ?? 'octokit default: [400, 401, 403, 404, 422]'
|
||||||
})`
|
})`
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"extends": "./tsconfig.json",
|
||||||
|
"exclude": []
|
||||||
|
}
|
||||||
Reference in new issue
Block a user