├── .gitignore ├── CODEOWNERS ├── .gitattributes ├── .prettierrc.yml ├── .licensed.yml ├── tsconfig.json ├── .vscode └── settings.json ├── .eslintrc.yml ├── .github ├── workflows │ ├── integration.yml │ ├── ci.yml │ ├── licensed.yml │ ├── stale.yml │ └── pull-request-test.yml └── ISSUE_TEMPLATE │ ├── feature_request.md │ └── bug_report.md ├── src ├── async-function.ts └── main.ts ├── __test__ └── async-function.test.ts ├── action.yml ├── .licenses └── npm │ ├── wrappy.dep.yml │ ├── once.dep.yml │ ├── deprecation.dep.yml │ ├── universal-user-agent.dep.yml │ ├── @actions │ ├── core.dep.yml │ ├── io.dep.yml │ ├── github.dep.yml │ └── http-client.dep.yml │ ├── @octokit │ ├── types.dep.yml │ ├── plugin-paginate-rest.dep.yml │ ├── core.dep.yml │ ├── plugin-rest-endpoint-methods.dep.yml │ ├── graphql.dep.yml │ ├── endpoint.dep.yml │ ├── request-error.dep.yml │ ├── auth-token.dep.yml │ └── request.dep.yml │ ├── @types │ └── node.dep.yml │ ├── tunnel.dep.yml │ ├── is-plain-object.dep.yml │ ├── node-fetch.dep.yml │ └── before-after-hook.dep.yml ├── LICENSE.md ├── docs └── development.md ├── package.json └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules/ 2 | !/.vscode/ -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @actions/actions-experience -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | .licenses/** -diff linguist-generated=true 2 | -------------------------------------------------------------------------------- /.prettierrc.yml: -------------------------------------------------------------------------------- 1 | arrowParens: avoid 2 | bracketSpacing: false 3 | semi: false 4 | singleQuote: true 5 | trailingComma: none 6 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2018", 4 | "moduleResolution": "node", 5 | "strict": true, 6 | "forceConsistentCasingInFileNames": true 7 | }, 8 | "exclude": ["__test__"] 9 | } 10 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.formatOnSave": true, 3 | "editor.codeActionsOnSave": { 4 | "source.organizeImports": true 5 | }, 6 | "files.exclude": { 7 | "**/dist": true, 8 | "**/node_modules": true 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /.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/@typescript-eslint 9 | rules: 10 | # '@typescript-eslint/explicit-function-return-type': 0 11 | '@typescript-eslint/no-use-before-define': 12 | - 2 13 | - functions: false 14 | -------------------------------------------------------------------------------- /.github/workflows/integration.yml: -------------------------------------------------------------------------------- 1 | name: Integration 2 | 3 | on: 4 | push: {branches: main} 5 | 6 | jobs: 7 | integration: 8 | runs-on: ubuntu-latest 9 | steps: 10 | - id: output-set 11 | uses: actions/github-script@main 12 | with: 13 | script: return core.getInput('input-value') 14 | result-encoding: string 15 | input-value: output 16 | - run: | 17 | if [[ "${{steps.output-set.outputs.result}}" != "output" ]]; then 18 | exit 1 19 | fi 20 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | push: {branches: main} 5 | pull_request: {branches: main} 6 | 7 | jobs: 8 | ci: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: actions/checkout@v2 12 | - uses: actions/setup-node@v1 13 | with: {node-version: 13.x} 14 | - uses: actions/cache@v1 15 | with: 16 | path: ~/.npm 17 | key: ${{runner.os}}-npm-${{hashFiles('**/package-lock.json')}} 18 | restore-keys: ${{runner.os}}-npm- 19 | - run: npm ci 20 | - run: npm run style:check 21 | - run: npm test 22 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /src/async-function.ts: -------------------------------------------------------------------------------- 1 | import * as core from '@actions/core' 2 | import {Context} from '@actions/github/lib/context' 3 | import {GitHub} from '@actions/github/lib/utils' 4 | import * as io from '@actions/io' 5 | 6 | const AsyncFunction = Object.getPrototypeOf(async () => null).constructor 7 | 8 | type AsyncFunctionArguments = { 9 | context: Context 10 | core: typeof core 11 | github: InstanceType 12 | io: typeof io 13 | require: NodeRequire 14 | } 15 | 16 | export function callAsyncFunction( 17 | args: AsyncFunctionArguments, 18 | source: string 19 | ): Promise { 20 | const fn = new AsyncFunction(...Object.keys(args), source) 21 | return fn(...Object.values(args)) 22 | } 23 | -------------------------------------------------------------------------------- /__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 | -------------------------------------------------------------------------------- /.github/workflows/licensed.yml: -------------------------------------------------------------------------------- 1 | name: Licensed 2 | 3 | on: 4 | push: {branches: main} 5 | pull_request: {branches: main} 6 | repository_dispatch: 7 | workflow_dispatch: 8 | 9 | jobs: 10 | test: 11 | runs-on: ubuntu-latest 12 | name: Check licenses 13 | steps: 14 | - uses: actions/checkout@v2 15 | - uses: actions/cache@v1 16 | with: 17 | path: ~/.npm 18 | key: ${{runner.os}}-npm-${{hashFiles('**/package-lock.json')}} 19 | restore-keys: ${{runner.os}}-npm- 20 | - run: npm ci 21 | - name: Install licensed 22 | run: |- 23 | cd $RUNNER_TEMP 24 | curl -Lfs -o licensed.tar.gz https://github.com/github/licensed/releases/download/2.9.2/licensed-2.9.2-linux-x64.tar.gz 25 | sudo tar -xzf licensed.tar.gz 26 | sudo mv licensed /usr/local/bin/licensed 27 | - run: licensed status 28 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /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 17 | default: false 18 | user-agent: 19 | description: An optional user-agent string 20 | default: actions/github-script 21 | previews: 22 | description: A comma-separated list of 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 | outputs: 27 | result: 28 | description: The return value of the script, stringified with `JSON.stringify` 29 | runs: 30 | using: node12 31 | main: dist/index.js 32 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /.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/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: other 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 | -------------------------------------------------------------------------------- /.github/workflows/stale.yml: -------------------------------------------------------------------------------- 1 | name: Stale Issues & PRs 2 | 3 | on: 4 | schedule: 5 | - cron: '0 0 * * *' 6 | workflow_dispatch: 7 | 8 | jobs: 9 | mark_stale: 10 | name: Mark issues and PRs as stale 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: actions/stale@v3 14 | with: 15 | repo-token: ${{ secrets.GITHUB_TOKEN }} 16 | exempt-issue-labels: Not Stale 17 | exempt-pr-labels: Not Stale 18 | stale-issue-message: > 19 | This issue is stale because it has been open for 60 days with no 20 | activity. Remove the "Stale" label or comment on the issue, or it 21 | will be closed in 7 days. 22 | stale-pr-message: > 23 | This pull request is stale because it has been open for 60 days 24 | with no activity. Remove the "Stale" label or comment on the pull 25 | request, or it will be closed in 7 days. 26 | close-issue-message: > 27 | This issue has been marked as stale and closed due to no activity 28 | on it. 29 | close-pr-message: > 30 | This pull request has been marked as stale and closed due to no 31 | activity on it. 32 | -------------------------------------------------------------------------------- /.licenses/npm/@actions/core.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: "@actions/core" 3 | version: 1.2.6 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 | -------------------------------------------------------------------------------- /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.1.0 (a minor bump), you want to create (or update) `v5`, `v5.1`, and `v5.1.0`. 29 | -------------------------------------------------------------------------------- /.licenses/npm/@actions/io.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: "@actions/io" 3 | version: 1.0.2 4 | type: npm 5 | summary: Actions io lib 6 | homepage: https://github.com/actions/toolkit/tree/master/packages/io 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 | -------------------------------------------------------------------------------- /.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 | jobs: 9 | pull-request-test: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@v2 13 | - uses: ./ 14 | with: 15 | script: | 16 | // Get the existing comments. 17 | const {data: comments} = await github.issues.listComments({ 18 | owner: context.repo.owner, 19 | repo: context.repo.repo, 20 | issue_number: context.payload.number, 21 | }) 22 | 23 | // Find any comment already made by the bot. 24 | const botComment = comments.find(comment => comment.user.id === 41898282) 25 | const commentBody = "Hello from actions/github-script! (${{ github.sha }})" 26 | 27 | if (botComment) { 28 | await github.issues.updateComment({ 29 | owner: context.repo.owner, 30 | repo: context.repo.repo, 31 | comment_id: botComment.id, 32 | body: commentBody 33 | }) 34 | } else { 35 | await github.issues.createComment({ 36 | owner: context.repo.owner, 37 | repo: context.repo.repo, 38 | issue_number: context.payload.number, 39 | body: commentBody 40 | }) 41 | } 42 | -------------------------------------------------------------------------------- /.licenses/npm/@actions/github.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: "@actions/github" 3 | version: 4.0.0 4 | type: npm 5 | summary: Actions github lib 6 | homepage: https://github.com/actions/toolkit/tree/master/packages/github 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/@octokit/types.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: "@octokit/types" 3 | version: 5.5.0 4 | type: npm 5 | summary: Shared TypeScript definitions for Octokit projects 6 | homepage: https://github.com/octokit/types.ts#readme 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-paginate-rest.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: "@octokit/plugin-paginate-rest" 3 | version: 2.6.0 4 | type: npm 5 | summary: Octokit plugin to paginate REST API endpoint responses 6 | homepage: https://github.com/octokit/plugin-paginate-rest.js#readme 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/@actions/http-client.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: "@actions/http-client" 3 | version: 1.0.8 4 | type: npm 5 | summary: Actions Http Client 6 | homepage: https://github.com/actions/http-client#readme 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/@octokit/core.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: "@octokit/core" 3 | version: 3.2.1 4 | type: npm 5 | summary: Extendable client for GitHub's REST & GraphQL APIs 6 | homepage: https://github.com/octokit/core.js#readme 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/plugin-rest-endpoint-methods.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: "@octokit/plugin-rest-endpoint-methods" 3 | version: 4.2.1 4 | type: npm 5 | summary: Octokit plugin adding one method for all of api.github.com REST API endpoints 6 | homepage: https://github.com/octokit/plugin-rest-endpoint-methods.js#readme 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: 14.6.0 4 | type: npm 5 | summary: TypeScript definitions for Node.js 6 | homepage: https://github.com/DefinitelyTyped/DefinitelyTyped#readme 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/@octokit/graphql.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: "@octokit/graphql" 3 | version: 4.5.7 4 | type: npm 5 | summary: GitHub GraphQL API client for browsers and Node 6 | homepage: https://github.com/octokit/graphql.js#readme 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/endpoint.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: "@octokit/endpoint" 3 | version: 6.0.9 4 | type: npm 5 | summary: Turns REST API endpoints into generic request options 6 | homepage: https://github.com/octokit/endpoint.js#readme 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/request-error.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: "@octokit/request-error" 3 | version: 2.0.3 4 | type: npm 5 | summary: Error class for Octokit request errors 6 | homepage: https://github.com/octokit/request-error.js#readme 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/auth-token.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: "@octokit/auth-token" 3 | version: 2.4.3 4 | type: npm 5 | summary: GitHub API token authentication for browsers and Node.js 6 | homepage: https://github.com/octokit/auth-token.js#readme 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: 5.4.10 4 | type: npm 5 | summary: Send parameterized requests to GitHub’s APIs with sensible defaults in browsers 6 | and Node 7 | homepage: https://github.com/octokit/request.js#readme 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/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 | -------------------------------------------------------------------------------- /src/main.ts: -------------------------------------------------------------------------------- 1 | import * as core from '@actions/core' 2 | import {context, getOctokit} from '@actions/github' 3 | import * as io from '@actions/io' 4 | import {callAsyncFunction} from './async-function' 5 | 6 | process.on('unhandledRejection', handleError) 7 | main().catch(handleError) 8 | 9 | type Options = { 10 | log?: Console 11 | userAgent?: string 12 | previews?: string[] 13 | } 14 | 15 | async function main(): Promise { 16 | const token = core.getInput('github-token', {required: true}) 17 | const debug = core.getInput('debug') 18 | const userAgent = core.getInput('user-agent') 19 | const previews = core.getInput('previews') 20 | 21 | const opts: Options = {} 22 | if (debug === 'true') opts.log = console 23 | if (userAgent != null) opts.userAgent = userAgent 24 | if (previews != null) opts.previews = previews.split(',') 25 | 26 | const github = getOctokit(token, opts) 27 | const script = core.getInput('script', {required: true}) 28 | 29 | // Using property/value shorthand on `require` (e.g. `{require}`) causes compilation errors. 30 | const result = await callAsyncFunction( 31 | {require: require, github, context, core, io}, 32 | script 33 | ) 34 | 35 | let encoding = core.getInput('result-encoding') 36 | encoding = encoding ? encoding : 'json' 37 | 38 | let output 39 | 40 | switch (encoding) { 41 | case 'json': 42 | output = JSON.stringify(result) 43 | break 44 | case 'string': 45 | output = String(result) 46 | break 47 | default: 48 | throw new Error('"result-encoding" must be either "string" or "json"') 49 | } 50 | 51 | core.setOutput('result', output) 52 | } 53 | 54 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 55 | function handleError(err: any): void { 56 | console.error(err) 57 | core.setFailed(`Unhandled error: ${err}`) 58 | } 59 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "github-script", 3 | "description": "A GitHub action for executing a simple script", 4 | "version": "3.1.0", 5 | "author": "GitHub", 6 | "license": "MIT", 7 | "main": "dist/index.js", 8 | "private": true, 9 | "scripts": { 10 | "build": "ncc build src/main.ts", 11 | "format:check": "prettier --check src __test__", 12 | "format:write": "prettier --write src __test__", 13 | "lint": "eslint src __test__", 14 | "style:check": "run-p --continue-on-error --aggregate-output format:check lint", 15 | "style:write": "run-p --continue-on-error --aggregate-output format:write lint", 16 | "pre-commit": "run-s style:write test build", 17 | "test": "jest" 18 | }, 19 | "husky": { 20 | "hooks": { 21 | "pre-commit": "npm run pre-commit && git add dist/" 22 | } 23 | }, 24 | "jest": { 25 | "preset": "ts-jest", 26 | "testEnvironment": "node", 27 | "globals": { 28 | "ts-jest": { 29 | "diagnostics": { 30 | "ignoreCodes": [ 31 | "151001" 32 | ] 33 | } 34 | } 35 | } 36 | }, 37 | "dependencies": { 38 | "@actions/core": "^1.2.6", 39 | "@actions/github": "^4.0.0", 40 | "@actions/io": "^1.0.2", 41 | "@octokit/core": "^3.2.1", 42 | "@octokit/plugin-paginate-rest": "^2.6.0", 43 | "@octokit/plugin-rest-endpoint-methods": "4.2.1" 44 | }, 45 | "devDependencies": { 46 | "@types/jest": "^26.0.10", 47 | "@typescript-eslint/eslint-plugin": "^3.9.1", 48 | "@typescript-eslint/parser": "^3.9.1", 49 | "@vercel/ncc": "^0.23.0", 50 | "eslint": "^7.7.0", 51 | "eslint-config-prettier": "^6.11.0", 52 | "husky": "^4.2.5", 53 | "jest": "^26.4.1", 54 | "npm-run-all": "^4.1.5", 55 | "prettier": "^2.0.5", 56 | "ts-jest": "^26.2.0", 57 | "typescript": "^4.0.2" 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /.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/node-fetch.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: node-fetch 3 | version: 2.6.1 4 | type: npm 5 | summary: A light-weight module that brings window.fetch to node.js 6 | homepage: https://github.com/bitinn/node-fetch 7 | license: mit 8 | licenses: 9 | - sources: LICENSE.md 10 | text: |+ 11 | The MIT License (MIT) 12 | 13 | Copyright (c) 2016 David Frank 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 | 33 | - sources: README.md 34 | text: |- 35 | MIT 36 | 37 | [npm-image]: https://flat.badgen.net/npm/v/node-fetch 38 | [npm-url]: https://www.npmjs.com/package/node-fetch 39 | [travis-image]: https://flat.badgen.net/travis/bitinn/node-fetch 40 | [travis-url]: https://travis-ci.org/bitinn/node-fetch 41 | [codecov-image]: https://flat.badgen.net/codecov/c/github/bitinn/node-fetch/master 42 | [codecov-url]: https://codecov.io/gh/bitinn/node-fetch 43 | [install-size-image]: https://flat.badgen.net/packagephobia/install/node-fetch 44 | [install-size-url]: https://packagephobia.now.sh/result?p=node-fetch 45 | [discord-image]: https://img.shields.io/discord/619915844268326952?color=%237289DA&label=Discord&style=flat-square 46 | [discord-url]: https://discord.gg/Zxbndcm 47 | [opencollective-image]: https://opencollective.com/node-fetch/backers.svg 48 | [opencollective-url]: https://opencollective.com/node-fetch 49 | [whatwg-fetch]: https://fetch.spec.whatwg.org/ 50 | [response-init]: https://fetch.spec.whatwg.org/#responseinit 51 | [node-readable]: https://nodejs.org/api/stream.html#stream_readable_streams 52 | [mdn-headers]: https://developer.mozilla.org/en-US/docs/Web/API/Headers 53 | [LIMITS.md]: https://github.com/bitinn/node-fetch/blob/master/LIMITS.md 54 | [ERROR-HANDLING.md]: https://github.com/bitinn/node-fetch/blob/master/ERROR-HANDLING.md 55 | [UPGRADE-GUIDE.md]: https://github.com/bitinn/node-fetch/blob/master/UPGRADE-GUIDE.md 56 | notices: [] 57 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # actions/github-script 2 | 3 | [![.github/workflows/integration.yml](https://github.com/actions/github-script/workflows/Integration/badge.svg?event=push&branch=main)](https://github.com/actions/github-script/actions?query=workflow%3AIntegration+branch%3Amain+event%3Apush) 4 | [![.github/workflows/ci.yml](https://github.com/actions/github-script/workflows/CI/badge.svg?event=push&branch=main)](https://github.com/actions/github-script/actions?query=workflow%3ACI+branch%3Amain+event%3Apush) 5 | [![.github/workflows/licensed.yml](https://github.com/actions/github-script/workflows/Licensed/badge.svg?event=push&branch=main)](https://github.com/actions/github-script/actions?query=workflow%3ALicensed+branch%3Amain+event%3Apush) 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 | In order to use this action, a `script` input is provided. The value of that 11 | input should be the body of an asynchronous function call. The following 12 | arguments will be provided: 13 | 14 | - `github` A pre-authenticated 15 | [octokit/core.js](https://github.com/octokit/core.js#readme) client with REST endpoints and pagination plugins 16 | - `context` An object containing the [context of the workflow 17 | run](https://github.com/actions/toolkit/blob/main/packages/github/src/context.ts) 18 | - `core` A reference to the [@actions/core](https://github.com/actions/toolkit/tree/main/packages/core) package 19 | - `io` A reference to the [@actions/io](https://github.com/actions/toolkit/tree/main/packages/io) package 20 | 21 | Since the `script` is just a function body, these values will already be 22 | defined, so you don't have to (see examples below). 23 | 24 | See [octokit/rest.js](https://octokit.github.io/rest.js/) for the API client 25 | documentation. 26 | 27 | **Note** This action is still a bit of an experiment—the API may change in 28 | future versions. 🙂 29 | 30 | ## Development 31 | 32 | See [development.md](/docs/development.md). 33 | 34 | ## Reading step results 35 | 36 | The return value of the script will be in the step's outputs under the 37 | "result" key. 38 | 39 | ```yaml 40 | - uses: actions/github-script@v3 41 | id: set-result 42 | with: 43 | script: return "Hello!" 44 | result-encoding: string 45 | - name: Get result 46 | run: echo "${{steps.set-result.outputs.result}}" 47 | ``` 48 | 49 | See ["Result encoding"](#result-encoding) for details on how the encoding of 50 | these outputs can be changed. 51 | 52 | ## Result encoding 53 | 54 | By default, the JSON-encoded return value of the function is set as the "result" in the 55 | output of a github-script step. For some workflows, string encoding is preferred. This option can be set using the 56 | `result-encoding` input: 57 | 58 | ```yaml 59 | - uses: actions/github-script@v3 60 | id: my-script 61 | with: 62 | github-token: ${{secrets.GITHUB_TOKEN}} 63 | result-encoding: string 64 | script: return "I will be string (not JSON) encoded!" 65 | ``` 66 | 67 | ## Examples 68 | 69 | Note that `github-token` is optional in this action, and the input is there 70 | in case you need to use a non-default token. 71 | 72 | By default, github-script will use the token provided to your workflow. 73 | 74 | ### Print the available attributes of context: 75 | 76 | ```yaml 77 | - name: View context attributes 78 | uses: actions/github-script@v3 79 | with: 80 | script: console.log(context) 81 | ``` 82 | 83 | ### Comment on an issue 84 | 85 | ```yaml 86 | on: 87 | issues: 88 | types: [opened] 89 | 90 | jobs: 91 | comment: 92 | runs-on: ubuntu-latest 93 | steps: 94 | - uses: actions/github-script@v3 95 | with: 96 | github-token: ${{secrets.GITHUB_TOKEN}} 97 | script: | 98 | github.issues.createComment({ 99 | issue_number: context.issue.number, 100 | owner: context.repo.owner, 101 | repo: context.repo.repo, 102 | body: '👋 Thanks for reporting!' 103 | }) 104 | ``` 105 | 106 | ### Apply a label to an issue 107 | 108 | ```yaml 109 | on: 110 | issues: 111 | types: [opened] 112 | 113 | jobs: 114 | apply-label: 115 | runs-on: ubuntu-latest 116 | steps: 117 | - uses: actions/github-script@v3 118 | with: 119 | github-token: ${{secrets.GITHUB_TOKEN}} 120 | script: | 121 | github.issues.addLabels({ 122 | issue_number: context.issue.number, 123 | owner: context.repo.owner, 124 | repo: context.repo.repo, 125 | labels: ['Triage'] 126 | }) 127 | ``` 128 | 129 | ### Welcome a first-time contributor 130 | 131 | ```yaml 132 | on: pull_request 133 | 134 | jobs: 135 | welcome: 136 | runs-on: ubuntu-latest 137 | steps: 138 | - uses: actions/github-script@v3 139 | with: 140 | github-token: ${{secrets.GITHUB_TOKEN}} 141 | script: | 142 | // Get a list of all issues created by the PR opener 143 | // See: https://octokit.github.io/rest.js/#pagination 144 | const creator = context.payload.sender.login 145 | const opts = github.issues.listForRepo.endpoint.merge({ 146 | ...context.issue, 147 | creator, 148 | state: 'all' 149 | }) 150 | const issues = await github.paginate(opts) 151 | 152 | for (const issue of issues) { 153 | if (issue.number === context.issue.number) { 154 | continue 155 | } 156 | 157 | if (issue.pull_request) { 158 | return // Creator is already a contributor. 159 | } 160 | } 161 | 162 | await github.issues.createComment({ 163 | issue_number: context.issue.number, 164 | owner: context.repo.owner, 165 | repo: context.repo.repo, 166 | body: 'Welcome, new contributor!' 167 | }) 168 | ``` 169 | 170 | ### Download data from a URL 171 | 172 | You can use the `github` object to access the Octokit API. For 173 | instance, `github.request` 174 | 175 | ```yaml 176 | on: pull_request 177 | 178 | jobs: 179 | diff: 180 | runs-on: ubuntu-latest 181 | steps: 182 | - uses: actions/github-script@v3 183 | with: 184 | github-token: ${{secrets.GITHUB_TOKEN}} 185 | script: | 186 | const diff_url = context.payload.pull_request.diff_url 187 | const result = await github.request(diff_url) 188 | console.log(result) 189 | ``` 190 | 191 | _(Note that this particular example only works for a public URL, where the 192 | diff URL is publicly accessible. Getting the diff for a private URL requires 193 | using the API.)_ 194 | 195 | This will print the full diff object in the screen; `result.data` will 196 | contain the actual diff text. 197 | 198 | ### Run custom GraphQL queries 199 | 200 | You can use the `github.graphql` object to run custom GraphQL queries against the GitHub API. 201 | 202 | ```yaml 203 | 204 | jobs: 205 | list-packages: 206 | runs-on: ubuntu-latest 207 | steps: 208 | - uses: actions/github-script@v3 209 | with: 210 | github-token: ${{secrets.GITHUB_TOKEN}} 211 | script: | 212 | const query = `query($owner:String!, $name:String!) { 213 | repository(owner:$owner, name:$name){ 214 | issues(first:100, labels: [$label]) { 215 | nodes { 216 | id 217 | } 218 | } 219 | } 220 | }`; 221 | const variables = { 222 | owner: context.repo.owner, 223 | name: context.repo.repo, 224 | label: 'wontfix' 225 | } 226 | const result = await github.graphql(query, variables) 227 | console.log(result) 228 | 229 | ``` 230 | 231 | ### Run a separate file 232 | 233 | If you don't want to inline your entire script that you want to run, you can 234 | use a separate JavaScript module in your repository like so: 235 | 236 | ```yaml 237 | on: push 238 | 239 | jobs: 240 | echo-input: 241 | runs-on: ubuntu-latest 242 | steps: 243 | - uses: actions/checkout@v2 244 | - uses: actions/github-script@v3 245 | with: 246 | script: | 247 | const script = require(`${process.env.GITHUB_WORKSPACE}/path/to/script.js`) 248 | console.log(script({github, context})) 249 | ``` 250 | 251 | _Note that the script path given to `require()` must be an **absolute path** in this case, hence using [`GITHUB_WORKSPACE`](https://docs.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables#default-environment-variables)._ 252 | 253 | And then export a function from your module: 254 | 255 | ```javascript 256 | module.exports = ({github, context}) => { 257 | return context.payload.client_payload.value 258 | } 259 | ``` 260 | 261 | You can also use async functions in this manner, as long as you `await` it in 262 | the inline script. 263 | 264 | Note that because you can't `require` things like the GitHub context or 265 | Actions Toolkit libraries, you'll want to pass them as arguments to your 266 | external function. 267 | 268 | Additionally, you'll want to use the [checkout 269 | action](https://github.com/actions/checkout) to make sure your script file is 270 | available. 271 | -------------------------------------------------------------------------------- /.licenses/npm/before-after-hook.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: before-after-hook 3 | version: 2.1.0 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 | --------------------------------------------------------------------------------