├── .prettierignore ├── CODEOWNERS ├── .gitattributes ├── .licensed.yml ├── jest.config.js ├── .github ├── dependabot.yml └── workflows │ ├── test.yml │ ├── licensed.yml │ ├── post-dependabot.yml │ ├── codeql-analysis.yml │ └── check-dist.yml ├── src ├── main.ts └── add-to-project.ts ├── .vscode └── settings.json ├── action.yml ├── tsconfig.json ├── .licenses └── npm │ ├── once.dep.yml │ ├── wrappy.dep.yml │ ├── deprecation.dep.yml │ ├── universal-user-agent-6.0.1.dep.yml │ ├── universal-user-agent-7.0.3.dep.yml │ ├── @actions │ ├── io.dep.yml │ ├── exec.dep.yml │ ├── core.dep.yml │ ├── github.dep.yml │ └── http-client.dep.yml │ ├── @octokit │ ├── openapi-types-20.0.0.dep.yml │ ├── openapi-types-24.2.0.dep.yml │ ├── types-12.6.0.dep.yml │ ├── types-13.10.0.dep.yml │ ├── types-14.1.0.dep.yml │ ├── openapi-types-25.1.0.dep.yml │ ├── plugin-paginate-rest-9.2.2.dep.yml │ ├── plugin-paginate-rest-13.1.1.dep.yml │ ├── plugin-rest-endpoint-methods.dep.yml │ ├── core-5.2.2.dep.yml │ ├── core-7.0.3.dep.yml │ ├── graphql-7.1.1.dep.yml │ ├── graphql-9.0.1.dep.yml │ ├── request-error-5.1.1.dep.yml │ ├── request-error-6.1.8.dep.yml │ ├── request-error-7.0.0.dep.yml │ ├── endpoint-11.0.0.dep.yml │ ├── endpoint-9.0.6.dep.yml │ ├── auth-token-4.0.0.dep.yml │ ├── auth-token-6.0.0.dep.yml │ ├── request-10.0.3.dep.yml │ └── request-8.4.1.dep.yml │ ├── @fastify │ └── busboy.dep.yml │ ├── undici.dep.yml │ ├── tunnel.dep.yml │ ├── fast-content-type-parse.dep.yml │ ├── before-after-hook-2.2.3.dep.yml │ └── before-after-hook-4.0.0.dep.yml ├── LICENSE ├── .gitignore ├── package.json ├── eslint.config.mjs ├── fix-regex.js ├── README.md ├── __tests__ └── add-to-project.test.ts └── dist └── licenses.txt /.prettierignore: -------------------------------------------------------------------------------- 1 | dist/ 2 | lib/ 3 | node_modules/ -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @actions/actions-add-to-project 2 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | dist/** -diff linguist-generated=true 2 | .licenses/** -diff linguist-generated=true -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | clearMocks: true, 3 | moduleFileExtensions: ['js', 'ts'], 4 | testMatch: ['**/*.test.ts', '**/*.test.js'], 5 | transform: { 6 | '^.+\\.ts$': 'ts-jest', 7 | }, 8 | verbose: true, 9 | } 10 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: github-actions 4 | directory: / 5 | schedule: 6 | interval: daily 7 | 8 | - package-ecosystem: npm 9 | directory: / 10 | schedule: 11 | interval: daily 12 | -------------------------------------------------------------------------------- /src/main.ts: -------------------------------------------------------------------------------- 1 | import * as core from '@actions/core' 2 | import {addToProject} from './add-to-project' 3 | 4 | addToProject() 5 | .catch(err => { 6 | core.setFailed(err.message) 7 | process.exit(1) 8 | }) 9 | .then(() => { 10 | process.exit(0) 11 | }) 12 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.codeActionsOnSave": { 3 | "source.fixAll.eslint": "explicit" 4 | }, 5 | "editor.formatOnSave": true, 6 | "files.exclude": { 7 | ".licenses/": true, 8 | "dist/": true, 9 | "lib/": true, 10 | "**/node_modules/": true 11 | }, 12 | "typescript.tsdk": "node_modules/typescript/lib" 13 | } 14 | -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | name: 'build-test' 2 | permissions: 3 | contents: read 4 | on: # rebuild any PRs and main branch changes 5 | workflow_dispatch: 6 | pull_request: 7 | branches: 8 | - main 9 | push: 10 | branches: 11 | - main 12 | - 'releases/*' 13 | 14 | jobs: 15 | build: # make sure build/ci work properly 16 | runs-on: ubuntu-latest 17 | steps: 18 | - uses: actions/checkout@v5 19 | - run: | 20 | npm install 21 | - run: | 22 | npm run build 23 | - run: | 24 | npm run test 25 | -------------------------------------------------------------------------------- /.github/workflows/licensed.yml: -------------------------------------------------------------------------------- 1 | name: Licensed 2 | permissions: 3 | contents: read 4 | 5 | on: 6 | push: 7 | branches: 8 | - main 9 | pull_request: 10 | branches: 11 | - main 12 | 13 | jobs: 14 | test: 15 | runs-on: ubuntu-latest 16 | name: Check licenses 17 | steps: 18 | - uses: actions/checkout@v5 19 | - run: npm ci 20 | - name: Install licensed 21 | run: | 22 | cd $RUNNER_TEMP 23 | curl -Lfs -o licensed.tar.gz https://github.com/github/licensed/releases/download/3.6.0/licensed-3.6.0-linux-x64.tar.gz 24 | sudo tar -xzf licensed.tar.gz 25 | sudo mv licensed /usr/local/bin/licensed 26 | - run: licensed status 27 | -------------------------------------------------------------------------------- /action.yml: -------------------------------------------------------------------------------- 1 | name: Add To GitHub projects 2 | description: Automatically add issues and PRs to GitHub projects 3 | author: GitHub 4 | branding: 5 | icon: table 6 | color: white 7 | inputs: 8 | project-url: 9 | required: true 10 | description: URL of the project to add issues to 11 | github-token: 12 | required: true 13 | description: A GitHub personal access token with write access to the project 14 | labeled: 15 | required: false 16 | description: A comma-separated list of labels to use as a filter for issue to be added 17 | label-operator: 18 | required: false 19 | description: The behavior of the labels filter, AND to match all labels, OR to match any label, NOT to exclude any listed label (default is OR) 20 | outputs: 21 | itemId: 22 | description: The ID of the item that was added to the project 23 | runs: 24 | using: 'node20' 25 | main: 'dist/index.js' 26 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2018" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */, 4 | "module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */, 5 | "outDir": "./lib" /* Redirect output structure to the directory. */, 6 | "rootDir": "./src" /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */, 7 | "strict": true /* Enable all strict type-checking options. */, 8 | "noImplicitAny": true /* Raise error on expressions and declarations with an implied 'any' type. */, 9 | "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */, 10 | "noUncheckedIndexedAccess": true, 11 | "lib": ["ES2018"] 12 | }, 13 | "exclude": ["node_modules", "**/*.test.ts"] 14 | } 15 | -------------------------------------------------------------------------------- /.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: 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/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 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | The MIT License (MIT) 3 | 4 | Copyright (c) 2018 GitHub, Inc. and contributors 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. -------------------------------------------------------------------------------- /.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: 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-6.0.1.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: universal-user-agent 3 | version: 6.0.1 4 | type: npm 5 | summary: Get a user agent string in both browser and node 6 | homepage: 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/universal-user-agent-7.0.3.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: universal-user-agent 3 | version: 7.0.3 4 | type: npm 5 | summary: Get a user agent string across all JavaScript Runtime Environments 6 | homepage: 7 | license: isc 8 | licenses: 9 | - sources: LICENSE.md 10 | text: | 11 | # [ISC License](https://spdx.org/licenses/ISC) 12 | 13 | Copyright (c) 2018-2021, 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/post-dependabot.yml: -------------------------------------------------------------------------------- 1 | name: Update Dependencies 2 | on: 3 | push: 4 | branches: 5 | - dependabot/npm_and_yarn/** 6 | pull_request: 7 | branches: 8 | - dependabot/npm_and_yarn/** 9 | permissions: 10 | contents: write 11 | jobs: 12 | run: 13 | runs-on: ubuntu-latest 14 | name: Update licensed cache 15 | steps: 16 | - uses: actions/checkout@v5 17 | 18 | - run: npm ci 19 | 20 | - name: Install licensed 21 | run: | 22 | cd $RUNNER_TEMP 23 | curl -Lfs -o licensed.tar.gz https://github.com/github/licensed/releases/download/3.6.0/licensed-3.6.0-linux-x64.tar.gz 24 | sudo tar -xzf licensed.tar.gz 25 | sudo mv licensed /usr/local/bin/licensed 26 | - run: licensed cache 27 | - name: Rebuild the dist/ directory 28 | run: | 29 | npm run build:compile 30 | npm run build:package 31 | 32 | - name: Commit changes as Dependabot 33 | run: | 34 | git config --global user.name 'dependabot[bot]' 35 | git config --global user.email '49699333+dependabot[bot]@users.noreply.github.com' 36 | git add . 37 | git commit -m "Update licensed cache and dist/ directory" || exit 0 38 | git push 39 | -------------------------------------------------------------------------------- /.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/@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/core.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: '@actions/core' 3 | version: 1.11.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/github.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: '@actions/github' 3 | version: 6.0.1 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/@octokit/openapi-types-20.0.0.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: '@octokit/openapi-types' 3 | version: 20.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-24.2.0.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: '@octokit/openapi-types' 3 | version: 24.2.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/types-12.6.0.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: '@octokit/types' 3 | version: 12.6.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-13.10.0.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: '@octokit/types' 3 | version: 13.10.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-14.1.0.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: '@octokit/types' 3 | version: 14.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/openapi-types-25.1.0.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: '@octokit/openapi-types' 3 | version: 25.1.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 (c) GitHub 2025 - Licensed as MIT. 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/@fastify/busboy.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: '@fastify/busboy' 3 | version: 2.1.1 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/plugin-paginate-rest-9.2.2.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: '@octokit/plugin-paginate-rest' 3 | version: 9.2.2 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-paginate-rest-13.1.1.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: '@octokit/plugin-paginate-rest' 3 | version: 13.1.1 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-rest-endpoint-methods.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: '@octokit/plugin-rest-endpoint-methods' 3 | version: 10.4.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/core-5.2.2.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: '@octokit/core' 3 | version: 5.2.2 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/core-7.0.3.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: '@octokit/core' 3 | version: 7.0.3 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/graphql-7.1.1.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: '@octokit/graphql' 3 | version: 7.1.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/graphql-9.0.1.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: '@octokit/graphql' 3 | version: 9.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/undici.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: undici 3 | version: 5.29.0 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/@actions/http-client.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: '@actions/http-client' 3 | version: 2.2.3 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/@octokit/request-error-5.1.1.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: '@octokit/request-error' 3 | version: 5.1.1 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-error-6.1.8.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: '@octokit/request-error' 3 | version: 6.1.8 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-error-7.0.0.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: '@octokit/request-error' 3 | version: 7.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/endpoint-11.0.0.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: '@octokit/endpoint' 3 | version: 11.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/endpoint-9.0.6.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: '@octokit/endpoint' 3 | version: 9.0.6 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/auth-token-4.0.0.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/auth-token-6.0.0.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: '@octokit/auth-token' 3 | version: 6.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/request-10.0.3.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: '@octokit/request' 3 | version: 10.0.3 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/request-8.4.1.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: '@octokit/request' 3 | version: 8.4.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/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/fast-content-type-parse.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: fast-content-type-parse 3 | version: 3.0.0 4 | type: npm 5 | summary: Parse HTTP Content-Type header according to RFC 7231 6 | homepage: https://github.com/fastify/fast-content-type-parse#readme 7 | license: other 8 | licenses: 9 | - sources: LICENSE 10 | text: |- 11 | MIT License 12 | 13 | Copyright (c) 2023 The Fastify Team 14 | 15 | The Fastify team members are listed at https://github.com/fastify/fastify#team 16 | and in the README file. 17 | 18 | Permission is hereby granted, free of charge, to any person obtaining a copy 19 | of this software and associated documentation files (the "Software"), to deal 20 | in the Software without restriction, including without limitation the rights 21 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 22 | copies of the Software, and to permit persons to whom the Software is 23 | furnished to do so, subject to the following conditions: 24 | 25 | The above copyright notice and this permission notice shall be included in all 26 | copies or substantial portions of the Software. 27 | 28 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 29 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 30 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 31 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 32 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 33 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 34 | SOFTWARE. 35 | - sources: README.md 36 | text: Licensed under [MIT](./LICENSE). 37 | notices: [] 38 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Dependency directory 2 | node_modules 3 | 4 | # Rest pulled from https://github.com/github/gitignore/blob/master/Node.gitignore 5 | # Logs 6 | logs 7 | *.log 8 | npm-debug.log* 9 | yarn-debug.log* 10 | yarn-error.log* 11 | lerna-debug.log* 12 | 13 | # Diagnostic reports (https://nodejs.org/api/report.html) 14 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 15 | 16 | # Runtime data 17 | pids 18 | *.pid 19 | *.seed 20 | *.pid.lock 21 | 22 | # Directory for instrumented libs generated by jscoverage/JSCover 23 | lib-cov 24 | 25 | # Coverage directory used by tools like istanbul 26 | coverage 27 | *.lcov 28 | 29 | # nyc test coverage 30 | .nyc_output 31 | 32 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 33 | .grunt 34 | 35 | # Bower dependency directory (https://bower.io/) 36 | bower_components 37 | 38 | # node-waf configuration 39 | .lock-wscript 40 | 41 | # Compiled binary addons (https://nodejs.org/api/addons.html) 42 | build/Release 43 | 44 | # Dependency directories 45 | jspm_packages/ 46 | 47 | # TypeScript v1 declaration files 48 | typings/ 49 | 50 | # TypeScript cache 51 | *.tsbuildinfo 52 | 53 | # Optional npm cache directory 54 | .npm 55 | 56 | # Optional eslint cache 57 | .eslintcache 58 | 59 | # Optional REPL history 60 | .node_repl_history 61 | 62 | # Output of 'npm pack' 63 | *.tgz 64 | 65 | # Yarn Integrity file 66 | .yarn-integrity 67 | 68 | # dotenv environment variables file 69 | .env 70 | .env.test 71 | 72 | # parcel-bundler cache (https://parceljs.org/) 73 | .cache 74 | 75 | # next.js build output 76 | .next 77 | 78 | # nuxt.js build output 79 | .nuxt 80 | 81 | # vuepress build output 82 | .vuepress/dist 83 | 84 | # Serverless directories 85 | .serverless/ 86 | 87 | # FuseBox cache 88 | .fusebox/ 89 | 90 | # DynamoDB Local files 91 | .dynamodb/ 92 | 93 | # OS metadata 94 | .DS_Store 95 | Thumbs.db 96 | 97 | # Ignore built ts files 98 | __tests__/runner/* 99 | lib/**/* -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@actions/add-to-project", 3 | "description": "Automatically adds issues and PRs to GitHub projects", 4 | "version": "0.0.0", 5 | "author": "GitHub and contributors", 6 | "dependencies": { 7 | "@actions/core": "^1.10.1", 8 | "@actions/github": "^6.0.0", 9 | "@octokit/plugin-paginate-rest": "^13.0.1", 10 | "@octokit/request": "^10.0.3", 11 | "@octokit/request-error": "^6.1.7" 12 | }, 13 | "engines": { 14 | "node": ">=20.0.0", 15 | "npm": ">= 8.0.0" 16 | }, 17 | "devDependencies": { 18 | "@eslint/js": "^9.39.1", 19 | "@github/prettier-config": "^0.0.6", 20 | "@types/jest": "^30.0.0", 21 | "@types/node": "^24.10.1", 22 | "@typescript-eslint/eslint-plugin": "^8.47.0", 23 | "@typescript-eslint/parser": "^8.47.0", 24 | "@vercel/ncc": "^0.38.3", 25 | "concurrently": "^9.2.1", 26 | "eslint": "^9.39.1", 27 | "eslint-plugin-github": "^6.0.0", 28 | "eslint-plugin-jest": "^29.1.0", 29 | "eslint-plugin-prettier": "^5.2.5", 30 | "globals": "^15.14.0", 31 | "jest": "^30.2.0", 32 | "prettier": "3.6.2", 33 | "ts-jest": "^29.4.5", 34 | "typescript": "^5.9.3", 35 | "typescript-eslint": "^8.47.0" 36 | }, 37 | "keywords": [ 38 | "actions", 39 | "node", 40 | "setup" 41 | ], 42 | "license": "MIT", 43 | "main": "lib/main.js", 44 | "prettier": "@github/prettier-config", 45 | "private": true, 46 | "repository": { 47 | "type": "git", 48 | "url": "git+https://github.com/actions/add-to-project.git" 49 | }, 50 | "scripts": { 51 | "build": "npm run fix:format && npm run check && npm run build:compile && npm run build:package", 52 | "build:compile": "tsc", 53 | "build:package": "node fix-regex.js && ncc build --source-map --no-source-map-register --license licenses.txt", 54 | "check": "concurrently -n check: -c red,green,blue -g npm:check:*", 55 | "check:build": "tsc --noEmit", 56 | "check:format": "prettier --check .", 57 | "check:lint": "eslint .", 58 | "fix:format": "prettier --write .", 59 | "test": "jest", 60 | "postinstall": "node fix-regex.js" 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import eslint from '@eslint/js' 2 | import tseslint from 'typescript-eslint' 3 | import github from 'eslint-plugin-github' 4 | import jest from 'eslint-plugin-jest' 5 | import globals from 'globals' 6 | 7 | export default [ 8 | // Ignore patterns 9 | { 10 | ignores: ['dist/**', 'lib/**', 'node_modules/**', '__tests__/fixtures/**', 'eslint.config.mjs'], 11 | }, 12 | 13 | // Base ESLint recommended rules 14 | eslint.configs.recommended, 15 | 16 | // TypeScript ESLint recommended rules 17 | ...tseslint.configs.recommended, 18 | 19 | // GitHub plugin recommended rules 20 | github.getFlatConfigs().recommended, 21 | 22 | // Configuration for CommonJS JavaScript files 23 | { 24 | files: ['**/*.js'], 25 | languageOptions: { 26 | ecmaVersion: 2019, 27 | sourceType: 'script', 28 | globals: { 29 | ...globals.node, 30 | ...globals.es6, 31 | }, 32 | }, 33 | rules: { 34 | // Disable specific rules for CommonJS files 35 | 'github/filenames-match-regex': 'off', 36 | 'import/no-commonjs': 'off', 37 | '@typescript-eslint/no-require-imports': 'off', 38 | 'i18n-text/no-en': 'off', 39 | 'import/no-namespace': 'off', 40 | 'no-implicit-globals': 'off', 41 | 'github/no-implicit-buggy-globals': 'off', 42 | }, 43 | }, 44 | 45 | // Configuration for TypeScript files 46 | { 47 | files: ['**/*.ts'], 48 | languageOptions: { 49 | parser: tseslint.parser, 50 | parserOptions: { 51 | ecmaVersion: 2019, 52 | sourceType: 'module', 53 | }, 54 | globals: { 55 | ...globals.node, 56 | ...globals.es6, 57 | }, 58 | }, 59 | rules: { 60 | // Disable specific rules as in the original config 61 | 'github/filenames-match-regex': 'off', 62 | 'github/no-then': 'off', 63 | 'i18n-text/no-en': 'off', 64 | 'import/no-namespace': 'off', 65 | }, 66 | }, 67 | 68 | // Jest-specific configuration 69 | { 70 | files: ['**/*.test.ts', '**/*.test.js', '__tests__/**/*.ts'], 71 | ...jest.configs['flat/recommended'], 72 | languageOptions: { 73 | globals: { 74 | ...globals.jest, 75 | }, 76 | }, 77 | }, 78 | ] 79 | -------------------------------------------------------------------------------- /.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: '18 2 * * 2' 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', 'actions'] 36 | # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] 37 | # Learn more about CodeQL language support at https://git.io/codeql-language-support 38 | 39 | steps: 40 | - name: Checkout repository 41 | uses: actions/checkout@v5 42 | 43 | # Initializes the CodeQL tools for scanning. 44 | - name: Initialize CodeQL 45 | uses: github/codeql-action/init@v4 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 | # queries: ./path/to/local/query, your-org/your-repo/queries@main 52 | 53 | # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). 54 | # If this step fails, then you should remove it and run the build manually (see below) 55 | - name: Autobuild 56 | uses: github/codeql-action/autobuild@v4 57 | 58 | # ℹ️ Command-line programs to run using the OS shell. 59 | # 📚 https://git.io/JvXDl 60 | 61 | # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines 62 | # and modify them (or add more) to build your code if your project 63 | # uses a compiled language 64 | 65 | #- run: | 66 | # make bootstrap 67 | # make release 68 | 69 | - name: Perform CodeQL Analysis 70 | uses: github/codeql-action/analyze@v4 71 | -------------------------------------------------------------------------------- /.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 from other source files. 5 | # We need to make sure the checked-in `index.js` actually matches what we expect it to be. 6 | name: Check dist/ 7 | permissions: 8 | contents: read 9 | 10 | on: 11 | push: 12 | branches: 13 | - main 14 | paths-ignore: 15 | - '**.md' 16 | pull_request: 17 | paths-ignore: 18 | - '**.md' 19 | 20 | env: 21 | # A pipe-separated array of files to ignore when comparing the expected and actual dist/ directories, 22 | # which are used as a regular expression filter in the `grep` command. 23 | FILES_TO_IGNORE: 'index.js.map|sourcemap-register.js' 24 | 25 | jobs: 26 | check-dist: 27 | runs-on: ubuntu-latest 28 | 29 | steps: 30 | - uses: actions/checkout@v5 31 | 32 | - name: Set Node.js 20.x 33 | uses: actions/setup-node@v6 34 | with: 35 | node-version: 20.x 36 | cache: npm 37 | 38 | - name: Install dependencies 39 | run: npm ci 40 | 41 | - name: Rebuild the dist/ directory 42 | run: | 43 | npm run build:compile 44 | npm run build:package 45 | 46 | - name: Compare the expected and actual dist/ directories 47 | run: | 48 | # Get a list of files that are different between the checked-in dist/ directory and the generated dist/ directory, 49 | # then trim the list to remove any leading or trailing whitespace. 50 | CHANGED_FILES=$(git diff --ignore-space-at-eol --name-only dist/ | grep -vE "$FILES_TO_IGNORE" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') 51 | if [ -n "$CHANGED_FILES" ]; then 52 | echo "❗️ Detected uncommitted changes after build (see diff output below)." >&2 53 | echo "This indicates that the dist/ directory is out of sync with the checked-in index.js." >&2 54 | echo "⭐️ If the changes below are expected, run 'npm run build:compile && npm run build:package' and commit the output files." >&2 55 | # Run `git diff` for each line/file in $CHANGED_FILES: 56 | echo "$CHANGED_FILES" | xargs -I {} git diff --ignore-space-at-eol --text -- {} 57 | exit 1 58 | else 59 | echo "✅ No uncommitted changes detected after build." 60 | fi 61 | id: diff 62 | 63 | # If index.js was different than expected, upload the expected version as an artifact 64 | - uses: actions/upload-artifact@v5 65 | if: ${{ failure() && steps.diff.conclusion == 'failure' }} 66 | with: 67 | name: dist 68 | path: dist/ 69 | -------------------------------------------------------------------------------- /fix-regex.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /** 4 | * Fix for misleading operator precedence in @octokit/request regex 5 | * Changes /^text\/|charset=utf-8$/ to /^(text\/|charset=utf-8)$/ 6 | */ 7 | 8 | const fs = require('fs') 9 | 10 | const filesToFix = [ 11 | 'node_modules/@actions/github/node_modules/@octokit/request/dist-src/fetch-wrapper.js', 12 | 'node_modules/@actions/github/node_modules/@octokit/request/dist-node/index.js', 13 | 'node_modules/@actions/github/node_modules/@octokit/request/dist-web/index.js', 14 | ] 15 | 16 | /** 17 | * Apply regex fix to content 18 | * @param {string} content - The file content to fix 19 | * @returns {string} - The fixed content 20 | */ 21 | function applyRegexFix(content) { 22 | let fixedContent = content 23 | 24 | // Fix the problematic regex pattern - add proper grouping to fix operator precedence 25 | fixedContent = fixedContent.replace(/\/\^text\\?\/\|charset=utf-8\$?\//g, '/^(text\\/|charset=utf-8)$/') 26 | fixedContent = fixedContent.replace(/\/\^text\/\|charset=utf-8\$?\//g, '/^(text/|charset=utf-8)$/') 27 | 28 | return fixedContent 29 | } 30 | 31 | /** 32 | * Fix a single file 33 | * @param {string} filePath - Path to the file to fix 34 | * @returns {{fixed: boolean, error: string|null}} - Result of the fix operation 35 | */ 36 | function fixFile(filePath) { 37 | try { 38 | const content = fs.readFileSync(filePath, 'utf8') 39 | const originalContent = content 40 | const fixedContent = applyRegexFix(content) 41 | 42 | if (fixedContent !== originalContent) { 43 | fs.writeFileSync(filePath, fixedContent, 'utf8') 44 | return {fixed: true, error: null} 45 | } else { 46 | return {fixed: false, error: null} 47 | } 48 | } catch (error) { 49 | return {fixed: false, error: error.message} 50 | } 51 | } 52 | 53 | /** 54 | * Main function to fix all files 55 | * @param {string[]} files - Array of file paths to fix 56 | * @returns {{filesFixed: number, results: Array}} - Summary of fix operations 57 | */ 58 | function fixAllFiles(files = filesToFix) { 59 | const results = [] 60 | let filesFixed = 0 61 | 62 | for (const filePath of files) { 63 | const result = fixFile(filePath) 64 | results.push({filePath, ...result}) 65 | 66 | if (result.fixed) { 67 | filesFixed++ 68 | } 69 | } 70 | 71 | return {filesFixed, results} 72 | } 73 | 74 | // Main execution when run as script 75 | if (require.main === module) { 76 | process.stdout.write('🔧 Applying regex fix for @octokit/request...\n') 77 | 78 | const {filesFixed, results} = fixAllFiles() 79 | 80 | for (const result of results) { 81 | if (result.error) { 82 | if (result.error.includes('ENOENT') || result.error.includes('no such file')) { 83 | process.stdout.write(`⚠️ File not found: ${result.filePath}\n`) 84 | } else { 85 | process.stderr.write(`❌ Error fixing ${result.filePath}: ${result.error}\n`) 86 | } 87 | } else if (result.fixed) { 88 | process.stdout.write(`✅ Fixed: ${result.filePath}\n`) 89 | } else { 90 | process.stdout.write(`ℹ️ No changes needed: ${result.filePath}\n`) 91 | } 92 | } 93 | 94 | process.stdout.write(`\n🎉 Fix complete! ${filesFixed} files updated.\n`) 95 | if (filesFixed > 0) { 96 | process.stdout.write('Run "npm run build:package" to rebuild with the fix.\n') 97 | } 98 | } 99 | 100 | // Export functions for testing 101 | module.exports = { 102 | applyRegexFix, 103 | fixFile, 104 | fixAllFiles, 105 | } 106 | -------------------------------------------------------------------------------- /src/add-to-project.ts: -------------------------------------------------------------------------------- 1 | import * as core from '@actions/core' 2 | import * as github from '@actions/github' 3 | 4 | const urlParse = /\/(?orgs|users)\/(?[^/]+)\/projects\/(?\d+)/ 5 | 6 | interface ProjectNodeIDResponse { 7 | organization?: { 8 | projectV2: { 9 | id: string 10 | } 11 | } 12 | 13 | user?: { 14 | projectV2: { 15 | id: string 16 | } 17 | } 18 | } 19 | 20 | interface ProjectAddItemResponse { 21 | addProjectV2ItemById: { 22 | item: { 23 | id: string 24 | } 25 | } 26 | } 27 | 28 | interface ProjectV2AddDraftIssueResponse { 29 | addProjectV2DraftIssue: { 30 | projectItem: { 31 | id: string 32 | } 33 | } 34 | } 35 | 36 | export async function addToProject(): Promise { 37 | const projectUrl = core.getInput('project-url', {required: true}) 38 | const ghToken = core.getInput('github-token', {required: true}) 39 | const labeled = 40 | core 41 | .getInput('labeled') 42 | .split(',') 43 | .map(l => l.trim().toLowerCase()) 44 | .filter(l => l.length > 0) ?? [] 45 | const labelOperator = core.getInput('label-operator').trim().toLocaleLowerCase() 46 | 47 | const octokit = github.getOctokit(ghToken) 48 | 49 | const issue = github.context.payload.issue ?? github.context.payload.pull_request 50 | const issueLabels: string[] = (issue?.labels ?? []).map((l: {name: string}) => l.name.toLowerCase()) 51 | const issueOwnerName = github.context.payload.repository?.owner.login 52 | 53 | core.debug(`Issue/PR owner: ${issueOwnerName}`) 54 | core.debug(`Issue/PR labels: ${issueLabels.join(', ')}`) 55 | 56 | // Ensure the issue matches our `labeled` filter based on the label-operator. 57 | if (labelOperator === 'and') { 58 | if (!labeled.every(l => issueLabels.includes(l))) { 59 | core.info(`Skipping issue ${issue?.number} because it doesn't match all the labels: ${labeled.join(', ')}`) 60 | return 61 | } 62 | } else if (labelOperator === 'not') { 63 | if (labeled.length > 0 && issueLabels.some(l => labeled.includes(l))) { 64 | core.info(`Skipping issue ${issue?.number} because it contains one of the labels: ${labeled.join(', ')}`) 65 | return 66 | } 67 | } else { 68 | if (labeled.length > 0 && !issueLabels.some(l => labeled.includes(l))) { 69 | core.info(`Skipping issue ${issue?.number} because it does not have one of the labels: ${labeled.join(', ')}`) 70 | return 71 | } 72 | } 73 | 74 | core.debug(`Project URL: ${projectUrl}`) 75 | 76 | const urlMatch = projectUrl.match(urlParse) 77 | 78 | if (!urlMatch) { 79 | throw new Error( 80 | `Invalid project URL: ${projectUrl}. Project URL should match the format ///projects/`, 81 | ) 82 | } 83 | 84 | const projectOwnerName = urlMatch.groups?.ownerName 85 | const projectNumber = parseInt(urlMatch.groups?.projectNumber ?? '', 10) 86 | const ownerType = urlMatch.groups?.ownerType 87 | const ownerTypeQuery = mustGetOwnerTypeQuery(ownerType) 88 | 89 | core.debug(`Project owner: ${projectOwnerName}`) 90 | core.debug(`Project number: ${projectNumber}`) 91 | core.debug(`Project owner type: ${ownerType}`) 92 | 93 | // First, use the GraphQL API to request the project's node ID. 94 | const idResp = await octokit.graphql( 95 | `query getProject($projectOwnerName: String!, $projectNumber: Int!) { 96 | ${ownerTypeQuery}(login: $projectOwnerName) { 97 | projectV2(number: $projectNumber) { 98 | id 99 | } 100 | } 101 | }`, 102 | { 103 | projectOwnerName, 104 | projectNumber, 105 | }, 106 | ) 107 | 108 | const projectId = idResp[ownerTypeQuery]?.projectV2.id 109 | const contentId = issue?.node_id 110 | 111 | core.debug(`Project node ID: ${projectId}`) 112 | core.debug(`Content ID: ${contentId}`) 113 | 114 | // Next, use the GraphQL API to add the issue to the project. 115 | // If the issue has the same owner as the project, we can directly 116 | // add a project item. Otherwise, we add a draft issue. 117 | if (issueOwnerName === projectOwnerName) { 118 | core.info('Creating project item') 119 | 120 | const addResp = await octokit.graphql( 121 | `mutation addIssueToProject($input: AddProjectV2ItemByIdInput!) { 122 | addProjectV2ItemById(input: $input) { 123 | item { 124 | id 125 | } 126 | } 127 | }`, 128 | { 129 | input: { 130 | projectId, 131 | contentId, 132 | }, 133 | }, 134 | ) 135 | 136 | core.setOutput('itemId', addResp.addProjectV2ItemById.item.id) 137 | } else { 138 | core.info('Creating draft issue in project') 139 | 140 | const addResp = await octokit.graphql( 141 | `mutation addDraftIssueToProject($projectId: ID!, $title: String!) { 142 | addProjectV2DraftIssue(input: { 143 | projectId: $projectId, 144 | title: $title 145 | }) { 146 | projectItem { 147 | id 148 | } 149 | } 150 | }`, 151 | { 152 | projectId, 153 | title: issue?.html_url, 154 | }, 155 | ) 156 | 157 | core.setOutput('itemId', addResp.addProjectV2DraftIssue.projectItem.id) 158 | } 159 | } 160 | 161 | export function mustGetOwnerTypeQuery(ownerType?: string): 'organization' | 'user' { 162 | const ownerTypeQuery = ownerType === 'orgs' ? 'organization' : ownerType === 'users' ? 'user' : null 163 | 164 | if (!ownerTypeQuery) { 165 | throw new Error(`Unsupported ownerType: ${ownerType}. Must be one of 'orgs' or 'users'`) 166 | } 167 | 168 | return ownerTypeQuery 169 | } 170 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # actions/add-to-project 2 | 3 | Use this action to automatically add the current issue or pull request to a [GitHub project](https://docs.github.com/en/issues/trying-out-the-new-projects-experience/about-projects). 4 | Note that this action does not support [GitHub projects (classic)](https://docs.github.com/en/issues/organizing-your-work-with-project-boards). 5 | 6 | ## Current Status 7 | 8 | [![build-test](https://github.com/actions/add-to-project/actions/workflows/test.yml/badge.svg)](https://github.com/actions/add-to-project/actions/workflows/test.yml) 9 | 10 | ## Usage 11 | 12 | _See [action.yml](action.yml) for [metadata](https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions) that defines the inputs, outputs, and runs configuration for this action._ 13 | 14 | _For more information about workflows, see [Using workflows](https://docs.github.com/en/actions/using-workflows)._ 15 | 16 | Create a workflow that runs when Issues or Pull Requests are opened or labeled in your repository; this workflow also supports adding Issues to your project which are transferred into your repository. Optionally configure any filters you may want to add, such as only adding issues with certain labels. You may match labels with an `AND` or an `OR` operator, or exclude labels with a `NOT` operator. 17 | 18 | Once you've configured your workflow, save it as a `.yml` file in your target Repository's `.github/workflows` directory. 19 | 20 | ### Examples 21 | 22 | #### Example Usage: Issue opened with labels `bug` OR `needs-triage` 23 | 24 | ```yaml 25 | name: Add bugs to bugs project 26 | 27 | on: 28 | issues: 29 | types: 30 | - opened 31 | 32 | jobs: 33 | add-to-project: 34 | name: Add issue to project 35 | runs-on: ubuntu-latest 36 | steps: 37 | - uses: actions/add-to-project@RELEASE_VERSION 38 | with: 39 | # You can target a project in a different organization 40 | # to the issue 41 | project-url: https://github.com/orgs//projects/ 42 | github-token: ${{ secrets.ADD_TO_PROJECT_PAT }} 43 | labeled: bug, needs-triage 44 | label-operator: OR 45 | ``` 46 | 47 | #### Example Usage: Adds all issues opened that do not include the label `bug` OR `needs-triage` 48 | 49 | ```yaml 50 | name: Adds all issues that don't include the 'bug' or 'needs-triage' labels to project board 51 | 52 | on: 53 | issues: 54 | types: 55 | - opened 56 | 57 | jobs: 58 | add-to-project: 59 | name: Add issue to project 60 | runs-on: ubuntu-latest 61 | steps: 62 | - uses: actions/add-to-project@RELEASE_VERSION 63 | with: 64 | project-url: https://github.com/orgs//projects/ 65 | github-token: ${{ secrets.ADD_TO_PROJECT_PAT }} 66 | labeled: bug, needs-triage 67 | label-operator: NOT 68 | ``` 69 | 70 | #### Example Usage: Pull Requests labeled with `needs-review` and `size/XL` 71 | 72 | ```yaml 73 | name: Add needs-review and size/XL pull requests to projects 74 | 75 | on: 76 | pull_request: 77 | types: 78 | - labeled 79 | 80 | jobs: 81 | add-to-project: 82 | name: Add pull request to project 83 | runs-on: ubuntu-latest 84 | steps: 85 | - uses: actions/add-to-project@RELEASE_VERSION 86 | with: 87 | project-url: https://github.com/orgs//projects/ 88 | github-token: ${{ secrets.ADD_TO_PROJECT_PAT }} 89 | labeled: needs-review, size/XL 90 | label-operator: AND 91 | ``` 92 | 93 | ### Further reading and additional resources 94 | 95 | - [actions/add-to-project](#actionsadd-to-project) 96 | - [Current Status](#current-status) 97 | - [Usage](#usage) 98 | - [Examples](#examples) 99 | - [Example Usage: Issue opened with labels `bug` OR `needs-triage`](#example-usage-issue-opened-with-labels-bug-or-needs-triage) 100 | - [Example Usage: Adds all issues opened that do not include the label `bug` OR `needs-triage`](#example-usage-adds-all-issues-opened-that-do-not-include-the-label-bug-or-needs-triage) 101 | - [Example Usage: Pull Requests labeled with `needs-review` and `size/XL`](#example-usage-pull-requests-labeled-with-needs-review-and-sizexl) 102 | - [Further reading and additional resources](#further-reading-and-additional-resources) 103 | - [Inputs](#inputs) 104 | - [Supported Events](#supported-events) 105 | - [Creating a PAT and adding it to your repository](#creating-a-pat-and-adding-it-to-your-repository) 106 | - [Development](#development) 107 | - [Publish to a distribution branch](#publish-to-a-distribution-branch) 108 | - [License](#license) 109 | 110 | ## Inputs 111 | 112 | - `project-url` **(required)** is the URL of the GitHub project to add issues to. 113 | _eg: `https://github.com/orgs|users//projects/`_ 114 | - `github-token` **(required)** is a [personal access 115 | token](https://github.com/settings/tokens/new) with `repo` and `project` scopes. 116 | _See [Creating a PAT and adding it to your repository](#creating-a-pat-and-adding-it-to-your-repository) for more details_ 117 | - `labeled` **(optional)** is a comma-separated list of labels used to filter applicable issues. When this key is provided, an issue must have _one_ of the labels in the list to be added to the project. Omitting this key means that any issue will be added. 118 | - `label-operator` **(optional)** is the behavior of the labels filter, either `AND`, `OR` or `NOT` that controls if the issue should be matched with `all` `labeled` input or any of them, default is `OR`. 119 | 120 | ## Supported Events 121 | 122 | Currently this action supports the following [`issues` events](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#issues): 123 | 124 | - `opened` 125 | - `reopened` 126 | - `transferred` 127 | - `labeled` 128 | 129 | and the following [`pull_request` events](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request): 130 | 131 | - `opened` 132 | - `reopened` 133 | - `labeled` 134 | 135 | Using these events ensure that a given issue or pull request, in the workflow's repo, is added to the [specified project](#project-url). If [labeled input(s)](#labeled) are defined, then issues will only be added if they contain at least _one_ of the labels in the list. 136 | 137 | ## Creating a PAT and adding it to your repository 138 | 139 | - Create a new [personal access token](https://github.com/settings/tokens/new). _See [Creating a personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) for more information_ 140 | - For **Tokens (classic)** include the `project` scope; for private repos you will also need `repo` scope. 141 | - For **Fine-grained tokens**, you must first select the appropriate _owner_ and associated _repositories_. Then select _Organization permissions -> `projects` `read & write`_, and _Repository permissions -> `issues` `read-only`_ and _`pull requests` `read-only`_. 142 | 143 | - add the newly created PAT as a repository secret, this secret will be referenced by the [github-token input](#github-token) 144 | _See [Encrypted secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets#creating-encrypted-secrets-for-a-repository) for more information_ 145 | 146 | ## Setting a specific status or column name to the project item 147 | 148 | If you want to add an issue to a custom default column in a project (i.e. other than 'Todo'), you can do this directly via the project UI. You don't need to add anything else to your YAML workflow file to get this to work. 149 | 150 | Use the [Add To GitHub Projects](https://github.com/marketplace/actions/add-to-github-projects) action to assign newly opened issues to the project. And then in the project UI simply [specify which column to use as the default](https://docs.github.com/en/issues/planning-and-tracking-with-projects/learning-about-projects/quickstart-for-projects#configure-built-in-automation)! 151 | 152 | ## Development 153 | 154 | To get started contributing to this project, clone it and install dependencies. 155 | Note that this action runs in Node.js 20.x, so we recommend using that version 156 | of Node (see "engines" in this action's package.json for details). 157 | 158 | ```shell 159 | > git clone https://github.com/actions/add-to-project 160 | > cd add-to-project 161 | > npm install 162 | ``` 163 | 164 | Or, use [GitHub Codespaces](https://github.com/features/codespaces). 165 | 166 | See the [toolkit 167 | documentation](https://github.com/actions/toolkit/blob/master/README.md#packages) 168 | for the various packages used in building this action. 169 | 170 | ## Publish to a distribution branch 171 | 172 | Actions are run from GitHub repositories, so we check in the packaged action in 173 | the "dist/" directory. 174 | 175 | ```shell 176 | > npm run build 177 | > git add lib dist 178 | > git commit -a -m "Build and package" 179 | > git push origin releases/v1 180 | ``` 181 | 182 | Now, a release can be created from the branch containing the built action. 183 | 184 | ## License 185 | 186 | The scripts and documentation in this project are released under the [MIT License](LICENSE) 187 | -------------------------------------------------------------------------------- /.licenses/npm/before-after-hook-2.2.3.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: before-after-hook 3 | version: 2.2.3 4 | type: npm 5 | summary: asynchronous before/error/after hooks for internal functionality 6 | homepage: 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/before-after-hook-4.0.0.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: before-after-hook 3 | version: 4.0.0 4 | type: npm 5 | summary: asynchronous before/error/after hooks for internal functionality 6 | homepage: 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 | -------------------------------------------------------------------------------- /__tests__/add-to-project.test.ts: -------------------------------------------------------------------------------- 1 | import * as core from '@actions/core' 2 | import * as github from '@actions/github' 3 | 4 | import {addToProject, mustGetOwnerTypeQuery} from '../src/add-to-project' 5 | 6 | describe('addToProject', () => { 7 | let outputs: Record 8 | 9 | beforeEach(() => { 10 | jest.spyOn(process.stdout, 'write').mockImplementation(() => true) 11 | }) 12 | 13 | beforeEach(() => { 14 | mockGetInput({ 15 | 'project-url': 'https://github.com/orgs/actions/projects/1', 16 | 'github-token': 'gh_token', 17 | }) 18 | 19 | outputs = mockSetOutput() 20 | }) 21 | 22 | afterEach(() => { 23 | github.context.payload = {} 24 | jest.restoreAllMocks() 25 | }) 26 | 27 | test('adds an issue from the same organization to the project', async () => { 28 | github.context.payload = { 29 | issue: { 30 | number: 1, 31 | labels: [{name: 'bug'}], 32 | // eslint-disable-next-line camelcase 33 | html_url: 'https://github.com/actions/add-to-project/issues/74', 34 | }, 35 | repository: { 36 | name: 'add-to-project', 37 | owner: { 38 | login: 'actions', 39 | }, 40 | }, 41 | } 42 | 43 | mockGraphQL( 44 | { 45 | test: /getProject/, 46 | return: { 47 | organization: { 48 | projectV2: { 49 | id: 'project-id', 50 | }, 51 | }, 52 | }, 53 | }, 54 | { 55 | test: /addProjectV2ItemById/, 56 | return: { 57 | addProjectV2ItemById: { 58 | item: { 59 | id: 'project-item-id', 60 | }, 61 | }, 62 | }, 63 | }, 64 | ) 65 | 66 | await addToProject() 67 | 68 | expect(outputs.itemId).toEqual('project-item-id') 69 | }) 70 | 71 | test('adds an issue from a different organization to the project', async () => { 72 | github.context.payload = { 73 | issue: { 74 | number: 2221, 75 | labels: [{name: 'bug'}], 76 | // eslint-disable-next-line camelcase 77 | html_url: 'https://github.com/octokit/octokit.js/issues/2221', 78 | }, 79 | repository: { 80 | name: 'octokit.js', 81 | owner: { 82 | login: 'octokit', 83 | }, 84 | }, 85 | } 86 | 87 | mockGraphQL( 88 | { 89 | test: /getProject/, 90 | return: { 91 | organization: { 92 | projectV2: { 93 | id: 'project-id', 94 | }, 95 | }, 96 | }, 97 | }, 98 | { 99 | test: /addProjectV2DraftIssue/, 100 | return: { 101 | addProjectV2DraftIssue: { 102 | projectItem: { 103 | id: 'project-item-id', 104 | }, 105 | }, 106 | }, 107 | }, 108 | ) 109 | 110 | await addToProject() 111 | 112 | expect(outputs.itemId).toEqual('project-item-id') 113 | }) 114 | 115 | test('adds matching issues with a label filter without label-operator', async () => { 116 | mockGetInput({ 117 | 'project-url': 'https://github.com/orgs/actions/projects/1', 118 | 'github-token': 'gh_token', 119 | labeled: 'bug, new', 120 | }) 121 | 122 | github.context.payload = { 123 | issue: { 124 | number: 1, 125 | labels: [{name: 'bug'}], 126 | // eslint-disable-next-line camelcase 127 | html_url: 'https://github.com/actions/add-to-project/issues/74', 128 | }, 129 | repository: { 130 | name: 'add-to-project', 131 | owner: { 132 | login: 'actions', 133 | }, 134 | }, 135 | } 136 | 137 | mockGraphQL( 138 | { 139 | test: /getProject/, 140 | return: { 141 | organization: { 142 | projectV2: { 143 | id: 'project-id', 144 | }, 145 | }, 146 | }, 147 | }, 148 | { 149 | test: /addProjectV2ItemById/, 150 | return: { 151 | addProjectV2ItemById: { 152 | item: { 153 | id: 'project-item-id', 154 | }, 155 | }, 156 | }, 157 | }, 158 | ) 159 | 160 | await addToProject() 161 | 162 | expect(outputs.itemId).toEqual('project-item-id') 163 | }) 164 | 165 | test('adds matching pull-requests with a label filter without label-operator', async () => { 166 | mockGetInput({ 167 | 'project-url': 'https://github.com/orgs/actions/projects/1', 168 | 'github-token': 'gh_token', 169 | labeled: 'bug, new', 170 | }) 171 | 172 | github.context.payload = { 173 | // eslint-disable-next-line camelcase 174 | pull_request: { 175 | number: 1, 176 | labels: [{name: 'bug'}], 177 | // eslint-disable-next-line camelcase 178 | html_url: 'https://github.com/actions/add-to-project/pull/136', 179 | }, 180 | repository: { 181 | name: 'add-to-project', 182 | owner: { 183 | login: 'actions', 184 | }, 185 | }, 186 | } 187 | 188 | mockGraphQL( 189 | { 190 | test: /getProject/, 191 | return: { 192 | organization: { 193 | projectV2: { 194 | id: 'project-id', 195 | }, 196 | }, 197 | }, 198 | }, 199 | { 200 | test: /addProjectV2ItemById/, 201 | return: { 202 | addProjectV2ItemById: { 203 | item: { 204 | id: 'project-item-id', 205 | }, 206 | }, 207 | }, 208 | }, 209 | ) 210 | 211 | await addToProject() 212 | 213 | expect(outputs.itemId).toEqual('project-item-id') 214 | }) 215 | 216 | test('does not add un-matching issues with a label filter without label-operator', async () => { 217 | mockGetInput({ 218 | 'project-url': 'https://github.com/orgs/actions/projects/1', 219 | 'github-token': 'gh_token', 220 | labeled: 'bug', 221 | }) 222 | 223 | github.context.payload = { 224 | issue: { 225 | number: 1, 226 | labels: [], 227 | // eslint-disable-next-line camelcase 228 | html_url: 'https://github.com/actions/add-to-project/issues/74', 229 | }, 230 | repository: { 231 | name: 'add-to-project', 232 | owner: { 233 | login: 'actions', 234 | }, 235 | }, 236 | } 237 | 238 | const infoSpy = jest.spyOn(core, 'info') 239 | const gqlMock = mockGraphQL() 240 | await addToProject() 241 | expect(infoSpy).toHaveBeenCalledWith(`Skipping issue 1 because it does not have one of the labels: bug`) 242 | expect(gqlMock).not.toHaveBeenCalled() 243 | }) 244 | 245 | test('adds matching issues with labels filter with AND label-operator', async () => { 246 | mockGetInput({ 247 | 'project-url': 'https://github.com/orgs/actions/projects/1', 248 | 'github-token': 'gh_token', 249 | labeled: 'bug, new', 250 | 'label-operator': 'AND', 251 | }) 252 | 253 | github.context.payload = { 254 | issue: { 255 | number: 1, 256 | labels: [{name: 'bug'}, {name: 'new'}], 257 | // eslint-disable-next-line camelcase 258 | html_url: 'https://github.com/actions/add-to-project/issues/74', 259 | }, 260 | repository: { 261 | name: 'add-to-project', 262 | owner: { 263 | login: 'actions', 264 | }, 265 | }, 266 | } 267 | 268 | mockGraphQL( 269 | { 270 | test: /getProject/, 271 | return: { 272 | organization: { 273 | projectV2: { 274 | id: 'project-id', 275 | }, 276 | }, 277 | }, 278 | }, 279 | { 280 | test: /addProjectV2ItemById/, 281 | return: { 282 | addProjectV2ItemById: { 283 | item: { 284 | id: 'project-item-id', 285 | }, 286 | }, 287 | }, 288 | }, 289 | ) 290 | 291 | await addToProject() 292 | 293 | expect(outputs.itemId).toEqual('project-item-id') 294 | }) 295 | 296 | test('does not add un-matching issues with labels filter with AND label-operator', async () => { 297 | mockGetInput({ 298 | 'project-url': 'https://github.com/orgs/actions/projects/1', 299 | 'github-token': 'gh_token', 300 | labeled: 'bug, new', 301 | 'label-operator': 'AND', 302 | }) 303 | 304 | github.context.payload = { 305 | issue: { 306 | number: 1, 307 | labels: [{name: 'bug'}, {name: 'other'}], 308 | // eslint-disable-next-line camelcase 309 | html_url: 'https://github.com/actions/add-to-project/issues/74', 310 | }, 311 | repository: { 312 | name: 'add-to-project', 313 | owner: { 314 | login: 'actions', 315 | }, 316 | }, 317 | } 318 | 319 | const infoSpy = jest.spyOn(core, 'info') 320 | const gqlMock = mockGraphQL() 321 | await addToProject() 322 | expect(infoSpy).toHaveBeenCalledWith(`Skipping issue 1 because it doesn't match all the labels: bug, new`) 323 | expect(gqlMock).not.toHaveBeenCalled() 324 | }) 325 | 326 | test('does not add matching issues with labels filter with NOT label-operator', async () => { 327 | mockGetInput({ 328 | 'project-url': 'https://github.com/orgs/actions/projects/1', 329 | 'github-token': 'gh_token', 330 | labeled: 'bug, new', 331 | 'label-operator': 'NOT', 332 | }) 333 | 334 | github.context.payload = { 335 | issue: { 336 | number: 1, 337 | labels: [{name: 'bug'}], 338 | // eslint-disable-next-line camelcase 339 | html_url: 'https://github.com/actions/add-to-project/issues/74', 340 | }, 341 | repository: { 342 | name: 'add-to-project', 343 | owner: { 344 | login: 'actions', 345 | }, 346 | }, 347 | } 348 | 349 | const infoSpy = jest.spyOn(core, 'info') 350 | const gqlMock = mockGraphQL() 351 | await addToProject() 352 | expect(infoSpy).toHaveBeenCalledWith(`Skipping issue 1 because it contains one of the labels: bug, new`) 353 | expect(gqlMock).not.toHaveBeenCalled() 354 | }) 355 | 356 | test('adds issues that do not have labels present in the label list with NOT label-operator', async () => { 357 | mockGetInput({ 358 | 'project-url': 'https://github.com/orgs/actions/projects/1', 359 | 'github-token': 'gh_token', 360 | labeled: 'bug, new', 361 | 'label-operator': 'NOT', 362 | }) 363 | 364 | github.context.payload = { 365 | issue: { 366 | number: 1, 367 | labels: [{name: 'other'}], 368 | // eslint-disable-next-line camelcase 369 | html_url: 'https://github.com/actions/add-to-project/issues/74', 370 | }, 371 | repository: { 372 | name: 'add-to-project', 373 | owner: { 374 | login: 'actions', 375 | }, 376 | }, 377 | } 378 | 379 | mockGraphQL( 380 | { 381 | test: /getProject/, 382 | return: { 383 | organization: { 384 | projectV2: { 385 | id: 'project-next-id', 386 | }, 387 | }, 388 | }, 389 | }, 390 | { 391 | test: /addProjectV2ItemById/, 392 | return: { 393 | addProjectV2ItemById: { 394 | item: { 395 | id: 'project-next-item-id', 396 | }, 397 | }, 398 | }, 399 | }, 400 | ) 401 | 402 | await addToProject() 403 | 404 | expect(outputs.itemId).toEqual('project-next-item-id') 405 | }) 406 | 407 | test('adds matching issues with multiple label filters', async () => { 408 | mockGetInput({ 409 | 'project-url': 'https://github.com/orgs/actions/projects/1', 410 | 'github-token': 'gh_token', 411 | labeled: 'accessibility,backend,bug', 412 | }) 413 | 414 | github.context.payload = { 415 | issue: { 416 | number: 1, 417 | labels: [{name: 'accessibility'}, {name: 'backend'}], 418 | // eslint-disable-next-line camelcase 419 | html_url: 'https://github.com/actions/add-to-project/issues/74', 420 | }, 421 | repository: { 422 | name: 'add-to-project', 423 | owner: { 424 | login: 'actions', 425 | }, 426 | }, 427 | } 428 | 429 | const gqlMock = mockGraphQL( 430 | { 431 | test: /getProject/, 432 | return: { 433 | organization: { 434 | projectV2: { 435 | id: 'project-id', 436 | }, 437 | }, 438 | }, 439 | }, 440 | { 441 | test: /addProjectV2ItemById/, 442 | return: { 443 | addProjectV2ItemById: { 444 | item: { 445 | id: 'project-item-id', 446 | }, 447 | }, 448 | }, 449 | }, 450 | ) 451 | 452 | const infoSpy = jest.spyOn(core, 'info') 453 | 454 | await addToProject() 455 | 456 | expect(gqlMock).toHaveBeenCalled() 457 | expect(infoSpy).toHaveBeenCalledWith('Creating project item') 458 | // We shouldn't have any logs relating to the issue being skipped 459 | expect(infoSpy.mock.calls.length).toEqual(1) 460 | expect(outputs.itemId).toEqual('project-item-id') 461 | }) 462 | 463 | test('does not add un-matching issues with multiple label filters', async () => { 464 | mockGetInput({ 465 | 'project-url': 'https://github.com/orgs/actions/projects/1', 466 | 'github-token': 'gh_token', 467 | labeled: 'accessibility, backend, bug', 468 | }) 469 | 470 | github.context.payload = { 471 | issue: { 472 | number: 1, 473 | labels: [{name: 'data'}, {name: 'frontend'}, {name: 'improvement'}], 474 | // eslint-disable-next-line camelcase 475 | html_url: 'https://github.com/actions/add-to-project/issues/74', 476 | }, 477 | repository: { 478 | name: 'add-to-project', 479 | owner: { 480 | login: 'actions', 481 | }, 482 | }, 483 | } 484 | 485 | const infoSpy = jest.spyOn(core, 'info') 486 | const gqlMock = mockGraphQL() 487 | await addToProject() 488 | expect(infoSpy).toHaveBeenCalledWith( 489 | `Skipping issue 1 because it does not have one of the labels: accessibility, backend, bug`, 490 | ) 491 | expect(gqlMock).not.toHaveBeenCalled() 492 | }) 493 | 494 | test('handles spaces and extra commas gracefully in label filter input', async () => { 495 | mockGetInput({ 496 | 'project-url': 'https://github.com/orgs/actions/projects/1', 497 | 'github-token': 'gh_token', 498 | labeled: 'accessibility , backend ,, . , bug', 499 | }) 500 | 501 | github.context.payload = { 502 | issue: { 503 | number: 1, 504 | labels: [{name: 'accessibility'}, {name: 'backend'}, {name: 'bug'}], 505 | 'label-operator': 'AND', 506 | // eslint-disable-next-line camelcase 507 | html_url: 'https://github.com/actions/add-to-project/issues/74', 508 | }, 509 | repository: { 510 | name: 'add-to-project', 511 | owner: { 512 | login: 'actions', 513 | }, 514 | }, 515 | } 516 | 517 | const gqlMock = mockGraphQL( 518 | { 519 | test: /getProject/, 520 | return: { 521 | organization: { 522 | projectV2: { 523 | id: 'project-id', 524 | }, 525 | }, 526 | }, 527 | }, 528 | { 529 | test: /addProjectV2ItemById/, 530 | return: { 531 | addProjectV2ItemById: { 532 | item: { 533 | id: 'project-item-id', 534 | }, 535 | }, 536 | }, 537 | }, 538 | ) 539 | 540 | const infoSpy = jest.spyOn(core, 'info') 541 | 542 | await addToProject() 543 | 544 | expect(gqlMock).toHaveBeenCalled() 545 | expect(infoSpy).toHaveBeenCalledWith('Creating project item') 546 | // We shouldn't have any logs relating to the issue being skipped 547 | expect(infoSpy.mock.calls.length).toEqual(1) 548 | expect(outputs.itemId).toEqual('project-item-id') 549 | }) 550 | 551 | test(`throws an error when url isn't a valid project url`, async () => { 552 | mockGetInput({ 553 | 'project-url': 'https://github.com/orgs/github/repositories', 554 | 'github-token': 'gh_token', 555 | }) 556 | 557 | github.context.payload = { 558 | issue: { 559 | number: 1, 560 | labels: [], 561 | // eslint-disable-next-line camelcase 562 | html_url: 'https://github.com/actions/add-to-project/issues/74', 563 | }, 564 | repository: { 565 | name: 'add-to-project', 566 | owner: { 567 | login: 'actions', 568 | }, 569 | }, 570 | } 571 | 572 | const infoSpy = jest.spyOn(core, 'info') 573 | const gqlMock = mockGraphQL() 574 | await expect(addToProject()).rejects.toThrow( 575 | 'Invalid project URL: https://github.com/orgs/github/repositories. Project URL should match the format ///projects/', 576 | ) 577 | expect(infoSpy).not.toHaveBeenCalled() 578 | expect(gqlMock).not.toHaveBeenCalled() 579 | }) 580 | 581 | test(`works with URLs that are not under the github.com domain`, async () => { 582 | github.context.payload = { 583 | issue: { 584 | number: 1, 585 | labels: [{name: 'bug'}], 586 | // eslint-disable-next-line camelcase 587 | html_url: 'https://notgithub.com/actions/add-to-project/issues/74', 588 | }, 589 | repository: { 590 | name: 'add-to-project', 591 | owner: { 592 | login: 'actions', 593 | }, 594 | }, 595 | } 596 | 597 | mockGraphQL( 598 | { 599 | test: /getProject/, 600 | return: { 601 | organization: { 602 | projectV2: { 603 | id: 'project-id', 604 | }, 605 | }, 606 | }, 607 | }, 608 | { 609 | test: /addProjectV2ItemById/, 610 | return: { 611 | addProjectV2ItemById: { 612 | item: { 613 | id: 'project-item-id', 614 | }, 615 | }, 616 | }, 617 | }, 618 | ) 619 | 620 | await addToProject() 621 | 622 | expect(outputs.itemId).toEqual('project-item-id') 623 | }) 624 | 625 | test('constructs the correct graphQL query given an organization owner', async () => { 626 | mockGetInput({ 627 | 'project-url': 'https://github.com/orgs/actions/projects/1', 628 | 'github-token': 'gh_token', 629 | labeled: 'bug, new', 630 | }) 631 | 632 | github.context.payload = { 633 | issue: { 634 | number: 1, 635 | labels: [{name: 'bug'}], 636 | // eslint-disable-next-line camelcase 637 | html_url: 'https://github.com/actions/add-to-project/issues/74', 638 | }, 639 | repository: { 640 | name: 'add-to-project', 641 | owner: { 642 | login: 'actions', 643 | }, 644 | }, 645 | } 646 | 647 | const gqlMock = mockGraphQL( 648 | { 649 | test: /getProject/, 650 | return: { 651 | organization: { 652 | projectV2: { 653 | id: 'project-id', 654 | }, 655 | }, 656 | }, 657 | }, 658 | { 659 | test: /addProjectV2ItemById/, 660 | return: { 661 | addProjectV2ItemById: { 662 | item: { 663 | id: 'project-item-id', 664 | }, 665 | }, 666 | }, 667 | }, 668 | ) 669 | 670 | await addToProject() 671 | 672 | expect(gqlMock).toHaveBeenNthCalledWith(1, expect.stringContaining('organization(login: $projectOwnerName)'), { 673 | projectOwnerName: 'actions', 674 | projectNumber: 1, 675 | }) 676 | }) 677 | 678 | test('constructs the correct graphQL query given a user owner', async () => { 679 | mockGetInput({ 680 | 'project-url': 'https://github.com/users/monalisa/projects/1', 681 | 'github-token': 'gh_token', 682 | labeled: 'bug, new', 683 | }) 684 | 685 | github.context.payload = { 686 | issue: { 687 | number: 1, 688 | labels: [{name: 'bug'}], 689 | // eslint-disable-next-line camelcase 690 | html_url: 'https://github.com/monalisa/add-to-project/issues/74', 691 | }, 692 | repository: { 693 | name: 'add-to-project', 694 | owner: { 695 | login: 'monalisa', 696 | }, 697 | }, 698 | } 699 | 700 | const gqlMock = mockGraphQL( 701 | { 702 | test: /getProject/, 703 | return: { 704 | organization: { 705 | projectV2: { 706 | id: 'project-id', 707 | }, 708 | }, 709 | }, 710 | }, 711 | { 712 | test: /addProjectV2ItemById/, 713 | return: { 714 | addProjectV2ItemById: { 715 | item: { 716 | id: 'project-item-id', 717 | }, 718 | }, 719 | }, 720 | }, 721 | ) 722 | 723 | await addToProject() 724 | 725 | expect(gqlMock).toHaveBeenNthCalledWith(1, expect.stringContaining('user(login: $projectOwnerName)'), { 726 | projectOwnerName: 'monalisa', 727 | projectNumber: 1, 728 | }) 729 | }) 730 | 731 | test('compares labels case-insensitively', async () => { 732 | mockGetInput({ 733 | 'project-url': 'https://github.com/orgs/actions/projects/1', 734 | 'github-token': 'gh_token', 735 | labeled: 'FOO, Bar, baz', 736 | 'label-operator': 'AND', 737 | }) 738 | 739 | github.context.payload = { 740 | issue: { 741 | number: 1, 742 | labels: [{name: 'foo'}, {name: 'BAR'}, {name: 'baz'}], 743 | // eslint-disable-next-line camelcase 744 | html_url: 'https://github.com/actions/add-to-project/issues/74', 745 | }, 746 | repository: { 747 | name: 'add-to-project', 748 | owner: { 749 | login: 'actions', 750 | }, 751 | }, 752 | } 753 | 754 | mockGraphQL( 755 | { 756 | test: /getProject/, 757 | return: { 758 | organization: { 759 | projectV2: { 760 | id: 'project-next-id', 761 | }, 762 | }, 763 | }, 764 | }, 765 | { 766 | test: /addProjectV2ItemById/, 767 | return: { 768 | addProjectV2ItemById: { 769 | item: { 770 | id: 'project-next-item-id', 771 | }, 772 | }, 773 | }, 774 | }, 775 | ) 776 | 777 | await addToProject() 778 | 779 | expect(outputs.itemId).toEqual('project-next-item-id') 780 | }) 781 | }) 782 | 783 | describe('mustGetOwnerTypeQuery', () => { 784 | test('returns organization for orgs ownerType', async () => { 785 | const ownerTypeQuery = mustGetOwnerTypeQuery('orgs') 786 | 787 | expect(ownerTypeQuery).toEqual('organization') 788 | }) 789 | 790 | test('returns user for users ownerType', async () => { 791 | const ownerTypeQuery = mustGetOwnerTypeQuery('users') 792 | 793 | expect(ownerTypeQuery).toEqual('user') 794 | }) 795 | 796 | test('throws an error when an unsupported ownerType is set', async () => { 797 | expect(() => { 798 | mustGetOwnerTypeQuery('unknown') 799 | }).toThrow(`Unsupported ownerType: unknown. Must be one of 'orgs' or 'users'`) 800 | }) 801 | }) 802 | 803 | function mockGetInput(mocks: Record): jest.SpyInstance { 804 | const mock = (key: string) => mocks[key] ?? '' 805 | return jest.spyOn(core, 'getInput').mockImplementation(mock) 806 | } 807 | 808 | function mockSetOutput(): Record { 809 | const output: Record = {} 810 | jest.spyOn(core, 'setOutput').mockImplementation((key, value) => (output[key] = value)) 811 | return output 812 | } 813 | 814 | function mockGraphQL(...mocks: {test: RegExp; return: unknown}[]): jest.Mock { 815 | const mock = jest.fn().mockImplementation((query: string) => { 816 | const match = mocks.find(m => m.test.test(query)) 817 | 818 | if (match) { 819 | return match.return 820 | } 821 | 822 | throw new Error(`Unexpected GraphQL query: ${query}`) 823 | }) 824 | 825 | jest.spyOn(github, 'getOctokit').mockImplementation(() => { 826 | return { 827 | graphql: mock, 828 | } as unknown as ReturnType 829 | }) 830 | 831 | return mock 832 | } 833 | -------------------------------------------------------------------------------- /dist/licenses.txt: -------------------------------------------------------------------------------- 1 | @actions/core 2 | MIT 3 | The MIT License (MIT) 4 | 5 | Copyright 2019 GitHub 6 | 7 | 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: 8 | 9 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 10 | 11 | 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. 12 | 13 | @actions/exec 14 | MIT 15 | The MIT License (MIT) 16 | 17 | Copyright 2019 GitHub 18 | 19 | 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: 20 | 21 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 22 | 23 | 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. 24 | 25 | @actions/github 26 | MIT 27 | The MIT License (MIT) 28 | 29 | Copyright 2019 GitHub 30 | 31 | 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: 32 | 33 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 34 | 35 | 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. 36 | 37 | @actions/http-client 38 | MIT 39 | Actions Http Client for Node.js 40 | 41 | Copyright (c) GitHub, Inc. 42 | 43 | All rights reserved. 44 | 45 | MIT License 46 | 47 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 48 | associated documentation files (the "Software"), to deal in the Software without restriction, 49 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 50 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 51 | subject to the following conditions: 52 | 53 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 54 | 55 | THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 56 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN 57 | NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 58 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 59 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 60 | 61 | 62 | @actions/io 63 | MIT 64 | The MIT License (MIT) 65 | 66 | Copyright 2019 GitHub 67 | 68 | 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: 69 | 70 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 71 | 72 | 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. 73 | 74 | @fastify/busboy 75 | MIT 76 | Copyright Brian White. All rights reserved. 77 | 78 | Permission is hereby granted, free of charge, to any person obtaining a copy 79 | of this software and associated documentation files (the "Software"), to 80 | deal in the Software without restriction, including without limitation the 81 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 82 | sell copies of the Software, and to permit persons to whom the Software is 83 | furnished to do so, subject to the following conditions: 84 | 85 | The above copyright notice and this permission notice shall be included in 86 | all copies or substantial portions of the Software. 87 | 88 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 89 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 90 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 91 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 92 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 93 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 94 | IN THE SOFTWARE. 95 | 96 | @octokit/auth-token 97 | MIT 98 | The MIT License 99 | 100 | Copyright (c) 2019 Octokit contributors 101 | 102 | Permission is hereby granted, free of charge, to any person obtaining a copy 103 | of this software and associated documentation files (the "Software"), to deal 104 | in the Software without restriction, including without limitation the rights 105 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 106 | copies of the Software, and to permit persons to whom the Software is 107 | furnished to do so, subject to the following conditions: 108 | 109 | The above copyright notice and this permission notice shall be included in 110 | all copies or substantial portions of the Software. 111 | 112 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 113 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 114 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 115 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 116 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 117 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 118 | THE SOFTWARE. 119 | 120 | 121 | @octokit/core 122 | MIT 123 | The MIT License 124 | 125 | Copyright (c) 2019 Octokit contributors 126 | 127 | Permission is hereby granted, free of charge, to any person obtaining a copy 128 | of this software and associated documentation files (the "Software"), to deal 129 | in the Software without restriction, including without limitation the rights 130 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 131 | copies of the Software, and to permit persons to whom the Software is 132 | furnished to do so, subject to the following conditions: 133 | 134 | The above copyright notice and this permission notice shall be included in 135 | all copies or substantial portions of the Software. 136 | 137 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 138 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 139 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 140 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 141 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 142 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 143 | THE SOFTWARE. 144 | 145 | 146 | @octokit/endpoint 147 | MIT 148 | The MIT License 149 | 150 | Copyright (c) 2018 Octokit contributors 151 | 152 | Permission is hereby granted, free of charge, to any person obtaining a copy 153 | of this software and associated documentation files (the "Software"), to deal 154 | in the Software without restriction, including without limitation the rights 155 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 156 | copies of the Software, and to permit persons to whom the Software is 157 | furnished to do so, subject to the following conditions: 158 | 159 | The above copyright notice and this permission notice shall be included in 160 | all copies or substantial portions of the Software. 161 | 162 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 163 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 164 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 165 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 166 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 167 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 168 | THE SOFTWARE. 169 | 170 | 171 | @octokit/graphql 172 | MIT 173 | The MIT License 174 | 175 | Copyright (c) 2018 Octokit contributors 176 | 177 | Permission is hereby granted, free of charge, to any person obtaining a copy 178 | of this software and associated documentation files (the "Software"), to deal 179 | in the Software without restriction, including without limitation the rights 180 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 181 | copies of the Software, and to permit persons to whom the Software is 182 | furnished to do so, subject to the following conditions: 183 | 184 | The above copyright notice and this permission notice shall be included in 185 | all copies or substantial portions of the Software. 186 | 187 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 188 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 189 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 190 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 191 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 192 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 193 | THE SOFTWARE. 194 | 195 | 196 | @octokit/plugin-paginate-rest 197 | MIT 198 | MIT License Copyright (c) 2019 Octokit contributors 199 | 200 | 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: 201 | 202 | The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. 203 | 204 | 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. 205 | 206 | 207 | @octokit/plugin-rest-endpoint-methods 208 | MIT 209 | MIT License Copyright (c) 2019 Octokit contributors 210 | 211 | 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: 212 | 213 | The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. 214 | 215 | 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. 216 | 217 | 218 | @octokit/request 219 | MIT 220 | The MIT License 221 | 222 | Copyright (c) 2018 Octokit contributors 223 | 224 | Permission is hereby granted, free of charge, to any person obtaining a copy 225 | of this software and associated documentation files (the "Software"), to deal 226 | in the Software without restriction, including without limitation the rights 227 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 228 | copies of the Software, and to permit persons to whom the Software is 229 | furnished to do so, subject to the following conditions: 230 | 231 | The above copyright notice and this permission notice shall be included in 232 | all copies or substantial portions of the Software. 233 | 234 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 235 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 236 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 237 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 238 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 239 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 240 | THE SOFTWARE. 241 | 242 | 243 | @octokit/request-error 244 | MIT 245 | The MIT License 246 | 247 | Copyright (c) 2019 Octokit contributors 248 | 249 | Permission is hereby granted, free of charge, to any person obtaining a copy 250 | of this software and associated documentation files (the "Software"), to deal 251 | in the Software without restriction, including without limitation the rights 252 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 253 | copies of the Software, and to permit persons to whom the Software is 254 | furnished to do so, subject to the following conditions: 255 | 256 | The above copyright notice and this permission notice shall be included in 257 | all copies or substantial portions of the Software. 258 | 259 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 260 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 261 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 262 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 263 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 264 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 265 | THE SOFTWARE. 266 | 267 | 268 | before-after-hook 269 | Apache-2.0 270 | Apache License 271 | Version 2.0, January 2004 272 | http://www.apache.org/licenses/ 273 | 274 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 275 | 276 | 1. Definitions. 277 | 278 | "License" shall mean the terms and conditions for use, reproduction, 279 | and distribution as defined by Sections 1 through 9 of this document. 280 | 281 | "Licensor" shall mean the copyright owner or entity authorized by 282 | the copyright owner that is granting the License. 283 | 284 | "Legal Entity" shall mean the union of the acting entity and all 285 | other entities that control, are controlled by, or are under common 286 | control with that entity. For the purposes of this definition, 287 | "control" means (i) the power, direct or indirect, to cause the 288 | direction or management of such entity, whether by contract or 289 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 290 | outstanding shares, or (iii) beneficial ownership of such entity. 291 | 292 | "You" (or "Your") shall mean an individual or Legal Entity 293 | exercising permissions granted by this License. 294 | 295 | "Source" form shall mean the preferred form for making modifications, 296 | including but not limited to software source code, documentation 297 | source, and configuration files. 298 | 299 | "Object" form shall mean any form resulting from mechanical 300 | transformation or translation of a Source form, including but 301 | not limited to compiled object code, generated documentation, 302 | and conversions to other media types. 303 | 304 | "Work" shall mean the work of authorship, whether in Source or 305 | Object form, made available under the License, as indicated by a 306 | copyright notice that is included in or attached to the work 307 | (an example is provided in the Appendix below). 308 | 309 | "Derivative Works" shall mean any work, whether in Source or Object 310 | form, that is based on (or derived from) the Work and for which the 311 | editorial revisions, annotations, elaborations, or other modifications 312 | represent, as a whole, an original work of authorship. For the purposes 313 | of this License, Derivative Works shall not include works that remain 314 | separable from, or merely link (or bind by name) to the interfaces of, 315 | the Work and Derivative Works thereof. 316 | 317 | "Contribution" shall mean any work of authorship, including 318 | the original version of the Work and any modifications or additions 319 | to that Work or Derivative Works thereof, that is intentionally 320 | submitted to Licensor for inclusion in the Work by the copyright owner 321 | or by an individual or Legal Entity authorized to submit on behalf of 322 | the copyright owner. For the purposes of this definition, "submitted" 323 | means any form of electronic, verbal, or written communication sent 324 | to the Licensor or its representatives, including but not limited to 325 | communication on electronic mailing lists, source code control systems, 326 | and issue tracking systems that are managed by, or on behalf of, the 327 | Licensor for the purpose of discussing and improving the Work, but 328 | excluding communication that is conspicuously marked or otherwise 329 | designated in writing by the copyright owner as "Not a Contribution." 330 | 331 | "Contributor" shall mean Licensor and any individual or Legal Entity 332 | on behalf of whom a Contribution has been received by Licensor and 333 | subsequently incorporated within the Work. 334 | 335 | 2. Grant of Copyright License. Subject to the terms and conditions of 336 | this License, each Contributor hereby grants to You a perpetual, 337 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 338 | copyright license to reproduce, prepare Derivative Works of, 339 | publicly display, publicly perform, sublicense, and distribute the 340 | Work and such Derivative Works in Source or Object form. 341 | 342 | 3. Grant of Patent License. Subject to the terms and conditions of 343 | this License, each Contributor hereby grants to You a perpetual, 344 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 345 | (except as stated in this section) patent license to make, have made, 346 | use, offer to sell, sell, import, and otherwise transfer the Work, 347 | where such license applies only to those patent claims licensable 348 | by such Contributor that are necessarily infringed by their 349 | Contribution(s) alone or by combination of their Contribution(s) 350 | with the Work to which such Contribution(s) was submitted. If You 351 | institute patent litigation against any entity (including a 352 | cross-claim or counterclaim in a lawsuit) alleging that the Work 353 | or a Contribution incorporated within the Work constitutes direct 354 | or contributory patent infringement, then any patent licenses 355 | granted to You under this License for that Work shall terminate 356 | as of the date such litigation is filed. 357 | 358 | 4. Redistribution. You may reproduce and distribute copies of the 359 | Work or Derivative Works thereof in any medium, with or without 360 | modifications, and in Source or Object form, provided that You 361 | meet the following conditions: 362 | 363 | (a) You must give any other recipients of the Work or 364 | Derivative Works a copy of this License; and 365 | 366 | (b) You must cause any modified files to carry prominent notices 367 | stating that You changed the files; and 368 | 369 | (c) You must retain, in the Source form of any Derivative Works 370 | that You distribute, all copyright, patent, trademark, and 371 | attribution notices from the Source form of the Work, 372 | excluding those notices that do not pertain to any part of 373 | the Derivative Works; and 374 | 375 | (d) If the Work includes a "NOTICE" text file as part of its 376 | distribution, then any Derivative Works that You distribute must 377 | include a readable copy of the attribution notices contained 378 | within such NOTICE file, excluding those notices that do not 379 | pertain to any part of the Derivative Works, in at least one 380 | of the following places: within a NOTICE text file distributed 381 | as part of the Derivative Works; within the Source form or 382 | documentation, if provided along with the Derivative Works; or, 383 | within a display generated by the Derivative Works, if and 384 | wherever such third-party notices normally appear. The contents 385 | of the NOTICE file are for informational purposes only and 386 | do not modify the License. You may add Your own attribution 387 | notices within Derivative Works that You distribute, alongside 388 | or as an addendum to the NOTICE text from the Work, provided 389 | that such additional attribution notices cannot be construed 390 | as modifying the License. 391 | 392 | You may add Your own copyright statement to Your modifications and 393 | may provide additional or different license terms and conditions 394 | for use, reproduction, or distribution of Your modifications, or 395 | for any such Derivative Works as a whole, provided Your use, 396 | reproduction, and distribution of the Work otherwise complies with 397 | the conditions stated in this License. 398 | 399 | 5. Submission of Contributions. Unless You explicitly state otherwise, 400 | any Contribution intentionally submitted for inclusion in the Work 401 | by You to the Licensor shall be under the terms and conditions of 402 | this License, without any additional terms or conditions. 403 | Notwithstanding the above, nothing herein shall supersede or modify 404 | the terms of any separate license agreement you may have executed 405 | with Licensor regarding such Contributions. 406 | 407 | 6. Trademarks. This License does not grant permission to use the trade 408 | names, trademarks, service marks, or product names of the Licensor, 409 | except as required for reasonable and customary use in describing the 410 | origin of the Work and reproducing the content of the NOTICE file. 411 | 412 | 7. Disclaimer of Warranty. Unless required by applicable law or 413 | agreed to in writing, Licensor provides the Work (and each 414 | Contributor provides its Contributions) on an "AS IS" BASIS, 415 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 416 | implied, including, without limitation, any warranties or conditions 417 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 418 | PARTICULAR PURPOSE. You are solely responsible for determining the 419 | appropriateness of using or redistributing the Work and assume any 420 | risks associated with Your exercise of permissions under this License. 421 | 422 | 8. Limitation of Liability. In no event and under no legal theory, 423 | whether in tort (including negligence), contract, or otherwise, 424 | unless required by applicable law (such as deliberate and grossly 425 | negligent acts) or agreed to in writing, shall any Contributor be 426 | liable to You for damages, including any direct, indirect, special, 427 | incidental, or consequential damages of any character arising as a 428 | result of this License or out of the use or inability to use the 429 | Work (including but not limited to damages for loss of goodwill, 430 | work stoppage, computer failure or malfunction, or any and all 431 | other commercial damages or losses), even if such Contributor 432 | has been advised of the possibility of such damages. 433 | 434 | 9. Accepting Warranty or Additional Liability. While redistributing 435 | the Work or Derivative Works thereof, You may choose to offer, 436 | and charge a fee for, acceptance of support, warranty, indemnity, 437 | or other liability obligations and/or rights consistent with this 438 | License. However, in accepting such obligations, You may act only 439 | on Your own behalf and on Your sole responsibility, not on behalf 440 | of any other Contributor, and only if You agree to indemnify, 441 | defend, and hold each Contributor harmless for any liability 442 | incurred by, or claims asserted against, such Contributor by reason 443 | of your accepting any such warranty or additional liability. 444 | 445 | END OF TERMS AND CONDITIONS 446 | 447 | APPENDIX: How to apply the Apache License to your work. 448 | 449 | To apply the Apache License to your work, attach the following 450 | boilerplate notice, with the fields enclosed by brackets "{}" 451 | replaced with your own identifying information. (Don't include 452 | the brackets!) The text should be enclosed in the appropriate 453 | comment syntax for the file format. We also recommend that a 454 | file or class name and description of purpose be included on the 455 | same "printed page" as the copyright notice for easier 456 | identification within third-party archives. 457 | 458 | Copyright 2018 Gregor Martynus and other contributors. 459 | 460 | Licensed under the Apache License, Version 2.0 (the "License"); 461 | you may not use this file except in compliance with the License. 462 | You may obtain a copy of the License at 463 | 464 | http://www.apache.org/licenses/LICENSE-2.0 465 | 466 | Unless required by applicable law or agreed to in writing, software 467 | distributed under the License is distributed on an "AS IS" BASIS, 468 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 469 | See the License for the specific language governing permissions and 470 | limitations under the License. 471 | 472 | 473 | deprecation 474 | ISC 475 | The ISC License 476 | 477 | Copyright (c) Gregor Martynus and contributors 478 | 479 | Permission to use, copy, modify, and/or distribute this software for any 480 | purpose with or without fee is hereby granted, provided that the above 481 | copyright notice and this permission notice appear in all copies. 482 | 483 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 484 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 485 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 486 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 487 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 488 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 489 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 490 | 491 | 492 | once 493 | ISC 494 | The ISC License 495 | 496 | Copyright (c) Isaac Z. Schlueter and Contributors 497 | 498 | Permission to use, copy, modify, and/or distribute this software for any 499 | purpose with or without fee is hereby granted, provided that the above 500 | copyright notice and this permission notice appear in all copies. 501 | 502 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 503 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 504 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 505 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 506 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 507 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 508 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 509 | 510 | 511 | tunnel 512 | MIT 513 | The MIT License (MIT) 514 | 515 | Copyright (c) 2012 Koichi Kobayashi 516 | 517 | Permission is hereby granted, free of charge, to any person obtaining a copy 518 | of this software and associated documentation files (the "Software"), to deal 519 | in the Software without restriction, including without limitation the rights 520 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 521 | copies of the Software, and to permit persons to whom the Software is 522 | furnished to do so, subject to the following conditions: 523 | 524 | The above copyright notice and this permission notice shall be included in 525 | all copies or substantial portions of the Software. 526 | 527 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 528 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 529 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 530 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 531 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 532 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 533 | THE SOFTWARE. 534 | 535 | 536 | undici 537 | MIT 538 | MIT License 539 | 540 | Copyright (c) Matteo Collina and Undici contributors 541 | 542 | Permission is hereby granted, free of charge, to any person obtaining a copy 543 | of this software and associated documentation files (the "Software"), to deal 544 | in the Software without restriction, including without limitation the rights 545 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 546 | copies of the Software, and to permit persons to whom the Software is 547 | furnished to do so, subject to the following conditions: 548 | 549 | The above copyright notice and this permission notice shall be included in all 550 | copies or substantial portions of the Software. 551 | 552 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 553 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 554 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 555 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 556 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 557 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 558 | SOFTWARE. 559 | 560 | 561 | universal-user-agent 562 | ISC 563 | # [ISC License](https://spdx.org/licenses/ISC) 564 | 565 | Copyright (c) 2018, Gregor Martynus (https://github.com/gr2m) 566 | 567 | 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. 568 | 569 | 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. 570 | 571 | 572 | wrappy 573 | ISC 574 | The ISC License 575 | 576 | Copyright (c) Isaac Z. Schlueter and Contributors 577 | 578 | Permission to use, copy, modify, and/or distribute this software for any 579 | purpose with or without fee is hereby granted, provided that the above 580 | copyright notice and this permission notice appear in all copies. 581 | 582 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 583 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 584 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 585 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 586 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 587 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 588 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 589 | --------------------------------------------------------------------------------