├── .eslintrc.yml ├── .gitattributes ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── config.yml │ └── feature_request.md ├── actions │ └── install-dependencies │ │ └── action.yml ├── dependabot.yml └── workflows │ ├── check-dist.yml │ ├── ci.yml │ ├── codeql-analysis.yml │ ├── integration.yml │ ├── licensed.yml │ ├── publish-immutable-actions.yml │ └── pull-request-test.yml ├── .gitignore ├── .husky └── pre-commit ├── .licensed.yml ├── .licenses └── npm │ ├── @actions │ ├── core.dep.yml │ ├── exec.dep.yml │ ├── github.dep.yml │ ├── glob.dep.yml │ ├── http-client.dep.yml │ └── io.dep.yml │ ├── @fastify │ └── busboy.dep.yml │ ├── @octokit │ ├── auth-token.dep.yml │ ├── core.dep.yml │ ├── endpoint.dep.yml │ ├── graphql.dep.yml │ ├── openapi-types-18.0.0.dep.yml │ ├── openapi-types-19.0.0.dep.yml │ ├── plugin-paginate-rest.dep.yml │ ├── plugin-request-log.dep.yml │ ├── plugin-rest-endpoint-methods.dep.yml │ ├── plugin-retry.dep.yml │ ├── request-error.dep.yml │ ├── request.dep.yml │ ├── types-11.1.0.dep.yml │ └── types-12.0.0.dep.yml │ ├── @types │ └── node.dep.yml │ ├── balanced-match.dep.yml │ ├── before-after-hook.dep.yml │ ├── bottleneck.dep.yml │ ├── brace-expansion.dep.yml │ ├── concat-map.dep.yml │ ├── deprecation.dep.yml │ ├── is-plain-object.dep.yml │ ├── minimatch.dep.yml │ ├── once.dep.yml │ ├── tunnel.dep.yml │ ├── undici-types.dep.yml │ ├── undici.dep.yml │ ├── universal-user-agent.dep.yml │ ├── uuid.dep.yml │ └── wrappy.dep.yml ├── .npmrc ├── .prettierrc.yml ├── CODEOWNERS ├── LICENSE.md ├── README.md ├── __test__ ├── async-function.test.ts └── get-retry-options.test.ts ├── action.yml ├── dist └── index.js ├── docs └── development.md ├── package-lock.json ├── package.json ├── src ├── async-function.ts ├── main.ts ├── retry-options.ts └── wrap-require.ts ├── tsconfig.eslint.json ├── tsconfig.json └── types ├── async-function.d.ts └── non-webpack-require.ts /.eslintrc.yml: -------------------------------------------------------------------------------- 1 | root: true 2 | parser: '@typescript-eslint/parser' 3 | plugins: ['@typescript-eslint'] 4 | extends: 5 | - eslint:recommended 6 | - plugin:@typescript-eslint/eslint-recommended 7 | - plugin:@typescript-eslint/recommended 8 | - prettier 9 | parserOptions: 10 | project: ['tsconfig.eslint.json'] 11 | rules: 12 | # '@typescript-eslint/explicit-function-return-type': 0 13 | '@typescript-eslint/no-use-before-define': 14 | - 2 15 | - functions: false 16 | '@typescript-eslint/no-unnecessary-condition': error 17 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | .licenses/** -diff linguist-generated=true 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Smartphone (please complete the following information):** 32 | - Device: [e.g. iPhone6] 33 | - OS: [e.g. iOS8.1] 34 | - Browser [e.g. stock browser, safari] 35 | - Version [e.g. 22] 36 | 37 | **Additional context** 38 | Add any other context about the problem here. 39 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: true 2 | contact_links: 3 | - name: Ask a question or provide feedback about using this action 4 | about: For general Q&A and feedback, see the Discussions tab. 5 | url: https://github.com/actions/github-script/discussions 6 | - name: Ask a question or provide feedback about GitHub Actions 7 | about: Please check out the GitHub community forum for discussions about GitHub Actions 8 | url: https://github.com/orgs/community/discussions/categories/actions 9 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/actions/install-dependencies/action.yml: -------------------------------------------------------------------------------- 1 | name: 'Install dependencies' 2 | description: 'Set up node and install dependencies' 3 | runs: 4 | using: 'composite' 5 | steps: 6 | - uses: actions/setup-node@v4 7 | with: 8 | node-version: '20.x' 9 | cache: npm 10 | 11 | - run: npm ci 12 | shell: bash 13 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: 'github-actions' 4 | directory: '/' 5 | schedule: 6 | interval: 'weekly' 7 | 8 | - package-ecosystem: 'github-actions' 9 | directory: '/.github/actions/install-dependencies' 10 | schedule: 11 | interval: 'weekly' 12 | 13 | - package-ecosystem: 'npm' 14 | directory: '/' 15 | schedule: 16 | interval: 'weekly' 17 | -------------------------------------------------------------------------------- /.github/workflows/check-dist.yml: -------------------------------------------------------------------------------- 1 | # `dist/index.js` is a special file in Actions. 2 | # When you reference an action with `uses:` in a workflow, 3 | # `index.js` is the code that will run. 4 | # For our project, we generate this file through a build process 5 | # from other source files. 6 | # We need to make sure the checked-in `index.js` actually matches what we expect it to be. 7 | name: Check dist/ 8 | 9 | on: 10 | push: 11 | branches: 12 | - main 13 | pull_request: 14 | workflow_dispatch: 15 | 16 | permissions: 17 | contents: read 18 | 19 | jobs: 20 | check-dist: 21 | runs-on: ubuntu-latest 22 | 23 | steps: 24 | - uses: actions/checkout@v4 25 | 26 | - uses: ./.github/actions/install-dependencies 27 | 28 | - name: Rebuild the dist/ directory 29 | run: npm run build 30 | 31 | - name: Compare the expected and actual dist/ directories 32 | run: | 33 | if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then 34 | echo "Detected uncommitted changes after build. See status below:" 35 | git diff 36 | exit 1 37 | fi 38 | id: diff 39 | 40 | # If index.js was different than expected, upload the expected version as an artifact 41 | - uses: actions/upload-artifact@v4 42 | if: ${{ failure() && steps.diff.conclusion == 'failure' }} 43 | with: 44 | name: dist 45 | path: dist/ 46 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | push: 5 | branches: [main] 6 | pull_request: 7 | branches: [main] 8 | 9 | permissions: 10 | contents: read 11 | 12 | jobs: 13 | ci: 14 | runs-on: ubuntu-latest 15 | steps: 16 | - uses: actions/checkout@v4 17 | - uses: ./.github/actions/install-dependencies 18 | - run: npm run style:check 19 | - run: npm test 20 | -------------------------------------------------------------------------------- /.github/workflows/codeql-analysis.yml: -------------------------------------------------------------------------------- 1 | # For most projects, this workflow file will not need changing; you simply need 2 | # to commit it to your repository. 3 | # 4 | # You may wish to alter this file to override the set of languages analyzed, 5 | # or to provide custom queries or build logic. 6 | # 7 | # ******** NOTE ******** 8 | # We have attempted to detect the languages in your repository. Please check 9 | # the `language` matrix defined below to confirm you have the correct set of 10 | # supported CodeQL languages. 11 | # 12 | name: "CodeQL" 13 | 14 | on: 15 | push: 16 | branches: [ "main" ] 17 | pull_request: 18 | # The branches below must be a subset of the branches above 19 | branches: [ "main" ] 20 | schedule: 21 | - cron: '32 12 * * 3' 22 | 23 | jobs: 24 | analyze: 25 | name: Analyze 26 | runs-on: ubuntu-latest 27 | permissions: 28 | actions: read 29 | contents: read 30 | security-events: write 31 | 32 | strategy: 33 | fail-fast: false 34 | matrix: 35 | language: [ 'javascript' ] 36 | # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] 37 | # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support 38 | 39 | steps: 40 | - name: Checkout repository 41 | uses: actions/checkout@v4 42 | 43 | # Initializes the CodeQL tools for scanning. 44 | - name: Initialize CodeQL 45 | uses: github/codeql-action/init@v3 46 | with: 47 | languages: ${{ matrix.language }} 48 | # If you wish to specify custom queries, you can do so here or in a config file. 49 | # By default, queries listed here will override any specified in a config file. 50 | # Prefix the list here with "+" to use these queries and those in the config file. 51 | 52 | # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs 53 | # queries: security-extended,security-and-quality 54 | 55 | 56 | # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). 57 | # If this step fails, then you should remove it and run the build manually (see below) 58 | - name: Autobuild 59 | uses: github/codeql-action/autobuild@v3 60 | 61 | # ℹ️ Command-line programs to run using the OS shell. 62 | # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun 63 | 64 | # If the Autobuild fails above, remove it and uncomment the following three lines. 65 | # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. 66 | 67 | # - run: | 68 | # echo "Run, Build Application using script" 69 | # ./location_of_script_within_repo/buildscript.sh 70 | 71 | - name: Perform CodeQL Analysis 72 | uses: github/codeql-action/analyze@v3 73 | -------------------------------------------------------------------------------- /.github/workflows/integration.yml: -------------------------------------------------------------------------------- 1 | name: Integration 2 | 3 | on: 4 | push: 5 | branches: [main] 6 | pull_request: 7 | branches: [main] 8 | 9 | permissions: 10 | contents: read 11 | 12 | jobs: 13 | test-return: 14 | name: 'Integration test: return' 15 | runs-on: ubuntu-latest 16 | steps: 17 | - uses: actions/checkout@v4 18 | - id: output-set 19 | uses: ./ 20 | with: 21 | script: return core.getInput('input-value') 22 | result-encoding: string 23 | input-value: output 24 | - run: | 25 | echo "- Validating output is produced" 26 | expected="output" 27 | if [[ "${{steps.output-set.outputs.result}}" != "$expected" ]]; then 28 | echo $'::error::\u274C' "Expected '$expected', got ${{steps.output-set.outputs.result}}" 29 | exit 1 30 | fi 31 | echo $'\u2705 Test passed' | tee -a $GITHUB_STEP_SUMMARY 32 | 33 | test-relative-require: 34 | name: 'Integration test: relative-path require' 35 | runs-on: ubuntu-latest 36 | steps: 37 | - uses: actions/checkout@v4 38 | - id: relative-require 39 | uses: ./ 40 | with: 41 | script: return require('./package.json').name 42 | result-encoding: string 43 | - run: | 44 | echo "- Validating relative require output" 45 | if [[ "${{steps.relative-require.outputs.result}}" != "@actions/github-script" ]]; then 46 | echo $'::error::\u274C' "Expected '$expected', got ${{steps.relative-require.outputs.result}}" 47 | exit 1 48 | fi 49 | echo $'\u2705 Test passed' | tee -a $GITHUB_STEP_SUMMARY 50 | 51 | test-npm-require: 52 | name: 'Integration test: npm package require' 53 | runs-on: ubuntu-latest 54 | steps: 55 | - uses: actions/checkout@v4 56 | - uses: ./.github/actions/install-dependencies 57 | - id: npm-require 58 | uses: ./ 59 | with: 60 | script: return require('@actions/core/package.json').name 61 | result-encoding: string 62 | - run: | 63 | echo "- Validating npm require output" 64 | expected="@actions/core" 65 | if [[ "${{steps.npm-require.outputs.result}}" != "$expected" ]]; then 66 | echo $'::error::\u274C' "Expected '$expected', got ${{steps.npm-require.outputs.result}}" 67 | exit 1 68 | fi 69 | echo $'\u2705 Test passed' | tee -a $GITHUB_STEP_SUMMARY 70 | 71 | test-previews: 72 | name: 'Integration test: GraphQL previews option' 73 | runs-on: ubuntu-latest 74 | steps: 75 | - uses: actions/checkout@v4 76 | - uses: ./.github/actions/install-dependencies 77 | - id: previews-default 78 | name: Default previews not set 79 | uses: ./ 80 | with: 81 | script: | 82 | const endpoint = github.request.endpoint 83 | return endpoint({url: "/graphql"}).headers.accept 84 | result-encoding: string 85 | - id: previews-set-single 86 | name: Previews set to a single value 87 | uses: ./ 88 | with: 89 | previews: foo 90 | script: | 91 | const endpoint = github.request.endpoint 92 | return endpoint({url: "/graphql"}).headers.accept 93 | result-encoding: string 94 | - id: previews-set-multiple 95 | name: Previews set to comma-separated list 96 | uses: ./ 97 | with: 98 | previews: foo,bar,baz 99 | script: | 100 | const endpoint = github.request.endpoint 101 | return endpoint({url: "/graphql"}).headers.accept 102 | result-encoding: string 103 | - run: | 104 | echo "- Validating previews default" 105 | expected="application/vnd.github.v3+json" 106 | if [[ "${{steps.previews-default.outputs.result}}" != $expected ]]; then 107 | echo $'::error::\u274C' "Expected '$expected', got ${{steps.previews-default.outputs.result}}" 108 | exit 1 109 | fi 110 | echo "- Validating previews set to a single value" 111 | expected="application/vnd.github.foo-preview+json" 112 | if [[ "${{steps.previews-set-single.outputs.result}}" != $expected ]]; then 113 | echo $'::error::\u274C' "Expected '$expected', got ${{steps.previews-set-single.outputs.result}}" 114 | exit 1 115 | fi 116 | echo "- Validating previews set to multiple values" 117 | expected="application/vnd.github.foo-preview+json,application/vnd.github.bar-preview+json,application/vnd.github.baz-preview+json" 118 | if [[ "${{steps.previews-set-multiple.outputs.result}}" != $expected ]]; then 119 | echo $'::error::\u274C' "Expected '$expected', got ${{steps.previews-set-multiple.outputs.result}}" 120 | exit 1 121 | fi 122 | echo $'\u2705 Test passed' | tee -a $GITHUB_STEP_SUMMARY 123 | 124 | test-user-agent: 125 | name: 'Integration test: user-agent option' 126 | runs-on: ubuntu-latest 127 | steps: 128 | - uses: actions/checkout@v4 129 | - uses: ./.github/actions/install-dependencies 130 | - id: user-agent-default 131 | name: Default user-agent not set 132 | uses: ./ 133 | with: 134 | script: | 135 | const endpoint = github.request.endpoint 136 | return endpoint({}).headers['user-agent'] 137 | result-encoding: string 138 | - id: user-agent-set 139 | name: User-agent set 140 | uses: ./ 141 | with: 142 | user-agent: foobar 143 | script: | 144 | const endpoint = github.request.endpoint 145 | return endpoint({}).headers['user-agent'] 146 | result-encoding: string 147 | - id: user-agent-empty 148 | name: User-agent set to an empty string 149 | uses: ./ 150 | with: 151 | user-agent: '' 152 | script: | 153 | const endpoint = github.request.endpoint 154 | return endpoint({}).headers['user-agent'] 155 | result-encoding: string 156 | - run: | 157 | echo "- Validating user-agent default" 158 | expected="actions/github-script octokit-core.js/" 159 | if [[ "${{steps.user-agent-default.outputs.result}}" != "$expected"* ]]; then 160 | echo $'::error::\u274C' "Expected user-agent to start with '$expected', got ${{steps.user-agent-default.outputs.result}}" 161 | exit 1 162 | fi 163 | echo "- Validating user-agent set to a value" 164 | expected="foobar octokit-core.js/" 165 | if [[ "${{steps.user-agent-set.outputs.result}}" != "$expected"* ]]; then 166 | echo $'::error::\u274C' "Expected user-agent to start with '$expected', got ${{steps.user-agent-set.outputs.result}}" 167 | exit 1 168 | fi 169 | echo "- Validating user-agent set to an empty string" 170 | expected="octokit-core.js/" 171 | if [[ "${{steps.user-agent-empty.outputs.result}}" != "$expected"* ]]; then 172 | echo $'::error::\u274C' "Expected user-agent to start with '$expected', got ${{steps.user-agent-empty.outputs.result}}" 173 | exit 1 174 | fi 175 | echo $'\u2705 Test passed' | tee -a $GITHUB_STEP_SUMMARY 176 | 177 | test-debug: 178 | strategy: 179 | matrix: 180 | environment: ['', 'debug-integration-test'] 181 | environment: ${{ matrix.environment }} 182 | name: "Integration test: debug option (runner.debug mode ${{ matrix.environment && 'enabled' || 'disabled' }})" 183 | runs-on: ubuntu-latest 184 | steps: 185 | - uses: actions/checkout@v4 186 | - uses: ./.github/actions/install-dependencies 187 | - id: debug-default 188 | name: Default debug not set 189 | uses: ./ 190 | with: 191 | script: | 192 | const log = github.log 193 | return { 194 | runnerDebugMode: core.isDebug(), 195 | debug: log.debug === console.debug, 196 | info: log.info === console.info 197 | } 198 | - id: debug-true 199 | name: Debug set to true 200 | uses: ./ 201 | with: 202 | debug: true 203 | script: | 204 | const log = github.log 205 | return { 206 | runnerDebugMode: core.isDebug(), 207 | debug: log.debug === console.debug, 208 | info: log.info === console.info 209 | } 210 | - id: debug-false 211 | name: Debug set to false 212 | uses: ./ 213 | with: 214 | debug: false 215 | script: | 216 | const log = github.log 217 | return { 218 | runnerDebugMode: core.isDebug(), 219 | debug: log.debug === console.debug, 220 | info: log.info === console.info 221 | } 222 | - id: evaluate-tests 223 | name: Evaluate test outputs 224 | env: 225 | RDMODE: ${{ runner.debug == '1' }} 226 | run: | 227 | # tests table, pipe separated: label | output | expected 228 | # leading and trailing spaces on any field are trimmed 229 | tests=$(cat << 'TESTS' 230 | Validating debug default |\ 231 | ${{ steps.debug-default.outputs.result }} |\ 232 | {"runnerDebugMode":${{ env.RDMODE }},"debug":${{ env.RDMODE }},"info":${{ env.RDMODE }}} 233 | Validating debug set to true |\ 234 | ${{ steps.debug-true.outputs.result }} |\ 235 | {"runnerDebugMode":${{ env.RDMODE }},"debug":true,"info":true} 236 | Validating debug set to false |\ 237 | ${{ steps.debug-false.outputs.result }} |\ 238 | {"runnerDebugMode":${{ env.RDMODE }},"debug":false,"info":false} 239 | TESTS 240 | ) 241 | 242 | strim() { shopt -s extglob; lt="${1##+( )}"; echo "${lt%%+( )}"; } 243 | while IFS='|' read label output expected; do 244 | label="$(strim "$label")"; output="$(strim "$output")"; expected="$(strim "$expected")" 245 | echo -n "- $label:" 246 | if [[ "$output" != "$expected" ]]; then 247 | echo $'\n::error::\u274C' "Expected '$expected', got '$output'" 248 | exit 1 249 | fi 250 | echo $' \u2705' 251 | done <<< "$tests" 252 | 253 | echo $'\u2705 Test passed' | tee -a $GITHUB_STEP_SUMMARY 254 | 255 | test-base-url: 256 | name: 'Integration test: base-url option' 257 | runs-on: ubuntu-latest 258 | steps: 259 | - uses: actions/checkout@v4 260 | - uses: ./.github/actions/install-dependencies 261 | 262 | - id: base-url-default 263 | name: API URL with base-url not set 264 | uses: ./ 265 | with: 266 | script: | 267 | const endpoint = github.request.endpoint 268 | return endpoint({}).url 269 | result-encoding: string 270 | 271 | - id: base-url-default-graphql 272 | name: GraphQL URL with base-url not set 273 | uses: ./ 274 | with: 275 | script: | 276 | const endpoint = github.request.endpoint 277 | return endpoint({url: "/graphql"}).url 278 | result-encoding: string 279 | 280 | - id: base-url-set 281 | name: API URL with base-url set 282 | uses: ./ 283 | with: 284 | base-url: https://my.github-enterprise-server.com/api/v3 285 | script: | 286 | const endpoint = github.request.endpoint 287 | return endpoint({}).url 288 | result-encoding: string 289 | 290 | - id: base-url-set-graphql 291 | name: GraphQL URL with base-url set 292 | uses: ./ 293 | with: 294 | base-url: https://my.github-enterprise-server.com/api/v3 295 | script: | 296 | const endpoint = github.request.endpoint 297 | return endpoint({url: "/graphql"}).url 298 | result-encoding: string 299 | 300 | - run: | 301 | echo "- Validating API URL default" 302 | expected="https://api.github.com/" 303 | actual="${{steps.base-url-default.outputs.result}}" 304 | if [[ "$expected" != "$actual" ]]; then 305 | echo $'::error::\u274C' "Expected base-url to equal '$expected', got $actual" 306 | exit 1 307 | fi 308 | echo "- Validating GraphQL URL default" 309 | expected="https://api.github.com/graphql" 310 | actual="${{steps.base-url-default-graphql.outputs.result}}" 311 | if [[ "$expected" != "$actual" ]]; then 312 | echo $'::error::\u274C' "Expected base-url to equal '$expected', got $actual" 313 | exit 1 314 | fi 315 | echo "- Validating base-url set to a value" 316 | expected="https://my.github-enterprise-server.com/api/v3/" 317 | actual="${{steps.base-url-set.outputs.result}}" 318 | if [[ "$expected" != "$actual" ]]; then 319 | echo $'::error::\u274C' "Expected base-url to equal '$expected', got $actual" 320 | exit 1 321 | fi 322 | echo "- Validating GraphQL URL with base-url set to a value" 323 | expected="https://my.github-enterprise-server.com/api/v3/graphql" 324 | actual="${{steps.base-url-set-graphql.outputs.result}}" 325 | if [[ "$expected" != "$actual" ]]; then 326 | echo $'::error::\u274C' "Expected base-url to equal '$expected', got $actual" 327 | exit 1 328 | fi 329 | -------------------------------------------------------------------------------- /.github/workflows/licensed.yml: -------------------------------------------------------------------------------- 1 | name: Licensed 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | pull_request: 8 | branches: 9 | - main 10 | 11 | permissions: 12 | contents: read 13 | 14 | jobs: 15 | test: 16 | runs-on: ubuntu-latest 17 | name: Check licenses 18 | steps: 19 | - uses: actions/checkout@v4 20 | with: 21 | fetch-depth: 0 # prefer to use a full fetch for licensed workflows 22 | - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1.229.0 23 | with: 24 | ruby-version: ruby 25 | - uses: github/setup-licensed@v1 26 | with: 27 | version: '4.x' 28 | github_token: ${{ secrets.GITHUB_TOKEN }} 29 | - uses: ./.github/actions/install-dependencies 30 | - run: licensed status 31 | -------------------------------------------------------------------------------- /.github/workflows/publish-immutable-actions.yml: -------------------------------------------------------------------------------- 1 | name: 'Publish Immutable Action Version' 2 | 3 | on: 4 | release: 5 | types: [published] 6 | 7 | jobs: 8 | publish: 9 | runs-on: ubuntu-latest 10 | permissions: 11 | contents: read 12 | id-token: write 13 | packages: write 14 | 15 | steps: 16 | - name: Checking out 17 | uses: actions/checkout@v4 18 | - name: Publish 19 | id: publish 20 | uses: actions/publish-immutable-action@0.0.4 21 | -------------------------------------------------------------------------------- /.github/workflows/pull-request-test.yml: -------------------------------------------------------------------------------- 1 | name: Pull Request Test 2 | 3 | on: 4 | pull_request: 5 | branches: [main] 6 | types: [opened, synchronize] 7 | 8 | permissions: 9 | contents: read 10 | pull-requests: write 11 | 12 | jobs: 13 | pull-request-test: 14 | runs-on: ubuntu-latest 15 | steps: 16 | - uses: actions/checkout@v4 17 | - uses: ./ 18 | with: 19 | script: | 20 | // Get the existing comments. 21 | const {data: comments} = await github.rest.issues.listComments({ 22 | owner: context.repo.owner, 23 | repo: context.repo.repo, 24 | issue_number: context.payload.number, 25 | }) 26 | 27 | // Find any comment already made by the bot. 28 | const botComment = comments.find(comment => comment.user.id === 41898282) 29 | const commentBody = "Hello from actions/github-script! (${{ github.sha }})" 30 | 31 | if (context.payload.pull_request.head.repo.full_name !== 'actions/github-script') { 32 | console.log('Not attempting to write comment on PR from fork'); 33 | } else { 34 | if (botComment) { 35 | await github.rest.issues.updateComment({ 36 | owner: context.repo.owner, 37 | repo: context.repo.repo, 38 | comment_id: botComment.id, 39 | body: commentBody 40 | }) 41 | } else { 42 | await github.rest.issues.createComment({ 43 | owner: context.repo.owner, 44 | repo: context.repo.repo, 45 | issue_number: context.payload.number, 46 | body: commentBody 47 | }) 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules/ -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | npm run pre-commit && git add dist/ 2 | -------------------------------------------------------------------------------- /.licensed.yml: -------------------------------------------------------------------------------- 1 | sources: 2 | npm: true 3 | 4 | allowed: 5 | - apache-2.0 6 | - bsd-2-clause 7 | - bsd-3-clause 8 | - isc 9 | - mit 10 | - cc0-1.0 11 | - unlicense 12 | 13 | reviewed: 14 | npm: 15 | -------------------------------------------------------------------------------- /.licenses/npm/@actions/core.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: "@actions/core" 3 | version: 1.10.1 4 | type: npm 5 | summary: Actions core lib 6 | homepage: https://github.com/actions/toolkit/tree/main/packages/core 7 | license: mit 8 | licenses: 9 | - sources: LICENSE.md 10 | text: |- 11 | The MIT License (MIT) 12 | 13 | Copyright 2019 GitHub 14 | 15 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 20 | notices: [] 21 | -------------------------------------------------------------------------------- /.licenses/npm/@actions/exec.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: "@actions/exec" 3 | version: 1.1.1 4 | type: npm 5 | summary: Actions exec lib 6 | homepage: https://github.com/actions/toolkit/tree/main/packages/exec 7 | license: mit 8 | licenses: 9 | - sources: LICENSE.md 10 | text: |- 11 | The MIT License (MIT) 12 | 13 | Copyright 2019 GitHub 14 | 15 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 20 | notices: [] 21 | -------------------------------------------------------------------------------- /.licenses/npm/@actions/github.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: "@actions/github" 3 | version: 6.0.0 4 | type: npm 5 | summary: Actions github lib 6 | homepage: https://github.com/actions/toolkit/tree/main/packages/github 7 | license: mit 8 | licenses: 9 | - sources: LICENSE.md 10 | text: |- 11 | The MIT License (MIT) 12 | 13 | Copyright 2019 GitHub 14 | 15 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 20 | notices: [] 21 | -------------------------------------------------------------------------------- /.licenses/npm/@actions/glob.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: "@actions/glob" 3 | version: 0.4.0 4 | type: npm 5 | summary: Actions glob lib 6 | homepage: https://github.com/actions/toolkit/tree/main/packages/glob 7 | license: mit 8 | licenses: 9 | - sources: LICENSE.md 10 | text: |- 11 | The MIT License (MIT) 12 | 13 | Copyright 2019 GitHub 14 | 15 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 20 | notices: [] 21 | -------------------------------------------------------------------------------- /.licenses/npm/@actions/http-client.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: "@actions/http-client" 3 | version: 2.2.0 4 | type: npm 5 | summary: Actions Http Client 6 | homepage: https://github.com/actions/toolkit/tree/main/packages/http-client 7 | license: mit 8 | licenses: 9 | - sources: LICENSE 10 | text: | 11 | Actions Http Client for Node.js 12 | 13 | Copyright (c) GitHub, Inc. 14 | 15 | All rights reserved. 16 | 17 | MIT License 18 | 19 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 20 | associated documentation files (the "Software"), to deal in the Software without restriction, 21 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 22 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 23 | subject to the following conditions: 24 | 25 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 26 | 27 | THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 28 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN 29 | NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 30 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 31 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 32 | notices: [] 33 | -------------------------------------------------------------------------------- /.licenses/npm/@actions/io.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: "@actions/io" 3 | version: 1.1.3 4 | type: npm 5 | summary: Actions io lib 6 | homepage: https://github.com/actions/toolkit/tree/main/packages/io 7 | license: mit 8 | licenses: 9 | - sources: LICENSE.md 10 | text: |- 11 | The MIT License (MIT) 12 | 13 | Copyright 2019 GitHub 14 | 15 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 20 | notices: [] 21 | -------------------------------------------------------------------------------- /.licenses/npm/@fastify/busboy.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: "@fastify/busboy" 3 | version: 2.0.0 4 | type: npm 5 | summary: A streaming parser for HTML form data for node.js 6 | homepage: 7 | license: mit 8 | licenses: 9 | - sources: LICENSE 10 | text: |- 11 | Copyright Brian White. All rights reserved. 12 | 13 | Permission is hereby granted, free of charge, to any person obtaining a copy 14 | of this software and associated documentation files (the "Software"), to 15 | deal in the Software without restriction, including without limitation the 16 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 17 | sell copies of the Software, and to permit persons to whom the Software is 18 | furnished to do so, subject to the following conditions: 19 | 20 | The above copyright notice and this permission notice shall be included in 21 | all copies or substantial portions of the Software. 22 | 23 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 24 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 25 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 26 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 27 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 28 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 29 | IN THE SOFTWARE. 30 | notices: [] 31 | -------------------------------------------------------------------------------- /.licenses/npm/@octokit/auth-token.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: "@octokit/auth-token" 3 | version: 4.0.0 4 | type: npm 5 | summary: GitHub API token authentication for browsers and Node.js 6 | homepage: 7 | license: mit 8 | licenses: 9 | - sources: LICENSE 10 | text: | 11 | The MIT License 12 | 13 | Copyright (c) 2019 Octokit contributors 14 | 15 | Permission is hereby granted, free of charge, to any person obtaining a copy 16 | of this software and associated documentation files (the "Software"), to deal 17 | in the Software without restriction, including without limitation the rights 18 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 19 | copies of the Software, and to permit persons to whom the Software is 20 | furnished to do so, subject to the following conditions: 21 | 22 | The above copyright notice and this permission notice shall be included in 23 | all copies or substantial portions of the Software. 24 | 25 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 26 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 27 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 28 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 29 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 30 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 31 | THE SOFTWARE. 32 | - sources: README.md 33 | text: "[MIT](LICENSE)" 34 | notices: [] 35 | -------------------------------------------------------------------------------- /.licenses/npm/@octokit/core.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: "@octokit/core" 3 | version: 5.0.1 4 | type: npm 5 | summary: Extendable client for GitHub's REST & GraphQL APIs 6 | homepage: 7 | license: mit 8 | licenses: 9 | - sources: LICENSE 10 | text: | 11 | The MIT License 12 | 13 | Copyright (c) 2019 Octokit contributors 14 | 15 | Permission is hereby granted, free of charge, to any person obtaining a copy 16 | of this software and associated documentation files (the "Software"), to deal 17 | in the Software without restriction, including without limitation the rights 18 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 19 | copies of the Software, and to permit persons to whom the Software is 20 | furnished to do so, subject to the following conditions: 21 | 22 | The above copyright notice and this permission notice shall be included in 23 | all copies or substantial portions of the Software. 24 | 25 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 26 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 27 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 28 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 29 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 30 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 31 | THE SOFTWARE. 32 | - sources: README.md 33 | text: "[MIT](LICENSE)" 34 | notices: [] 35 | -------------------------------------------------------------------------------- /.licenses/npm/@octokit/endpoint.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: "@octokit/endpoint" 3 | version: 9.0.0 4 | type: npm 5 | summary: Turns REST API endpoints into generic request options 6 | homepage: 7 | license: mit 8 | licenses: 9 | - sources: LICENSE 10 | text: | 11 | The MIT License 12 | 13 | Copyright (c) 2018 Octokit contributors 14 | 15 | Permission is hereby granted, free of charge, to any person obtaining a copy 16 | of this software and associated documentation files (the "Software"), to deal 17 | in the Software without restriction, including without limitation the rights 18 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 19 | copies of the Software, and to permit persons to whom the Software is 20 | furnished to do so, subject to the following conditions: 21 | 22 | The above copyright notice and this permission notice shall be included in 23 | all copies or substantial portions of the Software. 24 | 25 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 26 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 27 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 28 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 29 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 30 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 31 | THE SOFTWARE. 32 | - sources: README.md 33 | text: "[MIT](LICENSE)" 34 | notices: [] 35 | -------------------------------------------------------------------------------- /.licenses/npm/@octokit/graphql.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: "@octokit/graphql" 3 | version: 7.0.1 4 | type: npm 5 | summary: GitHub GraphQL API client for browsers and Node 6 | homepage: 7 | license: mit 8 | licenses: 9 | - sources: LICENSE 10 | text: | 11 | The MIT License 12 | 13 | Copyright (c) 2018 Octokit contributors 14 | 15 | Permission is hereby granted, free of charge, to any person obtaining a copy 16 | of this software and associated documentation files (the "Software"), to deal 17 | in the Software without restriction, including without limitation the rights 18 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 19 | copies of the Software, and to permit persons to whom the Software is 20 | furnished to do so, subject to the following conditions: 21 | 22 | The above copyright notice and this permission notice shall be included in 23 | all copies or substantial portions of the Software. 24 | 25 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 26 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 27 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 28 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 29 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 30 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 31 | THE SOFTWARE. 32 | - sources: README.md 33 | text: "[MIT](LICENSE)" 34 | notices: [] 35 | -------------------------------------------------------------------------------- /.licenses/npm/@octokit/openapi-types-18.0.0.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: "@octokit/openapi-types" 3 | version: 18.0.0 4 | type: npm 5 | summary: Generated TypeScript definitions based on GitHub's OpenAPI spec for api.github.com 6 | homepage: 7 | license: mit 8 | licenses: 9 | - sources: LICENSE 10 | text: |- 11 | Copyright 2020 Gregor Martynus 12 | 13 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | - sources: README.md 19 | text: "[MIT](LICENSE)" 20 | notices: [] 21 | -------------------------------------------------------------------------------- /.licenses/npm/@octokit/openapi-types-19.0.0.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: "@octokit/openapi-types" 3 | version: 19.0.0 4 | type: npm 5 | summary: Generated TypeScript definitions based on GitHub's OpenAPI spec for api.github.com 6 | homepage: 7 | license: mit 8 | licenses: 9 | - sources: LICENSE 10 | text: |- 11 | Copyright 2020 Gregor Martynus 12 | 13 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | - sources: README.md 19 | text: "[MIT](LICENSE)" 20 | notices: [] 21 | -------------------------------------------------------------------------------- /.licenses/npm/@octokit/plugin-paginate-rest.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: "@octokit/plugin-paginate-rest" 3 | version: 9.0.0 4 | type: npm 5 | summary: Octokit plugin to paginate REST API endpoint responses 6 | homepage: 7 | license: mit 8 | licenses: 9 | - sources: LICENSE 10 | text: | 11 | MIT License Copyright (c) 2019 Octokit contributors 12 | 13 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | - sources: README.md 19 | text: "[MIT](LICENSE)" 20 | notices: [] 21 | -------------------------------------------------------------------------------- /.licenses/npm/@octokit/plugin-request-log.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: "@octokit/plugin-request-log" 3 | version: 4.0.0 4 | type: npm 5 | summary: Log all requests and request errors 6 | homepage: 7 | license: mit 8 | licenses: 9 | - sources: LICENSE 10 | text: | 11 | MIT License Copyright (c) 2020 Octokit contributors 12 | 13 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | - sources: README.md 19 | text: "[MIT](LICENSE)" 20 | notices: [] 21 | -------------------------------------------------------------------------------- /.licenses/npm/@octokit/plugin-rest-endpoint-methods.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: "@octokit/plugin-rest-endpoint-methods" 3 | version: 10.0.1 4 | type: npm 5 | summary: Octokit plugin adding one method for all of api.github.com REST API endpoints 6 | homepage: 7 | license: mit 8 | licenses: 9 | - sources: LICENSE 10 | text: | 11 | MIT License Copyright (c) 2019 Octokit contributors 12 | 13 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | - sources: README.md 19 | text: "[MIT](LICENSE)" 20 | notices: [] 21 | -------------------------------------------------------------------------------- /.licenses/npm/@octokit/plugin-retry.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: "@octokit/plugin-retry" 3 | version: 6.0.1 4 | type: npm 5 | summary: Automatic retry plugin for octokit 6 | homepage: 7 | license: mit 8 | licenses: 9 | - sources: LICENSE 10 | text: | 11 | MIT License 12 | 13 | Copyright (c) 2018 Octokit contributors 14 | 15 | Permission is hereby granted, free of charge, to any person obtaining a copy 16 | of this software and associated documentation files (the "Software"), to deal 17 | in the Software without restriction, including without limitation the rights 18 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 19 | copies of the Software, and to permit persons to whom the Software is 20 | furnished to do so, subject to the following conditions: 21 | 22 | The above copyright notice and this permission notice shall be included in all 23 | copies or substantial portions of the Software. 24 | 25 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 26 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 27 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 28 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 29 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 30 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 31 | SOFTWARE. 32 | - sources: README.md 33 | text: "[MIT](LICENSE)" 34 | notices: [] 35 | -------------------------------------------------------------------------------- /.licenses/npm/@octokit/request-error.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: "@octokit/request-error" 3 | version: 5.0.0 4 | type: npm 5 | summary: Error class for Octokit request errors 6 | homepage: 7 | license: mit 8 | licenses: 9 | - sources: LICENSE 10 | text: | 11 | The MIT License 12 | 13 | Copyright (c) 2019 Octokit contributors 14 | 15 | Permission is hereby granted, free of charge, to any person obtaining a copy 16 | of this software and associated documentation files (the "Software"), to deal 17 | in the Software without restriction, including without limitation the rights 18 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 19 | copies of the Software, and to permit persons to whom the Software is 20 | furnished to do so, subject to the following conditions: 21 | 22 | The above copyright notice and this permission notice shall be included in 23 | all copies or substantial portions of the Software. 24 | 25 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 26 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 27 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 28 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 29 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 30 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 31 | THE SOFTWARE. 32 | - sources: README.md 33 | text: "[MIT](LICENSE)" 34 | notices: [] 35 | -------------------------------------------------------------------------------- /.licenses/npm/@octokit/request.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: "@octokit/request" 3 | version: 8.1.1 4 | type: npm 5 | summary: Send parameterized requests to GitHub's APIs with sensible defaults in browsers 6 | and Node 7 | homepage: 8 | license: mit 9 | licenses: 10 | - sources: LICENSE 11 | text: | 12 | The MIT License 13 | 14 | Copyright (c) 2018 Octokit contributors 15 | 16 | Permission is hereby granted, free of charge, to any person obtaining a copy 17 | of this software and associated documentation files (the "Software"), to deal 18 | in the Software without restriction, including without limitation the rights 19 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 20 | copies of the Software, and to permit persons to whom the Software is 21 | furnished to do so, subject to the following conditions: 22 | 23 | The above copyright notice and this permission notice shall be included in 24 | all copies or substantial portions of the Software. 25 | 26 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 27 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 28 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 29 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 30 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 31 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 32 | THE SOFTWARE. 33 | - sources: README.md 34 | text: "[MIT](LICENSE)" 35 | notices: [] 36 | -------------------------------------------------------------------------------- /.licenses/npm/@octokit/types-11.1.0.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: "@octokit/types" 3 | version: 11.1.0 4 | type: npm 5 | summary: Shared TypeScript definitions for Octokit projects 6 | homepage: 7 | license: mit 8 | licenses: 9 | - sources: LICENSE 10 | text: | 11 | MIT License Copyright (c) 2019 Octokit contributors 12 | 13 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | - sources: README.md 19 | text: "[MIT](LICENSE)" 20 | notices: [] 21 | -------------------------------------------------------------------------------- /.licenses/npm/@octokit/types-12.0.0.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: "@octokit/types" 3 | version: 12.0.0 4 | type: npm 5 | summary: Shared TypeScript definitions for Octokit projects 6 | homepage: 7 | license: mit 8 | licenses: 9 | - sources: LICENSE 10 | text: | 11 | MIT License Copyright (c) 2019 Octokit contributors 12 | 13 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | - sources: README.md 19 | text: "[MIT](LICENSE)" 20 | notices: [] 21 | -------------------------------------------------------------------------------- /.licenses/npm/@types/node.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: "@types/node" 3 | version: 20.9.0 4 | type: npm 5 | summary: TypeScript definitions for node 6 | homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node 7 | license: mit 8 | licenses: 9 | - sources: LICENSE 10 | text: |2 11 | MIT License 12 | 13 | Copyright (c) Microsoft Corporation. 14 | 15 | Permission is hereby granted, free of charge, to any person obtaining a copy 16 | of this software and associated documentation files (the "Software"), to deal 17 | in the Software without restriction, including without limitation the rights 18 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 19 | copies of the Software, and to permit persons to whom the Software is 20 | furnished to do so, subject to the following conditions: 21 | 22 | The above copyright notice and this permission notice shall be included in all 23 | copies or substantial portions of the Software. 24 | 25 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 26 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 27 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 28 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 29 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 30 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 31 | SOFTWARE 32 | notices: [] 33 | -------------------------------------------------------------------------------- /.licenses/npm/balanced-match.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: balanced-match 3 | version: 1.0.0 4 | type: npm 5 | summary: Match balanced character pairs, like "{" and "}" 6 | homepage: https://github.com/juliangruber/balanced-match 7 | license: mit 8 | licenses: 9 | - sources: LICENSE.md 10 | text: | 11 | (MIT) 12 | 13 | Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> 14 | 15 | Permission is hereby granted, free of charge, to any person obtaining a copy of 16 | this software and associated documentation files (the "Software"), to deal in 17 | the Software without restriction, including without limitation the rights to 18 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 19 | of the Software, and to permit persons to whom the Software is furnished to do 20 | so, subject to the following conditions: 21 | 22 | The above copyright notice and this permission notice shall be included in all 23 | copies or substantial portions of the Software. 24 | 25 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 26 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 27 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 28 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 29 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 30 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 31 | SOFTWARE. 32 | - sources: README.md 33 | text: |- 34 | (MIT) 35 | 36 | Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> 37 | 38 | Permission is hereby granted, free of charge, to any person obtaining a copy of 39 | this software and associated documentation files (the "Software"), to deal in 40 | the Software without restriction, including without limitation the rights to 41 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 42 | of the Software, and to permit persons to whom the Software is furnished to do 43 | so, subject to the following conditions: 44 | 45 | The above copyright notice and this permission notice shall be included in all 46 | copies or substantial portions of the Software. 47 | 48 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 49 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 50 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 51 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 52 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 53 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 54 | SOFTWARE. 55 | notices: [] 56 | -------------------------------------------------------------------------------- /.licenses/npm/before-after-hook.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: before-after-hook 3 | version: 2.2.2 4 | type: npm 5 | summary: asynchronous before/error/after hooks for internal functionality 6 | homepage: https://github.com/gr2m/before-after-hook#readme 7 | license: apache-2.0 8 | licenses: 9 | - sources: LICENSE 10 | text: |2 11 | Apache License 12 | Version 2.0, January 2004 13 | http://www.apache.org/licenses/ 14 | 15 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 16 | 17 | 1. Definitions. 18 | 19 | "License" shall mean the terms and conditions for use, reproduction, 20 | and distribution as defined by Sections 1 through 9 of this document. 21 | 22 | "Licensor" shall mean the copyright owner or entity authorized by 23 | the copyright owner that is granting the License. 24 | 25 | "Legal Entity" shall mean the union of the acting entity and all 26 | other entities that control, are controlled by, or are under common 27 | control with that entity. For the purposes of this definition, 28 | "control" means (i) the power, direct or indirect, to cause the 29 | direction or management of such entity, whether by contract or 30 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 31 | outstanding shares, or (iii) beneficial ownership of such entity. 32 | 33 | "You" (or "Your") shall mean an individual or Legal Entity 34 | exercising permissions granted by this License. 35 | 36 | "Source" form shall mean the preferred form for making modifications, 37 | including but not limited to software source code, documentation 38 | source, and configuration files. 39 | 40 | "Object" form shall mean any form resulting from mechanical 41 | transformation or translation of a Source form, including but 42 | not limited to compiled object code, generated documentation, 43 | and conversions to other media types. 44 | 45 | "Work" shall mean the work of authorship, whether in Source or 46 | Object form, made available under the License, as indicated by a 47 | copyright notice that is included in or attached to the work 48 | (an example is provided in the Appendix below). 49 | 50 | "Derivative Works" shall mean any work, whether in Source or Object 51 | form, that is based on (or derived from) the Work and for which the 52 | editorial revisions, annotations, elaborations, or other modifications 53 | represent, as a whole, an original work of authorship. For the purposes 54 | of this License, Derivative Works shall not include works that remain 55 | separable from, or merely link (or bind by name) to the interfaces of, 56 | the Work and Derivative Works thereof. 57 | 58 | "Contribution" shall mean any work of authorship, including 59 | the original version of the Work and any modifications or additions 60 | to that Work or Derivative Works thereof, that is intentionally 61 | submitted to Licensor for inclusion in the Work by the copyright owner 62 | or by an individual or Legal Entity authorized to submit on behalf of 63 | the copyright owner. For the purposes of this definition, "submitted" 64 | means any form of electronic, verbal, or written communication sent 65 | to the Licensor or its representatives, including but not limited to 66 | communication on electronic mailing lists, source code control systems, 67 | and issue tracking systems that are managed by, or on behalf of, the 68 | Licensor for the purpose of discussing and improving the Work, but 69 | excluding communication that is conspicuously marked or otherwise 70 | designated in writing by the copyright owner as "Not a Contribution." 71 | 72 | "Contributor" shall mean Licensor and any individual or Legal Entity 73 | on behalf of whom a Contribution has been received by Licensor and 74 | subsequently incorporated within the Work. 75 | 76 | 2. Grant of Copyright License. Subject to the terms and conditions of 77 | this License, each Contributor hereby grants to You a perpetual, 78 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 79 | copyright license to reproduce, prepare Derivative Works of, 80 | publicly display, publicly perform, sublicense, and distribute the 81 | Work and such Derivative Works in Source or Object form. 82 | 83 | 3. Grant of Patent License. Subject to the terms and conditions of 84 | this License, each Contributor hereby grants to You a perpetual, 85 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 86 | (except as stated in this section) patent license to make, have made, 87 | use, offer to sell, sell, import, and otherwise transfer the Work, 88 | where such license applies only to those patent claims licensable 89 | by such Contributor that are necessarily infringed by their 90 | Contribution(s) alone or by combination of their Contribution(s) 91 | with the Work to which such Contribution(s) was submitted. If You 92 | institute patent litigation against any entity (including a 93 | cross-claim or counterclaim in a lawsuit) alleging that the Work 94 | or a Contribution incorporated within the Work constitutes direct 95 | or contributory patent infringement, then any patent licenses 96 | granted to You under this License for that Work shall terminate 97 | as of the date such litigation is filed. 98 | 99 | 4. Redistribution. You may reproduce and distribute copies of the 100 | Work or Derivative Works thereof in any medium, with or without 101 | modifications, and in Source or Object form, provided that You 102 | meet the following conditions: 103 | 104 | (a) You must give any other recipients of the Work or 105 | Derivative Works a copy of this License; and 106 | 107 | (b) You must cause any modified files to carry prominent notices 108 | stating that You changed the files; and 109 | 110 | (c) You must retain, in the Source form of any Derivative Works 111 | that You distribute, all copyright, patent, trademark, and 112 | attribution notices from the Source form of the Work, 113 | excluding those notices that do not pertain to any part of 114 | the Derivative Works; and 115 | 116 | (d) If the Work includes a "NOTICE" text file as part of its 117 | distribution, then any Derivative Works that You distribute must 118 | include a readable copy of the attribution notices contained 119 | within such NOTICE file, excluding those notices that do not 120 | pertain to any part of the Derivative Works, in at least one 121 | of the following places: within a NOTICE text file distributed 122 | as part of the Derivative Works; within the Source form or 123 | documentation, if provided along with the Derivative Works; or, 124 | within a display generated by the Derivative Works, if and 125 | wherever such third-party notices normally appear. The contents 126 | of the NOTICE file are for informational purposes only and 127 | do not modify the License. You may add Your own attribution 128 | notices within Derivative Works that You distribute, alongside 129 | or as an addendum to the NOTICE text from the Work, provided 130 | that such additional attribution notices cannot be construed 131 | as modifying the License. 132 | 133 | You may add Your own copyright statement to Your modifications and 134 | may provide additional or different license terms and conditions 135 | for use, reproduction, or distribution of Your modifications, or 136 | for any such Derivative Works as a whole, provided Your use, 137 | reproduction, and distribution of the Work otherwise complies with 138 | the conditions stated in this License. 139 | 140 | 5. Submission of Contributions. Unless You explicitly state otherwise, 141 | any Contribution intentionally submitted for inclusion in the Work 142 | by You to the Licensor shall be under the terms and conditions of 143 | this License, without any additional terms or conditions. 144 | Notwithstanding the above, nothing herein shall supersede or modify 145 | the terms of any separate license agreement you may have executed 146 | with Licensor regarding such Contributions. 147 | 148 | 6. Trademarks. This License does not grant permission to use the trade 149 | names, trademarks, service marks, or product names of the Licensor, 150 | except as required for reasonable and customary use in describing the 151 | origin of the Work and reproducing the content of the NOTICE file. 152 | 153 | 7. Disclaimer of Warranty. Unless required by applicable law or 154 | agreed to in writing, Licensor provides the Work (and each 155 | Contributor provides its Contributions) on an "AS IS" BASIS, 156 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 157 | implied, including, without limitation, any warranties or conditions 158 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 159 | PARTICULAR PURPOSE. You are solely responsible for determining the 160 | appropriateness of using or redistributing the Work and assume any 161 | risks associated with Your exercise of permissions under this License. 162 | 163 | 8. Limitation of Liability. In no event and under no legal theory, 164 | whether in tort (including negligence), contract, or otherwise, 165 | unless required by applicable law (such as deliberate and grossly 166 | negligent acts) or agreed to in writing, shall any Contributor be 167 | liable to You for damages, including any direct, indirect, special, 168 | incidental, or consequential damages of any character arising as a 169 | result of this License or out of the use or inability to use the 170 | Work (including but not limited to damages for loss of goodwill, 171 | work stoppage, computer failure or malfunction, or any and all 172 | other commercial damages or losses), even if such Contributor 173 | has been advised of the possibility of such damages. 174 | 175 | 9. Accepting Warranty or Additional Liability. While redistributing 176 | the Work or Derivative Works thereof, You may choose to offer, 177 | and charge a fee for, acceptance of support, warranty, indemnity, 178 | or other liability obligations and/or rights consistent with this 179 | License. However, in accepting such obligations, You may act only 180 | on Your own behalf and on Your sole responsibility, not on behalf 181 | of any other Contributor, and only if You agree to indemnify, 182 | defend, and hold each Contributor harmless for any liability 183 | incurred by, or claims asserted against, such Contributor by reason 184 | of your accepting any such warranty or additional liability. 185 | 186 | END OF TERMS AND CONDITIONS 187 | 188 | APPENDIX: How to apply the Apache License to your work. 189 | 190 | To apply the Apache License to your work, attach the following 191 | boilerplate notice, with the fields enclosed by brackets "{}" 192 | replaced with your own identifying information. (Don't include 193 | the brackets!) The text should be enclosed in the appropriate 194 | comment syntax for the file format. We also recommend that a 195 | file or class name and description of purpose be included on the 196 | same "printed page" as the copyright notice for easier 197 | identification within third-party archives. 198 | 199 | Copyright 2018 Gregor Martynus and other contributors. 200 | 201 | Licensed under the Apache License, Version 2.0 (the "License"); 202 | you may not use this file except in compliance with the License. 203 | You may obtain a copy of the License at 204 | 205 | http://www.apache.org/licenses/LICENSE-2.0 206 | 207 | Unless required by applicable law or agreed to in writing, software 208 | distributed under the License is distributed on an "AS IS" BASIS, 209 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 210 | See the License for the specific language governing permissions and 211 | limitations under the License. 212 | - sources: README.md 213 | text: "[Apache 2.0](LICENSE)" 214 | notices: [] 215 | -------------------------------------------------------------------------------- /.licenses/npm/bottleneck.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: bottleneck 3 | version: 2.19.5 4 | type: npm 5 | summary: Distributed task scheduler and rate limiter 6 | homepage: 7 | license: mit 8 | licenses: 9 | - sources: LICENSE 10 | text: | 11 | The MIT License (MIT) 12 | 13 | Copyright (c) 2014 Simon Grondin 14 | 15 | Permission is hereby granted, free of charge, to any person obtaining a copy of 16 | this software and associated documentation files (the "Software"), to deal in 17 | the Software without restriction, including without limitation the rights to 18 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 19 | the Software, and to permit persons to whom the Software is furnished to do so, 20 | subject to the following conditions: 21 | 22 | The above copyright notice and this permission notice shall be included in all 23 | copies or substantial portions of the Software. 24 | 25 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 26 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 27 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 28 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 29 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 30 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 31 | notices: [] 32 | -------------------------------------------------------------------------------- /.licenses/npm/brace-expansion.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: brace-expansion 3 | version: 1.1.11 4 | type: npm 5 | summary: Brace expansion as known from sh/bash 6 | homepage: https://github.com/juliangruber/brace-expansion 7 | license: mit 8 | licenses: 9 | - sources: LICENSE 10 | text: | 11 | MIT License 12 | 13 | Copyright (c) 2013 Julian Gruber 14 | 15 | Permission is hereby granted, free of charge, to any person obtaining a copy 16 | of this software and associated documentation files (the "Software"), to deal 17 | in the Software without restriction, including without limitation the rights 18 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 19 | copies of the Software, and to permit persons to whom the Software is 20 | furnished to do so, subject to the following conditions: 21 | 22 | The above copyright notice and this permission notice shall be included in all 23 | copies or substantial portions of the Software. 24 | 25 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 26 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 27 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 28 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 29 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 30 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 31 | SOFTWARE. 32 | - sources: README.md 33 | text: |- 34 | (MIT) 35 | 36 | Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> 37 | 38 | Permission is hereby granted, free of charge, to any person obtaining a copy of 39 | this software and associated documentation files (the "Software"), to deal in 40 | the Software without restriction, including without limitation the rights to 41 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 42 | of the Software, and to permit persons to whom the Software is furnished to do 43 | so, subject to the following conditions: 44 | 45 | The above copyright notice and this permission notice shall be included in all 46 | copies or substantial portions of the Software. 47 | 48 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 49 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 50 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 51 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 52 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 53 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 54 | SOFTWARE. 55 | notices: [] 56 | -------------------------------------------------------------------------------- /.licenses/npm/concat-map.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: concat-map 3 | version: 0.0.1 4 | type: npm 5 | summary: concatenative mapdashery 6 | homepage: https://github.com/substack/node-concat-map#readme 7 | license: other 8 | licenses: 9 | - sources: LICENSE 10 | text: | 11 | This software is released under the MIT license: 12 | 13 | Permission is hereby granted, free of charge, to any person obtaining a copy of 14 | this software and associated documentation files (the "Software"), to deal in 15 | the Software without restriction, including without limitation the rights to 16 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 17 | the Software, and to permit persons to whom the Software is furnished to do so, 18 | subject to the following conditions: 19 | 20 | The above copyright notice and this permission notice shall be included in all 21 | copies or substantial portions of the Software. 22 | 23 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 24 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 25 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 26 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 27 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 28 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 29 | - sources: README.markdown 30 | text: MIT 31 | notices: [] 32 | -------------------------------------------------------------------------------- /.licenses/npm/deprecation.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: deprecation 3 | version: 2.3.1 4 | type: npm 5 | summary: Log a deprecation message with stack 6 | homepage: https://github.com/gr2m/deprecation#readme 7 | license: isc 8 | licenses: 9 | - sources: LICENSE 10 | text: | 11 | The ISC License 12 | 13 | Copyright (c) Gregor Martynus and contributors 14 | 15 | Permission to use, copy, modify, and/or distribute this software for any 16 | purpose with or without fee is hereby granted, provided that the above 17 | copyright notice and this permission notice appear in all copies. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 20 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 21 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 22 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 23 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 24 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 25 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 26 | - sources: README.md 27 | text: "[ISC](LICENSE)" 28 | notices: [] 29 | -------------------------------------------------------------------------------- /.licenses/npm/is-plain-object.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: is-plain-object 3 | version: 5.0.0 4 | type: npm 5 | summary: Returns true if an object was created by the `Object` constructor, or Object.create(null). 6 | homepage: https://github.com/jonschlinkert/is-plain-object 7 | license: mit 8 | licenses: 9 | - sources: LICENSE 10 | text: | 11 | The MIT License (MIT) 12 | 13 | Copyright (c) 2014-2017, Jon Schlinkert. 14 | 15 | Permission is hereby granted, free of charge, to any person obtaining a copy 16 | of this software and associated documentation files (the "Software"), to deal 17 | in the Software without restriction, including without limitation the rights 18 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 19 | copies of the Software, and to permit persons to whom the Software is 20 | furnished to do so, subject to the following conditions: 21 | 22 | The above copyright notice and this permission notice shall be included in 23 | all copies or substantial portions of the Software. 24 | 25 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 26 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 27 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 28 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 29 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 30 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 31 | THE SOFTWARE. 32 | - sources: README.md 33 | text: |- 34 | Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert). 35 | Released under the [MIT License](LICENSE). 36 | 37 | *** 38 | 39 | _This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on April 28, 2019._ 40 | notices: [] 41 | -------------------------------------------------------------------------------- /.licenses/npm/minimatch.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: minimatch 3 | version: 3.1.2 4 | type: npm 5 | summary: a glob matcher in javascript 6 | homepage: 7 | license: isc 8 | licenses: 9 | - sources: LICENSE 10 | text: | 11 | The ISC License 12 | 13 | Copyright (c) Isaac Z. Schlueter and Contributors 14 | 15 | Permission to use, copy, modify, and/or distribute this software for any 16 | purpose with or without fee is hereby granted, provided that the above 17 | copyright notice and this permission notice appear in all copies. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 20 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 21 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 22 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 23 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 24 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 25 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 26 | notices: [] 27 | -------------------------------------------------------------------------------- /.licenses/npm/once.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: once 3 | version: 1.4.0 4 | type: npm 5 | summary: Run a function exactly one time 6 | homepage: https://github.com/isaacs/once#readme 7 | license: isc 8 | licenses: 9 | - sources: LICENSE 10 | text: | 11 | The ISC License 12 | 13 | Copyright (c) Isaac Z. Schlueter and Contributors 14 | 15 | Permission to use, copy, modify, and/or distribute this software for any 16 | purpose with or without fee is hereby granted, provided that the above 17 | copyright notice and this permission notice appear in all copies. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 20 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 21 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 22 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 23 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 24 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 25 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 26 | notices: [] 27 | -------------------------------------------------------------------------------- /.licenses/npm/tunnel.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: tunnel 3 | version: 0.0.6 4 | type: npm 5 | summary: Node HTTP/HTTPS Agents for tunneling proxies 6 | homepage: https://github.com/koichik/node-tunnel/ 7 | license: mit 8 | licenses: 9 | - sources: LICENSE 10 | text: | 11 | The MIT License (MIT) 12 | 13 | Copyright (c) 2012 Koichi Kobayashi 14 | 15 | Permission is hereby granted, free of charge, to any person obtaining a copy 16 | of this software and associated documentation files (the "Software"), to deal 17 | in the Software without restriction, including without limitation the rights 18 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 19 | copies of the Software, and to permit persons to whom the Software is 20 | furnished to do so, subject to the following conditions: 21 | 22 | The above copyright notice and this permission notice shall be included in 23 | all copies or substantial portions of the Software. 24 | 25 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 26 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 27 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 28 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 29 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 30 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 31 | THE SOFTWARE. 32 | - sources: README.md 33 | text: Licensed under the [MIT](https://github.com/koichik/node-tunnel/blob/master/LICENSE) 34 | license. 35 | notices: [] 36 | -------------------------------------------------------------------------------- /.licenses/npm/undici-types.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: undici-types 3 | version: 5.26.5 4 | type: npm 5 | summary: A stand-alone types package for Undici 6 | homepage: https://undici.nodejs.org 7 | license: mit 8 | licenses: 9 | - sources: Auto-generated MIT license text 10 | text: | 11 | MIT License 12 | 13 | Permission is hereby granted, free of charge, to any person obtaining a copy 14 | of this software and associated documentation files (the "Software"), to deal 15 | in the Software without restriction, including without limitation the rights 16 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 17 | copies of the Software, and to permit persons to whom the Software is 18 | furnished to do so, subject to the following conditions: 19 | 20 | The above copyright notice and this permission notice shall be included in all 21 | copies or substantial portions of the Software. 22 | 23 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 24 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 25 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 26 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 27 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 28 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 29 | SOFTWARE. 30 | notices: [] 31 | -------------------------------------------------------------------------------- /.licenses/npm/undici.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: undici 3 | version: 5.28.5 4 | type: npm 5 | summary: An HTTP/1.1 client, written from scratch for Node.js 6 | homepage: https://undici.nodejs.org 7 | license: mit 8 | licenses: 9 | - sources: LICENSE 10 | text: | 11 | MIT License 12 | 13 | Copyright (c) Matteo Collina and Undici contributors 14 | 15 | Permission is hereby granted, free of charge, to any person obtaining a copy 16 | of this software and associated documentation files (the "Software"), to deal 17 | in the Software without restriction, including without limitation the rights 18 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 19 | copies of the Software, and to permit persons to whom the Software is 20 | furnished to do so, subject to the following conditions: 21 | 22 | The above copyright notice and this permission notice shall be included in all 23 | copies or substantial portions of the Software. 24 | 25 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 26 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 27 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 28 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 29 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 30 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 31 | SOFTWARE. 32 | - sources: README.md 33 | text: MIT 34 | notices: [] 35 | -------------------------------------------------------------------------------- /.licenses/npm/universal-user-agent.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: universal-user-agent 3 | version: 6.0.0 4 | type: npm 5 | summary: Get a user agent string in both browser and node 6 | homepage: https://github.com/gr2m/universal-user-agent#readme 7 | license: isc 8 | licenses: 9 | - sources: LICENSE.md 10 | text: | 11 | # [ISC License](https://spdx.org/licenses/ISC) 12 | 13 | Copyright (c) 2018, Gregor Martynus (https://github.com/gr2m) 14 | 15 | Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 18 | - sources: README.md 19 | text: "[ISC](LICENSE.md)" 20 | notices: [] 21 | -------------------------------------------------------------------------------- /.licenses/npm/uuid.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: uuid 3 | version: 8.3.2 4 | type: npm 5 | summary: RFC4122 (v1, v4, and v5) UUIDs 6 | homepage: 7 | license: mit 8 | licenses: 9 | - sources: LICENSE.md 10 | text: | 11 | The MIT License (MIT) 12 | 13 | Copyright (c) 2010-2020 Robert Kieffer and other contributors 14 | 15 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 20 | notices: [] 21 | -------------------------------------------------------------------------------- /.licenses/npm/wrappy.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: wrappy 3 | version: 1.0.2 4 | type: npm 5 | summary: Callback wrapping utility 6 | homepage: https://github.com/npm/wrappy 7 | license: isc 8 | licenses: 9 | - sources: LICENSE 10 | text: | 11 | The ISC License 12 | 13 | Copyright (c) Isaac Z. Schlueter and Contributors 14 | 15 | Permission to use, copy, modify, and/or distribute this software for any 16 | purpose with or without fee is hereby granted, provided that the above 17 | copyright notice and this permission notice appear in all copies. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 20 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 21 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 22 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 23 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 24 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 25 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 26 | notices: [] 27 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | engine-strict=true -------------------------------------------------------------------------------- /.prettierrc.yml: -------------------------------------------------------------------------------- 1 | arrowParens: avoid 2 | bracketSpacing: false 3 | semi: false 4 | singleQuote: true 5 | trailingComma: none 6 | -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @actions/actions-launch 2 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2019 GitHub, Inc. and contributors 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # actions/github-script 2 | 3 | [![Integration](https://github.com/actions/github-script/actions/workflows/integration.yml/badge.svg?branch=main&event=push)](https://github.com/actions/github-script/actions/workflows/integration.yml) 4 | [![CI](https://github.com/actions/github-script/actions/workflows/ci.yml/badge.svg?branch=main&event=push)](https://github.com/actions/github-script/actions/workflows/ci.yml) 5 | [![Licensed](https://github.com/actions/github-script/actions/workflows/licensed.yml/badge.svg?branch=main&event=push)](https://github.com/actions/github-script/actions/workflows/licensed.yml) 6 | 7 | This action makes it easy to quickly write a script in your workflow that 8 | uses the GitHub API and the workflow run context. 9 | 10 | To use this action, provide an input named `script` that contains the body of an asynchronous JavaScript function call. 11 | The following arguments will be provided: 12 | 13 | - `github` A pre-authenticated 14 | [octokit/rest.js](https://octokit.github.io/rest.js) client with pagination plugins 15 | - `context` An object containing the [context of the workflow 16 | run](https://github.com/actions/toolkit/blob/main/packages/github/src/context.ts) 17 | - `core` A reference to the [@actions/core](https://github.com/actions/toolkit/tree/main/packages/core) package 18 | - `glob` A reference to the [@actions/glob](https://github.com/actions/toolkit/tree/main/packages/glob) package 19 | - `io` A reference to the [@actions/io](https://github.com/actions/toolkit/tree/main/packages/io) package 20 | - `exec` A reference to the [@actions/exec](https://github.com/actions/toolkit/tree/main/packages/exec) package 21 | - `require` A proxy wrapper around the normal Node.js `require` to enable 22 | requiring relative paths (relative to the current working directory) and 23 | requiring npm packages installed in the current working directory. If for 24 | some reason you need the non-wrapped `require`, there is an escape hatch 25 | available: `__original_require__` is the original value of `require` without 26 | our wrapping applied. 27 | 28 | Since the `script` is just a function body, these values will already be 29 | defined, so you don't have to import them (see examples below). 30 | 31 | See [octokit/rest.js](https://octokit.github.io/rest.js/) for the API client 32 | documentation. 33 | 34 | ## Breaking Changes 35 | 36 | ### V7 37 | 38 | Version 7 of this action updated the runtime to Node 20 - https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#runs-for-javascript-actions 39 | 40 | All scripts are now run with Node 20 instead of Node 16 and are affected by any breaking changes between Node 16 and 20 41 | 42 | The `previews` input now only applies to GraphQL API calls as REST API previews are no longer necessary - https://github.blog/changelog/2021-10-14-rest-api-preview-promotions/. 43 | 44 | ### V6 45 | 46 | Version 6 of this action updated the runtime to Node 16 - https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#runs-for-javascript-actions 47 | 48 | All scripts are now run with Node 16 instead of Node 12 and are affected by any breaking changes between Node 12 and 16. 49 | 50 | ### V5 51 | 52 | Version 5 of this action includes the version 5 of `@actions/github` and `@octokit/plugin-rest-endpoint-methods`. As part of this update, the Octokit context available via `github` no longer has REST methods directly. These methods are available via `github.rest.*` - https://github.com/octokit/plugin-rest-endpoint-methods.js/releases/tag/v5.0.0 53 | 54 | For example, `github.issues.createComment` in V4 becomes `github.rest.issues.createComment` in V5 55 | 56 | `github.request`, `github.paginate`, and `github.graphql` are unchanged. 57 | 58 | ## Development 59 | 60 | See [development.md](/docs/development.md). 61 | 62 | ## Passing inputs to the script 63 | 64 | Actions expressions are evaluated before the `script` is passed to the action, so the result of any expressions 65 | *will be evaluated as JavaScript code*. 66 | 67 | It's highly recommended to *not* evaluate expressions directly in the `script` to avoid 68 | [script injections](https://docs.github.com/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions#understanding-the-risk-of-script-injections) 69 | and potential `SyntaxError`s when the expression is not valid JavaScript code (particularly when it comes to improperly escaped strings). 70 | 71 | To pass inputs, set `env` vars on the action step and reference them in your script with `process.env`: 72 | 73 | ```yaml 74 | - uses: actions/github-script@v7 75 | env: 76 | TITLE: ${{ github.event.pull_request.title }} 77 | with: 78 | script: | 79 | const title = process.env.TITLE; 80 | if (title.startsWith('octocat')) { 81 | console.log("PR title starts with 'octocat'"); 82 | } else { 83 | console.error("PR title did not start with 'octocat'"); 84 | } 85 | ``` 86 | 87 | ## Reading step results 88 | 89 | The return value of the script will be in the step's outputs under the 90 | "result" key. 91 | 92 | ```yaml 93 | - uses: actions/github-script@v7 94 | id: set-result 95 | with: 96 | script: return "Hello!" 97 | result-encoding: string 98 | - name: Get result 99 | run: echo "${{steps.set-result.outputs.result}}" 100 | ``` 101 | 102 | See ["Result encoding"](#result-encoding) for details on how the encoding of 103 | these outputs can be changed. 104 | 105 | ## Result encoding 106 | 107 | By default, the JSON-encoded return value of the function is set as the "result" in the 108 | output of a github-script step. For some workflows, string encoding is preferred. This option can be set using the 109 | `result-encoding` input: 110 | 111 | ```yaml 112 | - uses: actions/github-script@v7 113 | id: my-script 114 | with: 115 | result-encoding: string 116 | script: return "I will be string (not JSON) encoded!" 117 | ``` 118 | 119 | ## Retries 120 | 121 | By default, requests made with the `github` instance will not be retried. You can configure this with the `retries` option: 122 | 123 | ```yaml 124 | - uses: actions/github-script@v7 125 | id: my-script 126 | with: 127 | result-encoding: string 128 | retries: 3 129 | script: | 130 | github.rest.issues.get({ 131 | issue_number: context.issue.number, 132 | owner: context.repo.owner, 133 | repo: context.repo.repo, 134 | }) 135 | ``` 136 | 137 | In this example, request failures from `github.rest.issues.get()` will be retried up to 3 times. 138 | 139 | You can also configure which status codes should be exempt from retries via the `retry-exempt-status-codes` option: 140 | 141 | ```yaml 142 | - uses: actions/github-script@v7 143 | id: my-script 144 | with: 145 | result-encoding: string 146 | retries: 3 147 | retry-exempt-status-codes: 400,401 148 | script: | 149 | github.rest.issues.get({ 150 | issue_number: context.issue.number, 151 | owner: context.repo.owner, 152 | repo: context.repo.repo, 153 | }) 154 | ``` 155 | 156 | By default, the following status codes will not be retried: `400, 401, 403, 404, 422` [(source)](https://github.com/octokit/plugin-retry.js/blob/9a2443746c350b3beedec35cf26e197ea318a261/src/index.ts#L14). 157 | 158 | These retries are implemented using the [octokit/plugin-retry.js](https://github.com/octokit/plugin-retry.js) plugin. The retries use [exponential backoff](https://en.wikipedia.org/wiki/Exponential_backoff) to space out retries. ([source](https://github.com/octokit/plugin-retry.js/blob/9a2443746c350b3beedec35cf26e197ea318a261/src/error-request.ts#L13)) 159 | 160 | ## Examples 161 | 162 | Note that `github-token` is optional in this action, and the input is there 163 | in case you need to use a non-default token. 164 | 165 | By default, github-script will use the token provided to your workflow. 166 | 167 | ### Print the available attributes of context 168 | 169 | ```yaml 170 | - name: View context attributes 171 | uses: actions/github-script@v7 172 | with: 173 | script: console.log(context) 174 | ``` 175 | 176 | ### Comment on an issue 177 | 178 | ```yaml 179 | on: 180 | issues: 181 | types: [opened] 182 | 183 | jobs: 184 | comment: 185 | runs-on: ubuntu-latest 186 | steps: 187 | - uses: actions/github-script@v7 188 | with: 189 | script: | 190 | github.rest.issues.createComment({ 191 | issue_number: context.issue.number, 192 | owner: context.repo.owner, 193 | repo: context.repo.repo, 194 | body: '👋 Thanks for reporting!' 195 | }) 196 | ``` 197 | 198 | ### Apply a label to an issue 199 | 200 | ```yaml 201 | on: 202 | issues: 203 | types: [opened] 204 | 205 | jobs: 206 | apply-label: 207 | runs-on: ubuntu-latest 208 | steps: 209 | - uses: actions/github-script@v7 210 | with: 211 | script: | 212 | github.rest.issues.addLabels({ 213 | issue_number: context.issue.number, 214 | owner: context.repo.owner, 215 | repo: context.repo.repo, 216 | labels: ['Triage'] 217 | }) 218 | ``` 219 | 220 | ### Welcome a first-time contributor 221 | 222 | You can format text in comments using the same [Markdown syntax](https://docs.github.com/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax) as the GitHub web interface: 223 | 224 | ```yaml 225 | on: pull_request_target 226 | 227 | jobs: 228 | welcome: 229 | runs-on: ubuntu-latest 230 | steps: 231 | - uses: actions/github-script@v7 232 | with: 233 | script: | 234 | // Get a list of all issues created by the PR opener 235 | // See: https://octokit.github.io/rest.js/#pagination 236 | const creator = context.payload.sender.login 237 | const opts = github.rest.issues.listForRepo.endpoint.merge({ 238 | ...context.issue, 239 | creator, 240 | state: 'all' 241 | }) 242 | const issues = await github.paginate(opts) 243 | 244 | for (const issue of issues) { 245 | if (issue.number === context.issue.number) { 246 | continue 247 | } 248 | 249 | if (issue.pull_request) { 250 | return // Creator is already a contributor. 251 | } 252 | } 253 | 254 | await github.rest.issues.createComment({ 255 | issue_number: context.issue.number, 256 | owner: context.repo.owner, 257 | repo: context.repo.repo, 258 | body: `**Welcome**, new contributor! 259 | 260 | Please make sure you've read our [contributing guide](CONTRIBUTING.md) and we look forward to reviewing your Pull request shortly ✨` 261 | }) 262 | ``` 263 | 264 | ### Download data from a URL 265 | 266 | You can use the `github` object to access the Octokit API. For 267 | instance, `github.request` 268 | 269 | ```yaml 270 | on: pull_request 271 | 272 | jobs: 273 | diff: 274 | runs-on: ubuntu-latest 275 | steps: 276 | - uses: actions/github-script@v7 277 | with: 278 | script: | 279 | const diff_url = context.payload.pull_request.diff_url 280 | const result = await github.request(diff_url) 281 | console.log(result) 282 | ``` 283 | 284 | _(Note that this particular example only works for a public URL, where the 285 | diff URL is publicly accessible. Getting the diff for a private URL requires 286 | using the API.)_ 287 | 288 | This will print the full diff object in the screen; `result.data` will 289 | contain the actual diff text. 290 | 291 | ### Run custom GraphQL queries 292 | 293 | You can use the `github.graphql` object to run custom GraphQL queries against the GitHub API. 294 | 295 | ```yaml 296 | jobs: 297 | list-issues: 298 | runs-on: ubuntu-latest 299 | steps: 300 | - uses: actions/github-script@v7 301 | with: 302 | script: | 303 | const query = `query($owner:String!, $name:String!, $label:String!) { 304 | repository(owner:$owner, name:$name){ 305 | issues(first:100, labels: [$label]) { 306 | nodes { 307 | id 308 | } 309 | } 310 | } 311 | }`; 312 | const variables = { 313 | owner: context.repo.owner, 314 | name: context.repo.repo, 315 | label: 'wontfix' 316 | } 317 | const result = await github.graphql(query, variables) 318 | console.log(result) 319 | ``` 320 | 321 | ### Run a separate file 322 | 323 | If you don't want to inline your entire script that you want to run, you can 324 | use a separate JavaScript module in your repository like so: 325 | 326 | ```yaml 327 | on: push 328 | 329 | jobs: 330 | echo-input: 331 | runs-on: ubuntu-latest 332 | steps: 333 | - uses: actions/checkout@v4 334 | - uses: actions/github-script@v7 335 | with: 336 | script: | 337 | const script = require('./path/to/script.js') 338 | console.log(script({github, context})) 339 | ``` 340 | 341 | And then export a function from your module: 342 | 343 | ```javascript 344 | module.exports = ({github, context}) => { 345 | return context.payload.client_payload.value 346 | } 347 | ``` 348 | 349 | Note that because you can't `require` things like the GitHub context or 350 | Actions Toolkit libraries, you'll want to pass them as arguments to your 351 | external function. 352 | 353 | Additionally, you'll want to use the [checkout 354 | action](https://github.com/actions/checkout) to make sure your script file is 355 | available. 356 | 357 | ### Run a separate file with an async function 358 | 359 | You can also use async functions in this manner, as long as you `await` it in 360 | the inline script. 361 | 362 | In your workflow: 363 | 364 | ```yaml 365 | on: push 366 | 367 | jobs: 368 | echo-input: 369 | runs-on: ubuntu-latest 370 | steps: 371 | - uses: actions/checkout@v4 372 | - uses: actions/github-script@v7 373 | env: 374 | SHA: '${{env.parentSHA}}' 375 | with: 376 | script: | 377 | const script = require('./path/to/script.js') 378 | await script({github, context, core}) 379 | ``` 380 | 381 | And then export an async function from your module: 382 | 383 | ```javascript 384 | module.exports = async ({github, context, core}) => { 385 | const {SHA} = process.env 386 | const commit = await github.rest.repos.getCommit({ 387 | owner: context.repo.owner, 388 | repo: context.repo.repo, 389 | ref: `${SHA}` 390 | }) 391 | core.exportVariable('author', commit.data.commit.author.email) 392 | } 393 | ``` 394 | 395 | ### Use npm packages 396 | 397 | Like importing your own files above, you can also use installed modules. 398 | Note that this is achieved with a wrapper on top `require`, so if you're 399 | trying to require a module inside your own file, you might need to import 400 | it externally or pass the `require` wrapper to your file: 401 | 402 | ```yaml 403 | on: push 404 | 405 | jobs: 406 | echo-input: 407 | runs-on: ubuntu-latest 408 | steps: 409 | - uses: actions/checkout@v4 410 | - uses: actions/setup-node@v4 411 | with: 412 | node-version: '20.x' 413 | - run: npm ci 414 | # or one-off: 415 | - run: npm install execa 416 | - uses: actions/github-script@v7 417 | with: 418 | script: | 419 | const execa = require('execa') 420 | 421 | const { stdout } = await execa('echo', ['hello', 'world']) 422 | 423 | console.log(stdout) 424 | ``` 425 | 426 | ### Use ESM `import` 427 | 428 | To import an ESM file, you'll need to reference your script by an absolute path and ensure you have a `package.json` file with `"type": "module"` specified. 429 | 430 | For a script in your repository `src/print-stuff.js`: 431 | 432 | ```js 433 | export default function printStuff() { 434 | console.log('stuff') 435 | } 436 | ``` 437 | 438 | ```yaml 439 | on: push 440 | 441 | jobs: 442 | print-stuff: 443 | runs-on: ubuntu-latest 444 | steps: 445 | - uses: actions/checkout@v4 446 | - uses: actions/github-script@v7 447 | with: 448 | script: | 449 | const { default: printStuff } = await import('${{ github.workspace }}/src/print-stuff.js') 450 | 451 | await printStuff() 452 | ``` 453 | 454 | ### Use scripts with jsDoc support 455 | 456 | If you want type support for your scripts, you could use the command below to install the 457 | `@actions/github-script` type declaration. 458 | ```sh 459 | $ npm i -D @actions/github-script@github:actions/github-script 460 | ``` 461 | 462 | And then add the `jsDoc` declaration to your script like this: 463 | ```js 464 | // @ts-check 465 | /** @param {import('@actions/github-script').AsyncFunctionArguments} AsyncFunctionArguments */ 466 | export default async ({ core, context }) => { 467 | core.debug("Running something at the moment"); 468 | return context.actor; 469 | }; 470 | ``` 471 | 472 | 473 | ### Using a separate GitHub token 474 | 475 | The `GITHUB_TOKEN` used by default is scoped to the current repository, see [Authentication in a workflow](https://docs.github.com/actions/reference/authentication-in-a-workflow). 476 | 477 | If you need access to a different repository or an API that the `GITHUB_TOKEN` doesn't have permissions to, you can provide your own [PAT](https://help.github.com/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line) as a secret using the `github-token` input. 478 | 479 | [Learn more about creating and using encrypted secrets](https://docs.github.com/actions/reference/encrypted-secrets) 480 | 481 | ```yaml 482 | on: 483 | issues: 484 | types: [opened] 485 | 486 | jobs: 487 | apply-label: 488 | runs-on: ubuntu-latest 489 | steps: 490 | - uses: actions/github-script@v7 491 | with: 492 | github-token: ${{ secrets.MY_PAT }} 493 | script: | 494 | github.rest.issues.addLabels({ 495 | issue_number: context.issue.number, 496 | owner: context.repo.owner, 497 | repo: context.repo.repo, 498 | labels: ['Triage'] 499 | }) 500 | ``` 501 | 502 | ### Using exec package 503 | 504 | The provided [@actions/exec](https://github.com/actions/toolkit/tree/main/packages/exec) package allows to execute command or tools in a cross platform way: 505 | 506 | ```yaml 507 | on: push 508 | 509 | jobs: 510 | use-exec: 511 | runs-on: ubuntu-latest 512 | steps: 513 | - uses: actions/checkout@v4 514 | - uses: actions/github-script@v7 515 | with: 516 | script: | 517 | const exitCode = await exec.exec('echo', ['hello']) 518 | 519 | console.log(exitCode) 520 | ``` 521 | 522 | `exec` packages provides `getExecOutput` function to retrieve stdout and stderr from executed command: 523 | 524 | ```yaml 525 | on: push 526 | 527 | jobs: 528 | use-get-exec-output: 529 | runs-on: ubuntu-latest 530 | steps: 531 | - uses: actions/checkout@v4 532 | - uses: actions/github-script@v7 533 | with: 534 | script: | 535 | const { 536 | exitCode, 537 | stdout, 538 | stderr 539 | } = await exec.getExecOutput('echo', ['hello']); 540 | 541 | console.log(exitCode, stdout, stderr) 542 | ``` 543 | -------------------------------------------------------------------------------- /__test__/async-function.test.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable @typescript-eslint/no-explicit-any */ 2 | 3 | import {callAsyncFunction} from '../src/async-function' 4 | 5 | describe('callAsyncFunction', () => { 6 | test('calls the function with its arguments', async () => { 7 | const result = await callAsyncFunction({foo: 'bar'} as any, 'return foo') 8 | expect(result).toEqual('bar') 9 | }) 10 | 11 | test('throws on ReferenceError', async () => { 12 | expect.assertions(1) 13 | 14 | try { 15 | await callAsyncFunction({} as any, 'proces') 16 | } catch (err) { 17 | expect(err).toBeInstanceOf(ReferenceError) 18 | } 19 | }) 20 | 21 | test('can access process', async () => { 22 | await callAsyncFunction({} as any, 'process') 23 | }) 24 | 25 | test('can access console', async () => { 26 | await callAsyncFunction({} as any, 'console') 27 | }) 28 | }) 29 | -------------------------------------------------------------------------------- /__test__/get-retry-options.test.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable @typescript-eslint/no-explicit-any */ 2 | 3 | import {getRetryOptions} from '../src/retry-options' 4 | 5 | describe('getRequestOptions', () => { 6 | test('retries disabled if retries == 0', async () => { 7 | const [retryOptions, requestOptions] = getRetryOptions( 8 | 0, 9 | [400, 500, 502], 10 | [] 11 | ) 12 | 13 | expect(retryOptions.enabled).toBe(false) 14 | expect(retryOptions.doNotRetry).toBeFalsy() 15 | 16 | expect(requestOptions?.retries).toBeFalsy() 17 | }) 18 | 19 | test('properties set if retries > 0', async () => { 20 | const [retryOptions, requestOptions] = getRetryOptions( 21 | 1, 22 | [400, 500, 502], 23 | [] 24 | ) 25 | 26 | expect(retryOptions.enabled).toBe(true) 27 | expect(retryOptions.doNotRetry).toEqual([400, 500, 502]) 28 | 29 | expect(requestOptions?.retries).toEqual(1) 30 | }) 31 | 32 | test('properties set if retries > 0', async () => { 33 | const [retryOptions, requestOptions] = getRetryOptions( 34 | 1, 35 | [400, 500, 502], 36 | [] 37 | ) 38 | 39 | expect(retryOptions.enabled).toBe(true) 40 | expect(retryOptions.doNotRetry).toEqual([400, 500, 502]) 41 | 42 | expect(requestOptions?.retries).toEqual(1) 43 | }) 44 | 45 | test('retryOptions.doNotRetry not set if exemptStatusCodes isEmpty', async () => { 46 | const [retryOptions, requestOptions] = getRetryOptions(1, [], []) 47 | 48 | expect(retryOptions.enabled).toBe(true) 49 | expect(retryOptions.doNotRetry).toBeUndefined() 50 | 51 | expect(requestOptions?.retries).toEqual(1) 52 | }) 53 | 54 | test('requestOptions does not override defaults from @actions/github', async () => { 55 | const [retryOptions, requestOptions] = getRetryOptions(1, [], { 56 | request: { 57 | agent: 'default-user-agent' 58 | }, 59 | foo: 'bar' 60 | }) 61 | 62 | expect(retryOptions.enabled).toBe(true) 63 | expect(retryOptions.doNotRetry).toBeUndefined() 64 | 65 | expect(requestOptions?.retries).toEqual(1) 66 | expect(requestOptions?.agent).toEqual('default-user-agent') 67 | expect(requestOptions?.foo).toBeUndefined() // this should not be in the `options.request` object, but at the same level as `request` 68 | }) 69 | }) 70 | -------------------------------------------------------------------------------- /action.yml: -------------------------------------------------------------------------------- 1 | name: GitHub Script 2 | author: GitHub 3 | description: Run simple scripts using the GitHub client 4 | branding: 5 | color: blue 6 | icon: code 7 | inputs: 8 | script: 9 | description: The script to run 10 | required: true 11 | github-token: 12 | description: The GitHub token used to create an authenticated client 13 | default: ${{ github.token }} 14 | required: false 15 | debug: 16 | 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. 17 | default: ${{ runner.debug == '1' }} 18 | user-agent: 19 | description: An optional user-agent string 20 | default: actions/github-script 21 | previews: 22 | description: A comma-separated list of GraphQL API previews to accept 23 | result-encoding: 24 | description: Either "string" or "json" (default "json")—how the result will be encoded 25 | default: json 26 | retries: 27 | description: The number of times to retry a request 28 | default: "0" 29 | retry-exempt-status-codes: 30 | description: A comma separated list of status codes that will NOT be retried e.g. "400,500". No effect unless `retries` is set 31 | default: 400,401,403,404,422 # from https://github.com/octokit/plugin-retry.js/blob/9a2443746c350b3beedec35cf26e197ea318a261/src/index.ts#L14 32 | base-url: 33 | description: An optional GitHub REST API URL to connect to a different GitHub instance. For example, https://my.github-enterprise-server.com/api/v3 34 | required: false 35 | outputs: 36 | result: 37 | description: The return value of the script, stringified with `JSON.stringify` 38 | runs: 39 | using: node20 40 | main: dist/index.js 41 | -------------------------------------------------------------------------------- /docs/development.md: -------------------------------------------------------------------------------- 1 | # Development 2 | 3 | ## How this action works 4 | 5 | This action works by evaluating the user input as the body of an asynchronous 6 | JavaScript function. See [main.ts](/src/main.ts) for details. 7 | 8 | ## Building 9 | 10 | Before the action can be used, it needs to be compiled to JavaScript: 11 | 12 | ```shell 13 | bash> npm run build 14 | ``` 15 | 16 | It also has a pre-commit hook configured via 17 | [husky](https://www.npmjs.com/package/husky) that should run the build script 18 | before each commit. Additionally, this hook formats code and lints it, as 19 | well. 20 | 21 | ## Releasing 22 | 23 | Releases are done manually, for now: 24 | 25 | 1. Ensure that the build is up to date with `npm run build`. It's also good to ensure you have the correct dependencies installed by running `npm install` before you build. 26 | 1. Bump the [package.json](/package.json#L3) and [package-lock.json](/package-lock.json#L3) version numbers and commit them. I like to do this with `npm version {major,minor,patch} --no-git-tag-version`. This will bump the version numbers but let you manually commit and tag, yourself. 27 | 1. Update documentation (including updated version numbers). 28 | 1. Tag main with the new version number and create a GitHub release. Make sure you also force-create and force-push tags for minor and patch updates. For example, when creating v5.2.0 (a minor bump), you want to create (or update) `v5`, `v5.2`, and `v5.2.0`. 29 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@actions/github-script", 3 | "description": "A GitHub action for executing a simple script", 4 | "version": "7.0.1", 5 | "author": "GitHub", 6 | "license": "MIT", 7 | "main": "dist/index.js", 8 | "types": "types/async-function.d.ts", 9 | "private": true, 10 | "engines": { 11 | "node": ">=20.0.0 <21.0.0" 12 | }, 13 | "scripts": { 14 | "build": "npm run build:types && ncc build src/main.ts", 15 | "build:types": "tsc src/async-function.ts -t es5 --declaration --allowJs --emitDeclarationOnly --outDir types", 16 | "format:check": "prettier --check src __test__", 17 | "format:write": "prettier --write src __test__", 18 | "lint": "eslint src __test__", 19 | "style:check": "run-p --continue-on-error --aggregate-output format:check lint", 20 | "style:write": "run-p --continue-on-error --aggregate-output format:write lint", 21 | "pre-commit": "run-s style:write test build", 22 | "test": "jest", 23 | "prepare": "husky" 24 | }, 25 | "jest": { 26 | "preset": "ts-jest", 27 | "testEnvironment": "node", 28 | "transform": { 29 | "^.+\\.ts$": [ 30 | "ts-jest", 31 | { 32 | "diagnostics": { 33 | "ignoreCodes": [ 34 | "151001" 35 | ] 36 | } 37 | } 38 | ] 39 | } 40 | }, 41 | "dependencies": { 42 | "@actions/core": "^1.10.1", 43 | "@actions/exec": "^1.1.1", 44 | "@actions/github": "^6.0.0", 45 | "@actions/glob": "^0.4.0", 46 | "@actions/io": "^1.1.3", 47 | "@octokit/core": "^5.0.1", 48 | "@octokit/plugin-request-log": "^4.0.0", 49 | "@octokit/plugin-retry": "^6.0.1", 50 | "@types/node": "^20.9.0" 51 | }, 52 | "devDependencies": { 53 | "@types/jest": "^29.5.5", 54 | "@typescript-eslint/eslint-plugin": "^6.7.5", 55 | "@typescript-eslint/parser": "^6.7.5", 56 | "@vercel/ncc": "^0.38.0", 57 | "eslint": "^8.51.0", 58 | "eslint-config-prettier": "^9.0.0", 59 | "eslint-plugin-prettier": "^5.0.1", 60 | "husky": "^9.1.1", 61 | "jest": "^29.7.0", 62 | "npm-run-all": "^4.1.5", 63 | "prettier": "^3.0.3", 64 | "ts-jest": "^29.1.1", 65 | "typescript": "^5.2.2" 66 | } 67 | } -------------------------------------------------------------------------------- /src/async-function.ts: -------------------------------------------------------------------------------- 1 | import * as core from '@actions/core' 2 | import * as exec from '@actions/exec' 3 | import {Context} from '@actions/github/lib/context' 4 | import {GitHub} from '@actions/github/lib/utils' 5 | import * as glob from '@actions/glob' 6 | import * as io from '@actions/io' 7 | 8 | const AsyncFunction = Object.getPrototypeOf(async () => null).constructor 9 | 10 | export declare type AsyncFunctionArguments = { 11 | context: Context 12 | core: typeof core 13 | github: InstanceType 14 | octokit: InstanceType 15 | exec: typeof exec 16 | glob: typeof glob 17 | io: typeof io 18 | require: NodeRequire 19 | __original_require__: NodeRequire 20 | } 21 | 22 | export function callAsyncFunction( 23 | args: AsyncFunctionArguments, 24 | source: string 25 | ): Promise { 26 | const fn = new AsyncFunction(...Object.keys(args), source) 27 | return fn(...Object.values(args)) 28 | } 29 | -------------------------------------------------------------------------------- /src/main.ts: -------------------------------------------------------------------------------- 1 | import * as core from '@actions/core' 2 | import * as exec from '@actions/exec' 3 | import {context, getOctokit} from '@actions/github' 4 | import {defaults as defaultGitHubOptions} from '@actions/github/lib/utils' 5 | import * as glob from '@actions/glob' 6 | import * as io from '@actions/io' 7 | import {requestLog} from '@octokit/plugin-request-log' 8 | import {retry} from '@octokit/plugin-retry' 9 | import {RequestRequestOptions} from '@octokit/types' 10 | import {callAsyncFunction} from './async-function' 11 | import {RetryOptions, getRetryOptions, parseNumberArray} from './retry-options' 12 | import {wrapRequire} from './wrap-require' 13 | 14 | process.on('unhandledRejection', handleError) 15 | main().catch(handleError) 16 | 17 | type Options = { 18 | log?: Console 19 | userAgent?: string 20 | baseUrl?: string 21 | previews?: string[] 22 | retry?: RetryOptions 23 | request?: RequestRequestOptions 24 | } 25 | 26 | async function main(): Promise { 27 | const token = core.getInput('github-token', {required: true}) 28 | const debug = core.getBooleanInput('debug') 29 | const userAgent = core.getInput('user-agent') 30 | const previews = core.getInput('previews') 31 | const baseUrl = core.getInput('base-url') 32 | const retries = parseInt(core.getInput('retries')) 33 | const exemptStatusCodes = parseNumberArray( 34 | core.getInput('retry-exempt-status-codes') 35 | ) 36 | const [retryOpts, requestOpts] = getRetryOptions( 37 | retries, 38 | exemptStatusCodes, 39 | defaultGitHubOptions 40 | ) 41 | 42 | const opts: Options = { 43 | log: debug ? console : undefined, 44 | userAgent: userAgent || undefined, 45 | previews: previews ? previews.split(',') : undefined, 46 | retry: retryOpts, 47 | request: requestOpts 48 | } 49 | 50 | // Setting `baseUrl` to undefined will prevent the default value from being used 51 | // https://github.com/actions/github-script/issues/436 52 | if (baseUrl) { 53 | opts.baseUrl = baseUrl 54 | } 55 | 56 | const github = getOctokit(token, opts, retry, requestLog) 57 | const script = core.getInput('script', {required: true}) 58 | 59 | // Using property/value shorthand on `require` (e.g. `{require}`) causes compilation errors. 60 | const result = await callAsyncFunction( 61 | { 62 | require: wrapRequire, 63 | __original_require__: __non_webpack_require__, 64 | github, 65 | octokit: github, 66 | context, 67 | core, 68 | exec, 69 | glob, 70 | io 71 | }, 72 | script 73 | ) 74 | 75 | let encoding = core.getInput('result-encoding') 76 | encoding = encoding ? encoding : 'json' 77 | 78 | let output 79 | 80 | switch (encoding) { 81 | case 'json': 82 | output = JSON.stringify(result) 83 | break 84 | case 'string': 85 | output = String(result) 86 | break 87 | default: 88 | throw new Error('"result-encoding" must be either "string" or "json"') 89 | } 90 | 91 | core.setOutput('result', output) 92 | } 93 | 94 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 95 | function handleError(err: any): void { 96 | console.error(err) 97 | core.setFailed(`Unhandled error: ${err}`) 98 | } 99 | -------------------------------------------------------------------------------- /src/retry-options.ts: -------------------------------------------------------------------------------- 1 | import * as core from '@actions/core' 2 | import {OctokitOptions} from '@octokit/core/dist-types/types' 3 | import {RequestRequestOptions} from '@octokit/types' 4 | 5 | export type RetryOptions = { 6 | doNotRetry?: number[] 7 | enabled?: boolean 8 | } 9 | 10 | export function getRetryOptions( 11 | retries: number, 12 | exemptStatusCodes: number[], 13 | defaultOptions: OctokitOptions 14 | ): [RetryOptions, RequestRequestOptions | undefined] { 15 | if (retries <= 0) { 16 | return [{enabled: false}, defaultOptions.request] 17 | } 18 | 19 | const retryOptions: RetryOptions = { 20 | enabled: true 21 | } 22 | 23 | if (exemptStatusCodes.length > 0) { 24 | retryOptions.doNotRetry = exemptStatusCodes 25 | } 26 | 27 | // The GitHub type has some defaults for `options.request` 28 | // see: https://github.com/actions/toolkit/blob/4fbc5c941a57249b19562015edbd72add14be93d/packages/github/src/utils.ts#L15 29 | // We pass these in here so they are not overidden. 30 | const requestOptions: RequestRequestOptions = { 31 | ...defaultOptions.request, 32 | retries 33 | } 34 | 35 | core.debug( 36 | `GitHub client configured with: (retries: ${ 37 | requestOptions.retries 38 | }, retry-exempt-status-code: ${ 39 | retryOptions.doNotRetry ?? 'octokit default: [400, 401, 403, 404, 422]' 40 | })` 41 | ) 42 | 43 | return [retryOptions, requestOptions] 44 | } 45 | 46 | export function parseNumberArray(listString: string): number[] { 47 | if (!listString) { 48 | return [] 49 | } 50 | 51 | const split = listString.trim().split(',') 52 | return split.map(x => parseInt(x)) 53 | } 54 | -------------------------------------------------------------------------------- /src/wrap-require.ts: -------------------------------------------------------------------------------- 1 | import * as path from 'path' 2 | 3 | export const wrapRequire = new Proxy(__non_webpack_require__, { 4 | apply: (target, thisArg, [moduleID]) => { 5 | if (moduleID.startsWith('.')) { 6 | moduleID = path.resolve(moduleID) 7 | return target.apply(thisArg, [moduleID]) 8 | } 9 | 10 | const modulePath = target.resolve.apply(thisArg, [ 11 | moduleID, 12 | { 13 | // Webpack does not have an escape hatch for getting the actual 14 | // module, other than `eval`. 15 | paths: [process.cwd()] 16 | } 17 | ]) 18 | 19 | return target.apply(thisArg, [modulePath]) 20 | }, 21 | 22 | get: (target, prop, receiver) => { 23 | Reflect.get(target, prop, receiver) 24 | } 25 | }) 26 | -------------------------------------------------------------------------------- /tsconfig.eslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "exclude": [] 4 | } -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2018", 4 | "moduleResolution": "node", 5 | "strict": true, 6 | "forceConsistentCasingInFileNames": true 7 | }, 8 | "exclude": ["__test__"] 9 | } 10 | -------------------------------------------------------------------------------- /types/async-function.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import * as core from '@actions/core'; 3 | import * as exec from '@actions/exec'; 4 | import { Context } from '@actions/github/lib/context'; 5 | import { GitHub } from '@actions/github/lib/utils'; 6 | import * as glob from '@actions/glob'; 7 | import * as io from '@actions/io'; 8 | export declare type AsyncFunctionArguments = { 9 | context: Context; 10 | core: typeof core; 11 | github: InstanceType; 12 | octokit: InstanceType; 13 | exec: typeof exec; 14 | glob: typeof glob; 15 | io: typeof io; 16 | require: NodeRequire; 17 | __original_require__: NodeRequire; 18 | }; 19 | export declare function callAsyncFunction(args: AsyncFunctionArguments, source: string): Promise; 20 | -------------------------------------------------------------------------------- /types/non-webpack-require.ts: -------------------------------------------------------------------------------- 1 | declare const __non_webpack_require__: NodeRequire 2 | --------------------------------------------------------------------------------