├── .prettierignore ├── .gitattributes ├── .eslintignore ├── .husky └── pre-commit ├── tsconfig.eslint.json ├── .prettierrc.js ├── jest.config.js ├── .github ├── dependabot.yml └── workflows │ ├── build.yml │ ├── check-dist.yml │ ├── main.yml │ └── codeql-analysis.yml ├── src ├── github │ ├── pulls.ts │ ├── issues.ts │ ├── __tests__ │ │ └── utils.test.ts │ └── utils.ts ├── openai │ ├── tests │ │ ├── utils.test.ts │ │ └── prompts.test.ts │ ├── openai.ts │ ├── utils.ts │ └── prompts.ts └── main.ts ├── tsconfig.json ├── action.yml ├── LICENSE ├── package.json ├── .gitignore ├── .eslintrc.json ├── README.md ├── events ├── issue_comment.pull_request.json └── issue_comment.issue.json └── dist ├── sourcemap-register.js └── licenses.txt /.prettierignore: -------------------------------------------------------------------------------- 1 | dist/ 2 | lib/ 3 | node_modules/ -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | dist/** -diff linguist-generated=true -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | dist/ 2 | lib/ 3 | node_modules/ 4 | jest.config.js 5 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | . "$(dirname -- "$0")/_/husky.sh" 3 | 4 | npm run package 5 | git add dist 6 | -------------------------------------------------------------------------------- /tsconfig.eslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "include": [ 4 | "src/**/*.ts", 5 | ], 6 | "exclude": [ 7 | "node_modules/**/*", 8 | ] 9 | } -------------------------------------------------------------------------------- /.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | bracketSpacing: true, 3 | bracketSameLine: false, 4 | printWidth: 120, 5 | singleQuote: true, 6 | trailingComma: 'all', 7 | semi: true, 8 | }; 9 | -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | clearMocks: true, 3 | moduleFileExtensions: ['js', 'ts'], 4 | testMatch: ['**/*.test.ts'], 5 | transform: { 6 | '^.+\\.ts$': 'ts-jest' 7 | }, 8 | verbose: true 9 | } -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: 'Build' 2 | on: # rebuild any PRs and main branch changes 3 | pull_request: 4 | push: 5 | branches: 6 | - main 7 | - 'releases/*' 8 | 9 | jobs: 10 | build: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: actions/checkout@v3 14 | - run: | 15 | npm install 16 | - run: | 17 | npm run all -------------------------------------------------------------------------------- /src/github/pulls.ts: -------------------------------------------------------------------------------- 1 | import * as github from '@actions/github'; 2 | 3 | /** 4 | * Returns the diff of a pull request. 5 | * @param github_token 6 | * @param issue_number 7 | * @returns 8 | */ 9 | export const getPullRequestDiff = async (github_token: string, issue_number: number): Promise => { 10 | const { owner, repo } = github.context.repo; 11 | const octokit = github.getOctokit(github_token); 12 | 13 | const { data: diff } = await octokit.rest.pulls.get({ 14 | owner, 15 | repo, 16 | pull_number: issue_number, 17 | mediaType: { 18 | format: 'diff', 19 | }, 20 | }); 21 | 22 | // Shouldn't happen, just to satisfy TypeScript 23 | if (typeof diff !== 'string') throw new Error('Diff is not a string'); 24 | 25 | return diff; 26 | }; 27 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es6", /* 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 | "skipLibCheck": true 11 | }, 12 | "exclude": [ 13 | "node_modules/**/*", 14 | "**/*.test.ts" 15 | ] 16 | } -------------------------------------------------------------------------------- /action.yml: -------------------------------------------------------------------------------- 1 | name: 'AdaGPT in Action' 2 | description: '@AdaGPT: AI support for Issues and Pull Requests right at your fingertips' 3 | author: '@zirkelc' 4 | 5 | branding: 6 | icon: 'feather' 7 | color: 'purple' 8 | 9 | inputs: 10 | github_token: 11 | description: 'GitHub Token' 12 | required: true 13 | openai_key: 14 | # https://platform.openai.com/account/api-keys 15 | description: 'OpenAI API Key' 16 | required: true 17 | openai_temperature: 18 | # https://platform.openai.com/docs/api-reference/chat/create#completions/create-temperature 19 | description: 'OpenAI Temperature' 20 | required: false 21 | openai_top_p: 22 | # https://platform.openai.com/docs/api-reference/chat/create#completions/create-top_p 23 | description: 'OpenAI Top P' 24 | required: false 25 | openai_max_tokens: 26 | # https://platform.openai.com/docs/api-reference/chat/create#completions/create-max_tokens 27 | description: 'OpenAI Max Tokens' 28 | required: false 29 | 30 | runs: 31 | using: 'node16' 32 | main: 'dist/index.js' 33 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Chris 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /.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 | 8 | on: 9 | push: 10 | branches: 11 | - main 12 | - next 13 | paths-ignore: 14 | - '**.md' 15 | pull_request: 16 | paths-ignore: 17 | - '**.md' 18 | workflow_dispatch: 19 | 20 | jobs: 21 | check-dist: 22 | runs-on: ubuntu-latest 23 | 24 | steps: 25 | - uses: actions/checkout@v3 26 | 27 | - name: Set Node.js 16.x 28 | uses: actions/setup-node@v3.6.0 29 | with: 30 | node-version: 16.x 31 | 32 | - name: Install dependencies 33 | run: npm ci 34 | 35 | - name: Rebuild the dist/ directory 36 | run: | 37 | npm run build 38 | npm run package 39 | 40 | - name: Compare the expected and actual dist/ directories 41 | run: | 42 | if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then 43 | echo "Detected uncommitted changes after build. See status below:" 44 | git diff 45 | exit 1 46 | fi 47 | id: diff 48 | 49 | # If index.js was different than expected, upload the expected version as an artifact 50 | - uses: actions/upload-artifact@v3 51 | if: ${{ failure() && steps.diff.conclusion == 'failure' }} 52 | with: 53 | name: dist 54 | path: dist/ 55 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "adagpt", 3 | "version": "0.0.0", 4 | "private": true, 5 | "description": "AdaGPT", 6 | "main": "lib/main.js", 7 | "scripts": { 8 | "build": "tsc", 9 | "format": "prettier --write '**/*.ts'", 10 | "format-check": "prettier --check '**/*.ts'", 11 | "lint": "eslint src/**/*.ts", 12 | "prepackage": "npm run build", 13 | "package": "ncc build --source-map --license licenses.txt", 14 | "test": "jest", 15 | "all": "npm run build && npm run format && npm run lint && npm run package && npm test", 16 | "preissue_comment": "npm run build && npm run package", 17 | "issue_comment": "act issue_comment -e event.json --secret-file .env", 18 | "prepare": "husky install" 19 | }, 20 | "repository": { 21 | "type": "git", 22 | "url": "git+https://github.com/actions/typescript-action.git" 23 | }, 24 | "keywords": [ 25 | "actions", 26 | "node", 27 | "setup" 28 | ], 29 | "author": "zirkelc", 30 | "license": "MIT", 31 | "dependencies": { 32 | "@actions/core": "^1.10.0", 33 | "@actions/github": "^5.1.1", 34 | "@octokit/rest": "^19.0.7", 35 | "axios": "^1.4.0", 36 | "openai": "^3.2.1" 37 | }, 38 | "devDependencies": { 39 | "@octokit/webhooks-types": "^6.11.0", 40 | "@types/jest": "^29.5.1", 41 | "@types/node": "^18.15.13", 42 | "@typescript-eslint/parser": "^5.59.0", 43 | "@vercel/ncc": "^0.36.1", 44 | "eslint": "^8.38.0", 45 | "eslint-plugin-github": "^4.7.0", 46 | "eslint-plugin-jest": "^27.2.1", 47 | "husky": "^8.0.3", 48 | "jest": "^29.5.0", 49 | "js-yaml": "^4.1.0", 50 | "prettier": "^2.8.7", 51 | "ts-jest": "^29.1.0", 52 | "typescript": "^5.0.4" 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/openai/tests/utils.test.ts: -------------------------------------------------------------------------------- 1 | import { isCommentByAssistant, escapeComment, unescapeComment, escapeUser } from '../utils'; 2 | 3 | describe('isCommentByAssistant', () => { 4 | test('should return true when comment starts with ASSISTANT_COMMENT_PREFIX', () => { 5 | const comment = ' Hello world! '; 6 | expect(isCommentByAssistant(comment)).toBe(true); 7 | }); 8 | 9 | test('should return false when comment does not start with ASSISTANT_COMMENT_PREFIX', () => { 10 | const comment = 'Hello world!'; 11 | expect(isCommentByAssistant(comment)).toBe(false); 12 | }); 13 | }); 14 | 15 | describe('escapeComment', () => { 16 | test('should return the comment with prefix, suffix, and link appended', () => { 17 | const comment = 'Hello world!'; 18 | const expected = `\n${comment}\n\ngenerated by [AdaGPT](https://github.com/zirkelc/AdaGPT)`; 19 | expect(escapeComment(comment)).toBe(expected); 20 | }); 21 | }); 22 | 23 | describe('unescapeComment', () => { 24 | test('should return the comment without prefix and suffix', () => { 25 | const comment = ' Hello world! '; 26 | expect(unescapeComment(comment)).toBe('Hello world!'); 27 | }); 28 | 29 | test('should return the comment as is if it does not contain prefix and suffix', () => { 30 | const comment = 'Hello world!'; 31 | expect(unescapeComment(comment)).toBe(comment); 32 | }); 33 | }); 34 | 35 | describe('escapeUser', () => { 36 | test('should remove [bot] from the end of the user name', () => { 37 | const user = 'test-bot'; 38 | expect(escapeUser(`${user}[bot]`)).toBe(user); 39 | }); 40 | 41 | test('should remove all special characters from the user name', () => { 42 | const user = '_te%$#@!^&*()=+[]{}|;:\'",.<>/?st-'; 43 | expect(escapeUser(user)).toBe('_test-'); 44 | }); 45 | }); 46 | -------------------------------------------------------------------------------- /.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/**/* -------------------------------------------------------------------------------- /src/openai/openai.ts: -------------------------------------------------------------------------------- 1 | import * as core from '@actions/core'; 2 | import { isAxiosError } from 'axios'; 3 | import { Configuration, CreateChatCompletionRequest, OpenAIApi } from 'openai'; 4 | import { escapeComment } from './utils'; 5 | import { debug } from '../github/utils'; 6 | 7 | /** 8 | * Creates a chat completion using the OpenAI API. 9 | * @param openai_key 10 | * @param messages 11 | * @returns 12 | */ 13 | export async function generateCompletion( 14 | openai_key: string, 15 | request: Omit, 16 | ): Promise { 17 | const openAi = new OpenAIApi( 18 | new Configuration({ 19 | apiKey: openai_key, 20 | }), 21 | ); 22 | 23 | try { 24 | const completion = await openAi.createChatCompletion({ 25 | model: 'gpt-3.5-turbo', 26 | temperature: 0.8, 27 | ...request, 28 | n: 1, 29 | stream: false, 30 | }); 31 | 32 | debug('Completion', { completion: completion.data }); 33 | 34 | if (!completion.data.choices[0].message?.content || completion.data.choices[0].finish_reason !== 'stop') { 35 | // https://platform.openai.com/docs/guides/chat/response-format 36 | throw new Error(`API return incomplete: ${completion.data.choices[0].finish_reason}`); 37 | } 38 | 39 | const content = completion.data.choices[0].message?.content; 40 | 41 | // Escape the content to identify the assistant's comments. 42 | return escapeComment(content); 43 | } catch (error) { 44 | if (isAxiosError(error)) { 45 | const response = error.response; 46 | core.error(`Request to OpenAI failed with status ${response?.status}: ${response?.data?.error?.message}`); 47 | 48 | if (response?.status) { 49 | core.error('API Error Codes: https://help.openai.com/en/collections/3808446-api-error-codes-explained'); 50 | } 51 | } else { 52 | const message = error instanceof Error ? error.message : error; 53 | core.error(`Request to OpenAI failed: ${message}`); 54 | } 55 | 56 | throw error; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/openai/utils.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * The comment prefix and suffix are not rendered by GitHub. 3 | * They are used to identify comments that were generated by the assistant. 4 | * @see https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#hiding-content-with-comments 5 | */ 6 | const ASSISTANT_COMMENT_PREFIX = ''; 7 | const ASSISTANT_COMMENT_SUFFIX = ''; 8 | 9 | /** 10 | * The comment link is rendered as a subscript by GitHub. 11 | */ 12 | const ASSISTANT_ACTION_URL = 'https://github.com/zirkelc/AdaGPT'; 13 | const ASSISTANT_COMMENT_LINK = `generated by [AdaGPT](${ASSISTANT_ACTION_URL})`; 14 | 15 | /** 16 | * Returns true if the comment was generated by the assistant. 17 | * Only the prefix is checked. 18 | * 19 | * @param comment 20 | * @returns 21 | */ 22 | export const isCommentByAssistant = (comment: string): boolean => comment.startsWith(ASSISTANT_COMMENT_PREFIX); 23 | 24 | /** 25 | * Adds the comment prefix and suffix to the comment and appends the comment link. 26 | * 27 | * @param comment 28 | * @returns 29 | */ 30 | export const escapeComment = (comment: string): string => { 31 | // line breaks are important for the markdown to be rendered correctly. 32 | return [ASSISTANT_COMMENT_PREFIX, comment, ASSISTANT_COMMENT_SUFFIX, ASSISTANT_COMMENT_LINK].join('\n'); 33 | }; 34 | 35 | /** 36 | * Removes the comment prefix and suffix from the comment. 37 | * 38 | * @param comment 39 | * @returns 40 | */ 41 | export const unescapeComment = (comment: string): string => { 42 | const startIndex = comment.indexOf(ASSISTANT_COMMENT_PREFIX); 43 | if (startIndex >= 0) comment = comment.substring(startIndex + ASSISTANT_COMMENT_PREFIX.length); 44 | 45 | const endIndex = comment.lastIndexOf(ASSISTANT_COMMENT_SUFFIX); 46 | if (endIndex >= 0) comment = comment.substring(0, endIndex); 47 | 48 | return comment.trim(); 49 | }; 50 | 51 | /** 52 | * Removes special characters from the user name. 53 | * @param user 54 | */ 55 | export const escapeUser = (user: string): string => { 56 | // Remove [bot] from the end of the login name. 57 | // Remove all characters except a-z, A-Z, 0-9, _ and -. 58 | return user.replace('[bot]', '').replace(/[^a-zA-Z0-9_-]/g, ''); 59 | }; 60 | -------------------------------------------------------------------------------- /src/github/issues.ts: -------------------------------------------------------------------------------- 1 | import * as github from '@actions/github'; 2 | import type { Issue, IssueComment } from '@octokit/webhooks-types'; 3 | 4 | /** 5 | * Returns an issue or pull request for the given issue number. 6 | * @param github_token 7 | * @param issue_number 8 | * @returns 9 | */ 10 | export const getIssue = async (github_token: string, issue_number: number): Promise => { 11 | const { owner, repo } = github.context.repo; 12 | const octokit = github.getOctokit(github_token); 13 | 14 | const { data: issue } = await octokit.rest.issues.get({ 15 | owner, 16 | repo, 17 | issue_number, 18 | }); 19 | 20 | return issue as Issue; 21 | }; 22 | 23 | /** 24 | * Returns all comments on an issue or pull request. 25 | * @param github_token 26 | * @param issue_number 27 | * @returns 28 | */ 29 | export const listComments = async (github_token: string, issue_number: number): Promise => { 30 | const { owner, repo } = github.context.repo; 31 | const octokit = github.getOctokit(github_token); 32 | 33 | // pagination: https://github.com/octokit/octokit.js#pagination 34 | const comments = await octokit.paginate(octokit.rest.issues.listComments, { 35 | owner, 36 | repo, 37 | issue_number, 38 | per_page: 100, 39 | }); 40 | 41 | return comments as IssueComment[]; 42 | }; 43 | 44 | export const listCommentsBefore = async ( 45 | github_token: string, 46 | issue_number: number, 47 | comment_id: number, 48 | ): Promise => { 49 | const comments = await listComments(github_token, issue_number); 50 | 51 | const index = comments.findIndex((c) => c.id === comment_id); 52 | 53 | return comments.slice(0, index); 54 | }; 55 | 56 | /** 57 | * Adds a comment to an issue or pull request to the given issue number. 58 | * @param github_token 59 | * @param issue_number 60 | * @param body 61 | * @returns 62 | */ 63 | export const addComment = async (github_token: string, issue_number: number, body: string): Promise => { 64 | const { owner, repo } = github.context.repo; 65 | const octokit = github.getOctokit(github_token); 66 | 67 | const comment = await octokit.rest.issues.createComment({ 68 | owner, 69 | repo, 70 | issue_number, 71 | body, 72 | }); 73 | 74 | return comment.data as IssueComment; 75 | }; 76 | -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: AdaGPT 2 | 3 | on: 4 | # Trigger the workflow on new issues 5 | issues: 6 | types: [opened] 7 | # Trigger the workflow on new pull requests 8 | pull_request: 9 | types: [opened] 10 | # Trigger the workflow on new issue comments 11 | issue_comment: 12 | types: [created] 13 | 14 | # Allows the workflow to create comments on issues and pull requests 15 | permissions: 16 | issues: write 17 | pull-requests: write 18 | 19 | jobs: 20 | # This job only runs for issues 21 | issue: 22 | name: Issue opened 23 | # Only run the job if the issue contains @AdaGPT 24 | if: ${{ github.event_name == 'issues' && contains(github.event.issue.body, '@AdaGPT') }} 25 | runs-on: ubuntu-latest 26 | steps: 27 | - uses: actions/checkout@v3 28 | - uses: ./ 29 | name: AdaGPT 30 | with: 31 | github_token: ${{ secrets.GITHUB_TOKEN }} 32 | openai_key: ${{ secrets.OPENAI_KEY }} 33 | 34 | # This job only runs for issue comments 35 | issue_comment: 36 | name: Issue comment 37 | # Only run the job if the comment contains @AdaGPT 38 | if: ${{ github.event_name == 'issue_comment' && !github.event.issue.pull_request && contains(github.event.comment.body, '@AdaGPT') }} 39 | runs-on: ubuntu-latest 40 | steps: 41 | - uses: actions/checkout@v3 42 | - uses: ./ 43 | name: AdaGPT 44 | with: 45 | github_token: ${{ secrets.GITHUB_TOKEN }} 46 | openai_key: ${{ secrets.OPENAI_KEY }} 47 | 48 | # This job only runs for pull requests 49 | pull_request: 50 | name: PR opened 51 | # Only run the job if the pull request contains @AdaGPT 52 | if: ${{ github.event_name == 'pull_request' && contains(github.event.pull_request.body, '@AdaGPT') }} 53 | runs-on: ubuntu-latest 54 | steps: 55 | - uses: actions/checkout@v3 56 | - uses: ./ 57 | name: AdaGPT 58 | with: 59 | github_token: ${{ secrets.GITHUB_TOKEN }} 60 | openai_key: ${{ secrets.OPENAI_KEY }} 61 | 62 | # This job only runs for pull request comments 63 | pull_request_comment: 64 | name: PR comment 65 | # Only run the job if the comment contains @AdaGPT 66 | if: ${{ github.event_name == 'issue_comment' && github.event.issue.pull_request && contains(github.event.comment.body, '@AdaGPT') }} 67 | runs-on: ubuntu-latest 68 | steps: 69 | - uses: actions/checkout@v3 70 | - uses: ./ 71 | name: AdaGPT 72 | with: 73 | github_token: ${{ secrets.GITHUB_TOKEN }} 74 | openai_key: ${{ secrets.OPENAI_KEY }} 75 | 76 | -------------------------------------------------------------------------------- /.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: '31 7 * * 3' 22 | 23 | jobs: 24 | analyze: 25 | name: Analyze 26 | runs-on: ubuntu-latest 27 | permissions: 28 | actions: read 29 | contents: read 30 | security-events: write 31 | 32 | strategy: 33 | fail-fast: false 34 | matrix: 35 | language: [ 'TypeScript' ] 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@v3 42 | 43 | # Initializes the CodeQL tools for scanning. 44 | - name: Initialize CodeQL 45 | uses: github/codeql-action/init@v2 46 | with: 47 | languages: ${{ matrix.language }} 48 | source-root: src 49 | # If you wish to specify custom queries, you can do so here or in a config file. 50 | # By default, queries listed here will override any specified in a config file. 51 | # Prefix the list here with "+" to use these queries and those in the config file. 52 | # queries: ./path/to/local/query, your-org/your-repo/queries@main 53 | 54 | # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). 55 | # If this step fails, then you should remove it and run the build manually (see below) 56 | - name: Autobuild 57 | uses: github/codeql-action/autobuild@v2 58 | 59 | # ℹ️ Command-line programs to run using the OS shell. 60 | # 📚 https://git.io/JvXDl 61 | 62 | # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines 63 | # and modify them (or add more) to build your code if your project 64 | # uses a compiled language 65 | 66 | #- run: | 67 | # make bootstrap 68 | # make release 69 | 70 | - name: Perform CodeQL Analysis 71 | uses: github/codeql-action/analyze@v2 72 | -------------------------------------------------------------------------------- /src/openai/prompts.ts: -------------------------------------------------------------------------------- 1 | import type { Issue, IssueComment, PullRequest } from '@octokit/webhooks-types'; 2 | import { ChatCompletionRequestMessage, ChatCompletionRequestMessageRoleEnum } from 'openai'; 3 | import { Repo } from '../github/utils'; 4 | import { escapeUser, isCommentByAssistant, unescapeComment } from './utils'; 5 | 6 | export const initAssistant = (name: string, handle: string): ChatCompletionRequestMessage[] => { 7 | return [ 8 | { 9 | role: ChatCompletionRequestMessageRoleEnum.System, 10 | content: [ 11 | `You are a helpful assistant for GitHub issues and pull requests.`, 12 | `Your name is ${name} and your handle is ${handle}.`, 13 | `You respond to comments when someone mentions you.`, 14 | ].join('\n'), 15 | }, 16 | ]; 17 | }; 18 | 19 | export const initIssue = (repo: Repo, issue: Issue): ChatCompletionRequestMessage[] => { 20 | return [ 21 | { 22 | role: ChatCompletionRequestMessageRoleEnum.System, 23 | content: [ 24 | `The current issue was created by ${escapeUser(issue.user.login)} in repository ${repo.repo}.`, 25 | `Issue number: ${issue.number}`, 26 | `Issue title: \`${issue.title}\``, 27 | `Issue description:`, 28 | '```', 29 | issue.body, 30 | '```', 31 | ].join('\n'), 32 | }, 33 | ]; 34 | }; 35 | 36 | export const initPullRequest = ( 37 | repo: Repo, 38 | issue: Issue | PullRequest, 39 | diff: string, 40 | ): ChatCompletionRequestMessage[] => { 41 | return [ 42 | { 43 | role: ChatCompletionRequestMessageRoleEnum.System, 44 | content: [ 45 | `The current pull request was created by ${escapeUser(issue.user.login)} in repository ${repo.repo}.`, 46 | `Pull request number: ${issue.number}`, 47 | `Pull request title: \`${issue.title}\``, 48 | `Pull request description:`, 49 | '```', 50 | issue.body, 51 | '```', 52 | ].join('\n'), 53 | }, 54 | { 55 | role: ChatCompletionRequestMessageRoleEnum.System, 56 | content: [`Git diff:`, diff].join('\n'), 57 | }, 58 | ]; 59 | }; 60 | 61 | export const initComments = (comments: IssueComment[]): ChatCompletionRequestMessage[] => { 62 | return comments.length === 0 63 | ? [] 64 | : [ 65 | { 66 | role: ChatCompletionRequestMessageRoleEnum.System, 67 | content: `Here are the comments:`, 68 | }, 69 | ...comments.map((comment) => 70 | isCommentByAssistant(comment.body) 71 | ? { 72 | role: ChatCompletionRequestMessageRoleEnum.Assistant, 73 | content: unescapeComment(comment.body), 74 | } 75 | : { 76 | role: ChatCompletionRequestMessageRoleEnum.User, 77 | name: escapeUser(comment.user.login), 78 | content: unescapeComment(comment.body), 79 | }, 80 | ), 81 | ]; 82 | }; 83 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": [ 3 | "jest", 4 | "@typescript-eslint" 5 | ], 6 | "extends": [ 7 | "plugin:github/recommended" 8 | ], 9 | "parser": "@typescript-eslint/parser", 10 | "parserOptions": { 11 | "ecmaVersion": 9, 12 | "sourceType": "module", 13 | "project": "./tsconfig.eslint.json" 14 | }, 15 | "rules": { 16 | "no-console": "off", 17 | "i18n-text/no-en": "off", 18 | "eslint-comments/no-use": "off", 19 | "import/no-namespace": "off", 20 | "no-unused-vars": "off", 21 | "@typescript-eslint/no-unused-vars": "error", 22 | "@typescript-eslint/explicit-member-accessibility": [ 23 | "error", 24 | { 25 | "accessibility": "no-public" 26 | } 27 | ], 28 | "@typescript-eslint/no-require-imports": "error", 29 | "@typescript-eslint/array-type": "error", 30 | "@typescript-eslint/await-thenable": "error", 31 | "@typescript-eslint/ban-ts-comment": "error", 32 | "camelcase": "off", 33 | "@typescript-eslint/consistent-type-assertions": "error", 34 | "@typescript-eslint/explicit-function-return-type": [ 35 | "error", 36 | { 37 | "allowExpressions": true 38 | } 39 | ], 40 | "@typescript-eslint/func-call-spacing": [ 41 | "error", 42 | "never" 43 | ], 44 | "@typescript-eslint/no-array-constructor": "error", 45 | "@typescript-eslint/no-empty-interface": "error", 46 | "@typescript-eslint/no-explicit-any": "error", 47 | "@typescript-eslint/no-extraneous-class": "error", 48 | "@typescript-eslint/no-for-in-array": "error", 49 | "@typescript-eslint/no-inferrable-types": "error", 50 | "@typescript-eslint/no-misused-new": "error", 51 | "@typescript-eslint/no-namespace": "error", 52 | "@typescript-eslint/no-non-null-assertion": "warn", 53 | "@typescript-eslint/no-unnecessary-qualifier": "error", 54 | "@typescript-eslint/no-unnecessary-type-assertion": "error", 55 | "@typescript-eslint/no-useless-constructor": "error", 56 | "@typescript-eslint/no-var-requires": "error", 57 | "@typescript-eslint/prefer-for-of": "warn", 58 | "@typescript-eslint/prefer-function-type": "warn", 59 | "@typescript-eslint/prefer-includes": "error", 60 | "@typescript-eslint/prefer-string-starts-ends-with": "error", 61 | "@typescript-eslint/promise-function-async": "error", 62 | "@typescript-eslint/require-array-sort-compare": "error", 63 | "@typescript-eslint/restrict-plus-operands": "error", 64 | "@typescript-eslint/type-annotation-spacing": "error", 65 | "@typescript-eslint/unbound-method": "error" 66 | }, 67 | "overrides": [ 68 | { 69 | "files": [ 70 | "**/*.test.ts" 71 | ], 72 | "rules": { 73 | "@typescript-eslint/no-explicit-any": "off", 74 | "@typescript-eslint/no-non-null-assertion": "off" 75 | } 76 | } 77 | ], 78 | "env": { 79 | "node": true, 80 | "es6": true, 81 | "jest/globals": true 82 | } 83 | } -------------------------------------------------------------------------------- /src/openai/tests/prompts.test.ts: -------------------------------------------------------------------------------- 1 | import { initAssistant, initIssue, initPullRequest, initComments } from '../prompts'; 2 | 3 | describe('initAssistant', () => { 4 | test('returns a chat completion request message', () => { 5 | expect(initAssistant('John Doe', '@johndoe')).toMatchInlineSnapshot(` 6 | [ 7 | { 8 | "content": "You are a helpful assistant for GitHub issues and pull requests. 9 | Your name is John Doe and your handle is @johndoe. 10 | You respond to comments when someone mentions you.", 11 | "role": "system", 12 | }, 13 | ] 14 | `); 15 | }); 16 | }); 17 | 18 | describe('initIssue', () => { 19 | test('returns a chat completion request message', () => { 20 | const repo = { 21 | owner: 'octocat', 22 | repo: 'Hello-World', 23 | }; 24 | const issue = { 25 | user: { 26 | login: 'johndoe', 27 | }, 28 | number: 42, 29 | title: 'Example Issue', 30 | body: 'This is an example issue.', 31 | } as any; 32 | expect(initIssue(repo, issue)).toMatchInlineSnapshot(` 33 | [ 34 | { 35 | "content": "The current issue was created by johndoe in repository Hello-World. 36 | Issue number: 42 37 | Issue title: \`Example Issue\` 38 | Issue description: 39 | \`\`\` 40 | This is an example issue. 41 | \`\`\`", 42 | "role": "system", 43 | }, 44 | ] 45 | `); 46 | }); 47 | }); 48 | 49 | describe('initPullRequest', () => { 50 | test('returns a chat completion request message', () => { 51 | const repo = { 52 | owner: 'octocat', 53 | repo: 'Hello-World', 54 | }; 55 | const pullRequest = { 56 | user: { 57 | login: 'johndoe', 58 | }, 59 | number: 42, 60 | title: 'Example Pull Request', 61 | body: 'This is an example pull request.', 62 | } as any; 63 | const diff = 64 | 'diff --git a/file1 b/file1\nindex 0000001..0000002 100644\n--- a/file1\n+++ b/file1\n@@ -1,3 +1,4 @@\n+line4\n line1\n line2\n line3'; 65 | expect(initPullRequest(repo, pullRequest, diff)).toMatchInlineSnapshot(` 66 | [ 67 | { 68 | "content": "The current pull request was created by johndoe in repository Hello-World. 69 | Pull request number: 42 70 | Pull request title: \`Example Pull Request\` 71 | Pull request description: 72 | \`\`\` 73 | This is an example pull request. 74 | \`\`\`", 75 | "role": "system", 76 | }, 77 | { 78 | "content": "Git diff: 79 | diff --git a/file1 b/file1 80 | index 0000001..0000002 100644 81 | --- a/file1 82 | +++ b/file1 83 | @@ -1,3 +1,4 @@ 84 | +line4 85 | line1 86 | line2 87 | line3", 88 | "role": "system", 89 | }, 90 | ] 91 | `); 92 | }); 93 | }); 94 | 95 | describe('initComments', () => { 96 | test('returns empty array for empty comments', () => { 97 | expect(initComments([])).toMatchInlineSnapshot(`[]`); 98 | }); 99 | 100 | test('returns chat completion request messages for comments', () => { 101 | const comments = [ 102 | { 103 | body: '@assistant Hello!', 104 | user: { 105 | login: 'johndoe', 106 | }, 107 | }, 108 | { 109 | body: '@assistant Hello!', 110 | user: { 111 | login: 'johndoe', 112 | }, 113 | }, 114 | { 115 | body: 'This is a comment.', 116 | user: { 117 | login: 'janedoe', 118 | }, 119 | }, 120 | { 121 | body: '@assistant This is a reply to you.', 122 | user: { 123 | login: 'janedoe', 124 | }, 125 | }, 126 | ] as any; 127 | expect(initComments(comments)).toMatchInlineSnapshot(` 128 | [ 129 | { 130 | "content": "Here are the comments:", 131 | "role": "system", 132 | }, 133 | { 134 | "content": "@assistant Hello!", 135 | "name": "johndoe", 136 | "role": "user", 137 | }, 138 | { 139 | "content": "@assistant Hello!", 140 | "name": "johndoe", 141 | "role": "user", 142 | }, 143 | { 144 | "content": "This is a comment.", 145 | "name": "janedoe", 146 | "role": "user", 147 | }, 148 | { 149 | "content": "@assistant This is a reply to you.", 150 | "name": "janedoe", 151 | "role": "user", 152 | }, 153 | ] 154 | `); 155 | }); 156 | }); 157 | -------------------------------------------------------------------------------- /src/main.ts: -------------------------------------------------------------------------------- 1 | import * as core from '@actions/core'; 2 | import * as github from '@actions/github'; 3 | import type { IssueCommentCreatedEvent } from '@octokit/webhooks-types'; 4 | import { addComment, listCommentsBefore, getIssue } from './github/issues'; 5 | import { getPullRequestDiff } from './github/pulls'; 6 | import { debug, getEventTrigger, writeSummary } from './github/utils'; 7 | import { generateCompletion } from './openai/openai'; 8 | import { initAssistant, initComments, initIssue, initPullRequest } from './openai/prompts'; 9 | 10 | /** 11 | * The name and handle of the assistant. 12 | */ 13 | const ASSISTANT_NAME = 'AdaGPT'; 14 | const ASSISTANT_HANDLE = '@AdaGPT'; 15 | const ASSISTANT_REGEX = /@adagpt/i; 16 | 17 | type Inputs = { 18 | github_token: string; 19 | openai_key: string; 20 | openai_temperature?: number; 21 | openai_top_p?: number; 22 | openai_max_tokens?: number; 23 | }; 24 | 25 | /** 26 | * Returns the inputs for the action. 27 | * @returns 28 | */ 29 | const getInputs = (): Inputs => ({ 30 | github_token: core.getInput('github_token', { required: true }), 31 | openai_key: core.getInput('openai_key', { required: true }), 32 | openai_temperature: parseFloat(core.getInput('openai_temperature')), 33 | openai_top_p: parseFloat(core.getInput('openai_top_p')), 34 | openai_max_tokens: parseInt(core.getInput('openai_max_tokens')), 35 | }); 36 | 37 | export async function run(): Promise { 38 | try { 39 | debug('Context', { context: github.context }); 40 | 41 | // get the event object that triggered the workflow 42 | // this can be an issue, pull request, or comment 43 | const trigger = getEventTrigger(github.context); 44 | debug('Trigger', { trigger }); 45 | 46 | // check if the event body contains the assistant handle, otherwise skip 47 | if (!trigger?.body || !ASSISTANT_REGEX.test(trigger.body)) { 48 | debug(`Event doesn't contain ${ASSISTANT_HANDLE}. Skipping...`); 49 | return; 50 | } 51 | 52 | // get the inputs for the action 53 | const inputs = getInputs(); 54 | debug('Inputs', { inputs }); 55 | 56 | // read the issue or pull request from the GitHub API 57 | const issue = await getIssue(inputs.github_token, github.context.issue.number); 58 | debug('Issue', { issue }); 59 | 60 | // get the repository information 61 | const repo = github.context.repo; 62 | 63 | // initialize the prompt with the assistant name and handle 64 | const prompt = [...initAssistant(ASSISTANT_NAME, ASSISTANT_HANDLE)]; 65 | 66 | // the prompt for issues and pull requests is only slightly different 67 | // but the diff might be very long and we may have to exlude it in the future 68 | if (issue.pull_request) { 69 | // get the diff for the pull request 70 | const diff = await getPullRequestDiff(inputs.github_token, github.context.issue.number); 71 | debug('Diff', { diff }); 72 | 73 | // add pull request and diff to the prompt 74 | prompt.push(...initPullRequest(repo, issue, diff)); 75 | } else { 76 | // add issue to the prompt 77 | prompt.push(...initIssue(repo, issue)); 78 | } 79 | 80 | // prompt for comments is the same for issues and pull requests 81 | if (github.context.eventName === 'issue_comment') { 82 | // get the comment that triggered the workflow and all comments before it 83 | const { comment } = github.context.payload as IssueCommentCreatedEvent; 84 | 85 | // get the comments before the current one that triggered the workflow 86 | // the workflow execution may be delayed, so we need to make sure we don't get comments after the current one 87 | const comments = await listCommentsBefore(inputs.github_token, github.context.issue.number, comment.id); 88 | 89 | // add the current comment to the end of the comments 90 | prompt.push(...initComments([...comments, comment])); 91 | } 92 | 93 | debug('Prompt', { prompt }); 94 | 95 | // TODO handle max tokens limit 96 | // generate the completion from the prompt 97 | const completion = await generateCompletion(inputs.openai_key, { 98 | messages: prompt, 99 | temperature: inputs.openai_temperature, 100 | top_p: inputs.openai_top_p, 101 | max_tokens: inputs.openai_max_tokens, 102 | }); 103 | 104 | // add the response as a comment to the issue or pull request 105 | const response = await addComment(inputs.github_token, github.context.issue.number, completion); 106 | debug('Response', { response }); 107 | 108 | // write a summary of the trigger and response to the job log 109 | writeSummary(issue, trigger, response); 110 | } catch (error) { 111 | if (error instanceof Error) core.setFailed(error); 112 | } 113 | } 114 | 115 | run(); 116 | -------------------------------------------------------------------------------- /src/github/__tests__/utils.test.ts: -------------------------------------------------------------------------------- 1 | import { Context } from '@actions/github/lib/context'; 2 | import { 3 | getEventTrigger, 4 | getIssueNumber, 5 | isIssueCommentEvent, 6 | isIssueEvent, 7 | isPullRequestCommentEvent, 8 | isPullRequestEvent, 9 | } from '../utils'; 10 | 11 | describe('utils', () => { 12 | describe('isIssueEvent', () => { 13 | it('should return true if the event is an issue event', () => { 14 | const context: Context = { eventName: 'issues', payload: {} } as any; 15 | expect(isIssueEvent(context)).toBe(true); 16 | }); 17 | 18 | it('should return false if the event is not an issue event', () => { 19 | const context: Context = { eventName: 'pull_request', payload: {} } as any; 20 | expect(isIssueEvent(context)).toBe(false); 21 | }); 22 | }); 23 | 24 | describe('isPullRequestEvent', () => { 25 | it('should return true if the event is a pull request event', () => { 26 | const context: Context = { eventName: 'pull_request', payload: {} } as any; 27 | expect(isPullRequestEvent(context)).toBe(true); 28 | }); 29 | 30 | it('should return false if the event is not a pull request event', () => { 31 | const context: Context = { eventName: 'issues', payload: {} } as any; 32 | expect(isPullRequestEvent(context)).toBe(false); 33 | }); 34 | }); 35 | 36 | describe('isIssueCommentEvent', () => { 37 | it('should return true if the event is an issue comment event', () => { 38 | const context: Context = { eventName: 'issue_comment', payload: { issue: {} } } as any; 39 | expect(isIssueCommentEvent(context)).toBe(true); 40 | }); 41 | 42 | it('should return false if the event is not an issue comment event', () => { 43 | const context: Context = { eventName: 'issue_comment', payload: { issue: { pull_request: {} } } } as any; 44 | expect(isIssueCommentEvent(context)).toBe(false); 45 | }); 46 | }); 47 | 48 | describe('isPullRequestCommentEvent', () => { 49 | it('should return true if the event is a pull request comment event', () => { 50 | const context: Context = { eventName: 'issue_comment', payload: { issue: { pull_request: {} } } } as any; 51 | expect(isPullRequestCommentEvent(context)).toBe(true); 52 | }); 53 | 54 | it('should return false if the event is not a pull request comment event', () => { 55 | const context: Context = { eventName: 'issue_comment', payload: { issue: {} } } as any; 56 | expect(isPullRequestCommentEvent(context)).toBe(false); 57 | }); 58 | }); 59 | 60 | describe('getEventTrigger', () => { 61 | it('should return the issue object if the event is an issue event', () => { 62 | const context: Context = { eventName: 'issues', payload: { issue: {} } } as any; 63 | expect(getEventTrigger(context)).toEqual({}); 64 | }); 65 | 66 | it('should return the pull request object if the event is a pull request event', () => { 67 | const context: Context = { eventName: 'pull_request', payload: { pull_request: {} } } as any; 68 | expect(getEventTrigger(context)).toEqual({}); 69 | }); 70 | 71 | it('should return the comment object if the event is an issue comment event', () => { 72 | const context: Context = { eventName: 'issue_comment', payload: { comment: {} } } as any; 73 | expect(getEventTrigger(context)).toEqual({}); 74 | }); 75 | 76 | it('should return undefined if the event is not an issue, pull request, or comment event', () => { 77 | const context: Context = { eventName: 'unknown', payload: {} } as any; 78 | expect(getEventTrigger(context)).toBeUndefined(); 79 | }); 80 | }); 81 | 82 | describe('getIssueNumber', () => { 83 | it('should return the issue number if the event is an issue event', () => { 84 | const context: Context = { eventName: 'issues', payload: { issue: { number: 42 } } } as any; 85 | expect(getIssueNumber(context)).toEqual(42); 86 | }); 87 | 88 | it('should return the pull request number if the event is a pull request event', () => { 89 | const context: Context = { eventName: 'pull_request', payload: { pull_request: { number: 42 } } } as any; 90 | expect(getIssueNumber(context)).toEqual(42); 91 | }); 92 | 93 | it('should return the issue number if the event is an issue comment event', () => { 94 | const context: Context = { eventName: 'issue_comment', payload: { issue: { number: 42 } } } as any; 95 | expect(getIssueNumber(context)).toEqual(42); 96 | }); 97 | 98 | it('should return the issue number if the event is a pull request comment event', () => { 99 | const context: Context = { 100 | eventName: 'issue_comment', 101 | payload: { issue: { number: 42, pull_request: {} } }, 102 | } as any; 103 | expect(getIssueNumber(context)).toEqual(42); 104 | }); 105 | 106 | it('should throw an error if the event is not an issue, pull request, or comment event', () => { 107 | const context: Context = { eventName: 'unknown', payload: {} } as any; 108 | expect(() => getIssueNumber(context)).toThrowError(); 109 | }); 110 | }); 111 | }); 112 | -------------------------------------------------------------------------------- /src/github/utils.ts: -------------------------------------------------------------------------------- 1 | import * as core from '@actions/core'; 2 | import * as github from '@actions/github'; 3 | import { Context } from '@actions/github/lib/context'; 4 | import type { 5 | Issue, 6 | IssueComment, 7 | IssueCommentCreatedEvent, 8 | IssuesOpenedEvent, 9 | PullRequest, 10 | PullRequestOpenedEvent, 11 | } from '@octokit/webhooks-types'; 12 | 13 | export type Repo = Context['repo']; 14 | 15 | /** 16 | * Returns true if the event originated from an issue event. 17 | * @see https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#issues 18 | * @param context 19 | * @returns 20 | */ 21 | export const isIssueEvent = (context: Context): boolean => { 22 | return context.eventName === 'issues'; 23 | }; 24 | 25 | /** 26 | * Returns true if the event originated from a pull request event. 27 | * @see https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request 28 | * @param context 29 | * @returns 30 | */ 31 | export const isPullRequestEvent = (context: Context): boolean => { 32 | return context.eventName === 'pull_request'; 33 | }; 34 | 35 | /** 36 | * Returns true if the event originated from an issue comment. 37 | * @see https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#issue_comment 38 | * @see https://docs.github.com/en/developers/webhooks-and-events/webhook-events-and-payloads#issue_comment 39 | * @param context 40 | * @returns 41 | */ 42 | export const isIssueCommentEvent = (context: Context): boolean => { 43 | return context.eventName === 'issue_comment' && context.payload.issue?.pull_request === undefined; 44 | }; 45 | 46 | /** 47 | * Returns true if the event originated from a pull request comment. 48 | * @see https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#issue_comment 49 | * @see https://docs.github.com/en/developers/webhooks-and-events/webhook-events-and-payloads#issue_comment 50 | * @param context 51 | * @returns 52 | */ 53 | export const isPullRequestCommentEvent = (context: Context): boolean => { 54 | return context.eventName === 'issue_comment' && context.payload.issue?.pull_request !== undefined; 55 | }; 56 | 57 | /** 58 | * Returns the object that triggered the event. 59 | * If it's an issue event, returns the issue. 60 | * If it's a pull request event, returns the pull request. 61 | * If it's a comment event, returns the comment. 62 | * If it's none of the above, returns undefined. 63 | * @param context 64 | * @returns 65 | */ 66 | export const getEventTrigger = (context: Context): Issue | PullRequest | IssueComment | undefined => { 67 | if (isIssueEvent(context)) { 68 | const payload = context.payload as IssuesOpenedEvent; 69 | return payload.issue; 70 | } 71 | 72 | if (isPullRequestEvent(context)) { 73 | const payload = context.payload as PullRequestOpenedEvent; 74 | return payload.pull_request; 75 | } 76 | 77 | if (isIssueCommentEvent(context) || isPullRequestCommentEvent(context)) { 78 | const payload = context.payload as IssueCommentCreatedEvent; 79 | return payload.comment; 80 | } 81 | 82 | return undefined; 83 | }; 84 | 85 | /** 86 | * Returns the issue number from the event payload. 87 | * Throws an error if the event is not an issue, pull request, or comment. 88 | * @param context 89 | * @returns 90 | */ 91 | export const getIssueNumber = (context: Context): number => { 92 | if (isIssueEvent(context)) { 93 | const payload = context.payload as IssuesOpenedEvent; 94 | return payload.issue.number; 95 | } 96 | 97 | if (isPullRequestEvent(context)) { 98 | const payload = context.payload as PullRequestOpenedEvent; 99 | return payload.pull_request.number; 100 | } 101 | 102 | if (isIssueCommentEvent(context) || isPullRequestCommentEvent(context)) { 103 | const payload = context.payload as IssueCommentCreatedEvent; 104 | return payload.issue.number; 105 | } 106 | 107 | throw new Error(`Could not determine issue number from event "${context.eventName}"`); 108 | }; 109 | 110 | /** 111 | * Writes a summary of the request and response to the job log. 112 | * @see https://github.blog/2022-05-09-supercharging-github-actions-with-job-summaries/ 113 | */ 114 | export const writeSummary = async ( 115 | issue: Issue | PullRequest, 116 | request: Issue | PullRequest | IssueComment, 117 | response: IssueComment, 118 | ): Promise => { 119 | await core.summary 120 | .addLink('Issue', issue.html_url) 121 | .addHeading('Request', 3) 122 | .addRaw(request.body ?? '', true) 123 | .addBreak() 124 | .addLink('Comment', request.html_url) 125 | .addHeading('Response', 3) 126 | .addRaw(response.body ?? '', true) 127 | .addBreak() 128 | .addLink('Comment', response.html_url) 129 | .addBreak() 130 | .addHeading('GitHub Context', 3) 131 | .addCodeBlock(JSON.stringify(github.context.payload, null, 2), 'json') 132 | .write(); 133 | }; 134 | 135 | /** 136 | * Print a debug message with optional an object. 137 | * @param message 138 | * @param obj 139 | */ 140 | export const debug = (message: string, obj?: Record): void => { 141 | core.debug(message); 142 | if (obj !== undefined) core.debug(JSON.stringify(obj, null, 2)); 143 | }; 144 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # AdaGPT GitHub Action 2 | AdaGPT is an AI-powered GitHub Action that generates helpful responses to comments on issues and pull requests. It's like having a conversation with ChatGPT, but without actually leaving GitHub and available to everyone. 3 | 4 | Simply mention [@AdaGPT](https://github.com/AdaGPT) in your comments on issues and pull requests. AdaGPT will be activated and respond to your comment with a helpful response. 5 | 6 | ## Who's Ada? 7 | Ada is named after [Ada Lovelace](https://en.wikipedia.org/wiki/Ada_Lovelace), a pioneer of computer programming and the first person to write an algorithm intended to be processed by a machine. Ada is considered the first computer programmer and a symbol of women's contributions to science and technology. 8 | 9 | ## Getting Started 10 | To use AdaGPT, you'll need to create an OpenAI API key and add AdaGPT to your workflow. Here are the steps to get started: 11 | 12 | 1. Create an [OpenAI API key](https://platform.openai.com/account/api-keys) if you don't already have one. Keep in mind that you'll occur charges for using the API. 13 | 2. Save your OpenAI API key as a [Secret](https://docs.github.com/en/actions/security-guides/encrypted-secrets#creating-encrypted-secrets-for-a-repository) in your repository. 14 | 3. Create a new workflow in folder `.github/workflows` that will be triggered on [issues](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#issues), [pull requests](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request) and [comments](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#issue_comment). 15 | 16 | ### Workflow 17 | ```yaml 18 | # File: .github/workflows/adagpt.yml 19 | name: 'AdaGPT' 20 | 21 | # Run the workflow on new issues, pull requests and comments 22 | on: 23 | issues: 24 | types: [opened] 25 | pull_request: 26 | types: [opened] 27 | issue_comment: 28 | types: [created] 29 | 30 | # Allows the workflow to create comments on issues and pull requests 31 | permissions: 32 | issues: write 33 | pull-requests: write 34 | 35 | jobs: 36 | # Runs for issues, pull requests and comments 37 | adagpt: 38 | name: AdaGPT comment 39 | runs-on: ubuntu-latest 40 | steps: 41 | - uses: actions/checkout@v3 42 | # The action will only run if the description or comments mentions @AdaGPT 43 | - uses: zirkelc/adagpt@v1 44 | name: AdaGPT 45 | with: 46 | github_token: ${{ secrets.GITHUB_TOKEN }} 47 | openai_key: ${{ secrets.OPENAI_KEY }} 48 | ``` 49 | 50 | The action will only run if the issue, pull requests or comments mentions `@AdaGPT`. Otherwise, the action will return immediately without doing anything. If you want to skip the whole workflow run, you can use the [`if` conditional](https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#jobsjob_idif) to check if the issue, pull request or comment mentions `@AdaGPT`. 51 | 52 | ```yml 53 | jobs: 54 | # Runs only for issues 55 | issue: 56 | name: Issue opened 57 | # Check if the issue contains @AdaGPT, otherwise skip the workflow run 58 | if: ${{ github.event_name == 'issues' && contains(github.event.issue.body, '@AdaGPT') }} 59 | runs-on: ubuntu-latest 60 | steps: 61 | - uses: actions/checkout@v3 62 | - uses: zirkelc/adagpt@v1 63 | name: AdaGPT 64 | with: 65 | github_token: ${{ secrets.GITHUB_TOKEN }} 66 | openai_key: ${{ secrets.OPENAI_KEY }} 67 | ``` 68 | 69 | Check out [`main.yml`](./.github/workflows/main.yml) for more examples. 70 | 71 | ### Permissions 72 | The `GITHUB_TOKEN` requires the following permissions to create comments on issues and pull requests: 73 | - `issues: write` 74 | - `pull-requests: write` 75 | 76 | Add these permissions to your workflow or individual jobs using the [`permissions`](https://docs.github.com/en/actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow) keyword. 77 | 78 | ### Secrets 79 | Sensitive information, such as the OpenAI API key, should be stored as [encrypted secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets#creating-encrypted-secrets-for-a-repository) in the repository. 80 | 81 | Add your OpenAI API key as a secret to your repository and reference it using the `${{ secrets.OPENAI_KEY }}` syntax. 82 | 83 | ## Action Inputs 84 | 85 | | Name | Required | Default | Description | 86 | | -------------------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 87 | | `github_token` | Yes | | The access token used to retrieve and create comments on the issues and pull requests. This will typically be your GitHub token. If so, use `${{ secrets.GITHUB_TOKEN }}` | 88 | | `openai_key` | Yes | | The API key used for OpenAI chat completion request. Go to [OpenAI](https://platform.openai.com/account/api-keys) to create a new API key | 89 | | `openai_temperature` | No | 0.8 | What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. See [API reference](https://platform.openai.com/docs/api-reference/chat/create#completions/create-temperature) for more information. | | | | | | 90 | | `openai_top_p` | No | 0 | An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. See [API reference](https://platform.openai.com/docs/api-reference/chat/create#completions/create-top_p) for more information. | 91 | | `openai_max_tokens` | No | 4096 | The maximum number of tokens to generate in the completion. See [API reference](https://platform.openai.com/docs/api-reference/chat/create#completions/create-max_tokens) for more information. | 92 | 93 | # Examples 94 | 95 | ### [Explain Pull Requests](https://github.com/zirkelc/AdaGPT/pull/2) 96 | ![2023-05-02_18-24-08](https://user-images.githubusercontent.com/950244/235726373-81563bc9-1847-4c0e-8957-ee0f4cfbc6c6.jpg) 97 | 98 | --- 99 | ### [Rock, Paper, Scissors!](https://github.com/zirkelc/AdaGPT/issues/8) 100 | ![image](https://user-images.githubusercontent.com/950244/235635443-09c893d6-c040-406d-93e6-49752c46b4aa.png) 101 | 102 | # Contributing 103 | We welcome bug reports, feature requests, and contributions to AdaGPT! If you'd like to contribute, please open an issue or pull request on this repository. 104 | 105 | # License 106 | AdaGPT is licensed under the MIT License. See the LICENSE file for more information. 107 | -------------------------------------------------------------------------------- /events/issue_comment.pull_request.json: -------------------------------------------------------------------------------- 1 | { 2 | "action": "created", 3 | "comment": { 4 | "author_association": "OWNER", 5 | "body": "test", 6 | "created_at": "2023-04-29T10:46:24Z", 7 | "html_url": "https://github.com/zirkelc/action-gpt/pull/7#issuecomment-1528755957", 8 | "id": 1528755957, 9 | "issue_url": "https://api.github.com/repos/zirkelc/action-gpt/issues/7", 10 | "node_id": "IC_kwDOJb8kx85bHvb1", 11 | "performed_via_github_app": null, 12 | "reactions": { 13 | "+1": 0, 14 | "-1": 0, 15 | "confused": 0, 16 | "eyes": 0, 17 | "heart": 0, 18 | "hooray": 0, 19 | "laugh": 0, 20 | "rocket": 0, 21 | "total_count": 0, 22 | "url": "https://api.github.com/repos/zirkelc/action-gpt/issues/comments/1528755957/reactions" 23 | }, 24 | "updated_at": "2023-04-29T10:46:24Z", 25 | "url": "https://api.github.com/repos/zirkelc/action-gpt/issues/comments/1528755957", 26 | "user": { 27 | "avatar_url": "https://avatars.githubusercontent.com/u/950244?v=4", 28 | "events_url": "https://api.github.com/users/zirkelc/events{/privacy}", 29 | "followers_url": "https://api.github.com/users/zirkelc/followers", 30 | "following_url": "https://api.github.com/users/zirkelc/following{/other_user}", 31 | "gists_url": "https://api.github.com/users/zirkelc/gists{/gist_id}", 32 | "gravatar_id": "", 33 | "html_url": "https://github.com/zirkelc", 34 | "id": 950244, 35 | "login": "zirkelc", 36 | "node_id": "MDQ6VXNlcjk1MDI0NA==", 37 | "organizations_url": "https://api.github.com/users/zirkelc/orgs", 38 | "received_events_url": "https://api.github.com/users/zirkelc/received_events", 39 | "repos_url": "https://api.github.com/users/zirkelc/repos", 40 | "site_admin": false, 41 | "starred_url": "https://api.github.com/users/zirkelc/starred{/owner}{/repo}", 42 | "subscriptions_url": "https://api.github.com/users/zirkelc/subscriptions", 43 | "type": "User", 44 | "url": "https://api.github.com/users/zirkelc" 45 | } 46 | }, 47 | "issue": { 48 | "active_lock_reason": null, 49 | "assignee": null, 50 | "assignees": [], 51 | "author_association": "NONE", 52 | "body": "Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.16.1 to 18.16.2.\n
\nCommits\n\n
\n
\n\n\n[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@types/node&package-manager=npm_and_yarn&previous-version=18.16.1&new-version=18.16.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)\n\nDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.\n\n[//]: # (dependabot-automerge-start)\n[//]: # (dependabot-automerge-end)\n\n---\n\n
\nDependabot commands and options\n
\n\nYou can trigger Dependabot actions by commenting on this PR:\n- `@dependabot rebase` will rebase this PR\n- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it\n- `@dependabot merge` will merge this PR after your CI passes on it\n- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it\n- `@dependabot cancel merge` will cancel a previously requested merge and block automerging\n- `@dependabot reopen` will reopen this PR if it is closed\n- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually\n- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)\n- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)\n- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)\n\n\n
", 53 | "closed_at": null, 54 | "comments": 2, 55 | "comments_url": "https://api.github.com/repos/zirkelc/action-gpt/issues/7/comments", 56 | "created_at": "2023-04-28T13:04:52Z", 57 | "draft": false, 58 | "events_url": "https://api.github.com/repos/zirkelc/action-gpt/issues/7/events", 59 | "html_url": "https://github.com/zirkelc/action-gpt/pull/7", 60 | "id": 1688527023, 61 | "labels": [ 62 | { 63 | "color": "0366d6", 64 | "default": false, 65 | "description": "Pull requests that update a dependency file", 66 | "id": 5438167653, 67 | "name": "dependencies", 68 | "node_id": "LA_kwDOJb8kx88AAAABRCPaZQ", 69 | "url": "https://api.github.com/repos/zirkelc/action-gpt/labels/dependencies" 70 | }, 71 | { 72 | "color": "168700", 73 | "default": false, 74 | "description": "Pull requests that update Javascript code", 75 | "id": 5438167669, 76 | "name": "javascript", 77 | "node_id": "LA_kwDOJb8kx88AAAABRCPadQ", 78 | "url": "https://api.github.com/repos/zirkelc/action-gpt/labels/javascript" 79 | } 80 | ], 81 | "labels_url": "https://api.github.com/repos/zirkelc/action-gpt/issues/7/labels{/name}", 82 | "locked": false, 83 | "milestone": null, 84 | "node_id": "PR_kwDOJb8kx85PYoq0", 85 | "number": 7, 86 | "performed_via_github_app": null, 87 | "pull_request": { 88 | "diff_url": "https://github.com/zirkelc/action-gpt/pull/7.diff", 89 | "html_url": "https://github.com/zirkelc/action-gpt/pull/7", 90 | "merged_at": null, 91 | "patch_url": "https://github.com/zirkelc/action-gpt/pull/7.patch", 92 | "url": "https://api.github.com/repos/zirkelc/action-gpt/pulls/7" 93 | }, 94 | "reactions": { 95 | "+1": 0, 96 | "-1": 0, 97 | "confused": 0, 98 | "eyes": 0, 99 | "heart": 0, 100 | "hooray": 0, 101 | "laugh": 0, 102 | "rocket": 0, 103 | "total_count": 0, 104 | "url": "https://api.github.com/repos/zirkelc/action-gpt/issues/7/reactions" 105 | }, 106 | "repository_url": "https://api.github.com/repos/zirkelc/action-gpt", 107 | "state": "open", 108 | "state_reason": null, 109 | "timeline_url": "https://api.github.com/repos/zirkelc/action-gpt/issues/7/timeline", 110 | "title": "Bump @types/node from 18.16.1 to 18.16.2", 111 | "updated_at": "2023-04-29T10:46:24Z", 112 | "url": "https://api.github.com/repos/zirkelc/action-gpt/issues/7", 113 | "user": { 114 | "avatar_url": "https://avatars.githubusercontent.com/in/29110?v=4", 115 | "events_url": "https://api.github.com/users/dependabot%5Bbot%5D/events{/privacy}", 116 | "followers_url": "https://api.github.com/users/dependabot%5Bbot%5D/followers", 117 | "following_url": "https://api.github.com/users/dependabot%5Bbot%5D/following{/other_user}", 118 | "gists_url": "https://api.github.com/users/dependabot%5Bbot%5D/gists{/gist_id}", 119 | "gravatar_id": "", 120 | "html_url": "https://github.com/apps/dependabot", 121 | "id": 49699333, 122 | "login": "dependabot[bot]", 123 | "node_id": "MDM6Qm90NDk2OTkzMzM=", 124 | "organizations_url": "https://api.github.com/users/dependabot%5Bbot%5D/orgs", 125 | "received_events_url": "https://api.github.com/users/dependabot%5Bbot%5D/received_events", 126 | "repos_url": "https://api.github.com/users/dependabot%5Bbot%5D/repos", 127 | "site_admin": false, 128 | "starred_url": "https://api.github.com/users/dependabot%5Bbot%5D/starred{/owner}{/repo}", 129 | "subscriptions_url": "https://api.github.com/users/dependabot%5Bbot%5D/subscriptions", 130 | "type": "Bot", 131 | "url": "https://api.github.com/users/dependabot%5Bbot%5D" 132 | } 133 | }, 134 | "repository": { 135 | "allow_forking": true, 136 | "archive_url": "https://api.github.com/repos/zirkelc/action-gpt/{archive_format}{/ref}", 137 | "archived": false, 138 | "assignees_url": "https://api.github.com/repos/zirkelc/action-gpt/assignees{/user}", 139 | "blobs_url": "https://api.github.com/repos/zirkelc/action-gpt/git/blobs{/sha}", 140 | "branches_url": "https://api.github.com/repos/zirkelc/action-gpt/branches{/branch}", 141 | "clone_url": "https://github.com/zirkelc/action-gpt.git", 142 | "collaborators_url": "https://api.github.com/repos/zirkelc/action-gpt/collaborators{/collaborator}", 143 | "comments_url": "https://api.github.com/repos/zirkelc/action-gpt/comments{/number}", 144 | "commits_url": "https://api.github.com/repos/zirkelc/action-gpt/commits{/sha}", 145 | "compare_url": "https://api.github.com/repos/zirkelc/action-gpt/compare/{base}...{head}", 146 | "contents_url": "https://api.github.com/repos/zirkelc/action-gpt/contents/{+path}", 147 | "contributors_url": "https://api.github.com/repos/zirkelc/action-gpt/contributors", 148 | "created_at": "2023-04-27T07:06:55Z", 149 | "default_branch": "main", 150 | "deployments_url": "https://api.github.com/repos/zirkelc/action-gpt/deployments", 151 | "description": "ActionGPT ", 152 | "disabled": false, 153 | "downloads_url": "https://api.github.com/repos/zirkelc/action-gpt/downloads", 154 | "events_url": "https://api.github.com/repos/zirkelc/action-gpt/events", 155 | "fork": false, 156 | "forks": 0, 157 | "forks_count": 0, 158 | "forks_url": "https://api.github.com/repos/zirkelc/action-gpt/forks", 159 | "full_name": "zirkelc/action-gpt", 160 | "git_commits_url": "https://api.github.com/repos/zirkelc/action-gpt/git/commits{/sha}", 161 | "git_refs_url": "https://api.github.com/repos/zirkelc/action-gpt/git/refs{/sha}", 162 | "git_tags_url": "https://api.github.com/repos/zirkelc/action-gpt/git/tags{/sha}", 163 | "git_url": "git://github.com/zirkelc/action-gpt.git", 164 | "has_discussions": false, 165 | "has_downloads": true, 166 | "has_issues": true, 167 | "has_pages": false, 168 | "has_projects": true, 169 | "has_wiki": false, 170 | "homepage": null, 171 | "hooks_url": "https://api.github.com/repos/zirkelc/action-gpt/hooks", 172 | "html_url": "https://github.com/zirkelc/action-gpt", 173 | "id": 633283783, 174 | "is_template": false, 175 | "issue_comment_url": "https://api.github.com/repos/zirkelc/action-gpt/issues/comments{/number}", 176 | "issue_events_url": "https://api.github.com/repos/zirkelc/action-gpt/issues/events{/number}", 177 | "issues_url": "https://api.github.com/repos/zirkelc/action-gpt/issues{/number}", 178 | "keys_url": "https://api.github.com/repos/zirkelc/action-gpt/keys{/key_id}", 179 | "labels_url": "https://api.github.com/repos/zirkelc/action-gpt/labels{/name}", 180 | "language": "TypeScript", 181 | "languages_url": "https://api.github.com/repos/zirkelc/action-gpt/languages", 182 | "license": { 183 | "key": "mit", 184 | "name": "MIT License", 185 | "node_id": "MDc6TGljZW5zZTEz", 186 | "spdx_id": "MIT", 187 | "url": "https://api.github.com/licenses/mit" 188 | }, 189 | "merges_url": "https://api.github.com/repos/zirkelc/action-gpt/merges", 190 | "milestones_url": "https://api.github.com/repos/zirkelc/action-gpt/milestones{/number}", 191 | "mirror_url": null, 192 | "name": "action-gpt", 193 | "node_id": "R_kgDOJb8kxw", 194 | "notifications_url": "https://api.github.com/repos/zirkelc/action-gpt/notifications{?since,all,participating}", 195 | "open_issues": 3, 196 | "open_issues_count": 3, 197 | "owner": { 198 | "avatar_url": "https://avatars.githubusercontent.com/u/950244?v=4", 199 | "events_url": "https://api.github.com/users/zirkelc/events{/privacy}", 200 | "followers_url": "https://api.github.com/users/zirkelc/followers", 201 | "following_url": "https://api.github.com/users/zirkelc/following{/other_user}", 202 | "gists_url": "https://api.github.com/users/zirkelc/gists{/gist_id}", 203 | "gravatar_id": "", 204 | "html_url": "https://github.com/zirkelc", 205 | "id": 950244, 206 | "login": "zirkelc", 207 | "node_id": "MDQ6VXNlcjk1MDI0NA==", 208 | "organizations_url": "https://api.github.com/users/zirkelc/orgs", 209 | "received_events_url": "https://api.github.com/users/zirkelc/received_events", 210 | "repos_url": "https://api.github.com/users/zirkelc/repos", 211 | "site_admin": false, 212 | "starred_url": "https://api.github.com/users/zirkelc/starred{/owner}{/repo}", 213 | "subscriptions_url": "https://api.github.com/users/zirkelc/subscriptions", 214 | "type": "User", 215 | "url": "https://api.github.com/users/zirkelc" 216 | }, 217 | "private": true, 218 | "pulls_url": "https://api.github.com/repos/zirkelc/action-gpt/pulls{/number}", 219 | "pushed_at": "2023-04-29T10:40:57Z", 220 | "releases_url": "https://api.github.com/repos/zirkelc/action-gpt/releases{/id}", 221 | "size": 618, 222 | "ssh_url": "git@github.com:zirkelc/action-gpt.git", 223 | "stargazers_count": 0, 224 | "stargazers_url": "https://api.github.com/repos/zirkelc/action-gpt/stargazers", 225 | "statuses_url": "https://api.github.com/repos/zirkelc/action-gpt/statuses/{sha}", 226 | "subscribers_url": "https://api.github.com/repos/zirkelc/action-gpt/subscribers", 227 | "subscription_url": "https://api.github.com/repos/zirkelc/action-gpt/subscription", 228 | "svn_url": "https://github.com/zirkelc/action-gpt", 229 | "tags_url": "https://api.github.com/repos/zirkelc/action-gpt/tags", 230 | "teams_url": "https://api.github.com/repos/zirkelc/action-gpt/teams", 231 | "topics": [], 232 | "trees_url": "https://api.github.com/repos/zirkelc/action-gpt/git/trees{/sha}", 233 | "updated_at": "2023-04-27T07:07:03Z", 234 | "url": "https://api.github.com/repos/zirkelc/action-gpt", 235 | "visibility": "private", 236 | "watchers": 0, 237 | "watchers_count": 0, 238 | "web_commit_signoff_required": false 239 | }, 240 | "sender": { 241 | "avatar_url": "https://avatars.githubusercontent.com/u/950244?v=4", 242 | "events_url": "https://api.github.com/users/zirkelc/events{/privacy}", 243 | "followers_url": "https://api.github.com/users/zirkelc/followers", 244 | "following_url": "https://api.github.com/users/zirkelc/following{/other_user}", 245 | "gists_url": "https://api.github.com/users/zirkelc/gists{/gist_id}", 246 | "gravatar_id": "", 247 | "html_url": "https://github.com/zirkelc", 248 | "id": 950244, 249 | "login": "zirkelc", 250 | "node_id": "MDQ6VXNlcjk1MDI0NA==", 251 | "organizations_url": "https://api.github.com/users/zirkelc/orgs", 252 | "received_events_url": "https://api.github.com/users/zirkelc/received_events", 253 | "repos_url": "https://api.github.com/users/zirkelc/repos", 254 | "site_admin": false, 255 | "starred_url": "https://api.github.com/users/zirkelc/starred{/owner}{/repo}", 256 | "subscriptions_url": "https://api.github.com/users/zirkelc/subscriptions", 257 | "type": "User", 258 | "url": "https://api.github.com/users/zirkelc" 259 | } 260 | } -------------------------------------------------------------------------------- /events/issue_comment.issue.json: -------------------------------------------------------------------------------- 1 | { 2 | "action": "created", 3 | "issue": { 4 | "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/1", 5 | "repository_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World", 6 | "labels_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/1/labels{/name}", 7 | "comments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/1/comments", 8 | "events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/1/events", 9 | "html_url": "https://octocoders.github.io/Codertocat/Hello-World/issues/1", 10 | "id": 10, 11 | "node_id": "MDU6SXNzdWUxMA==", 12 | "number": 1, 13 | "title": "Spelling error in the README file", 14 | "user": { 15 | "login": "Codertocat", 16 | "id": 4, 17 | "node_id": "MDQ6VXNlcjQ=", 18 | "avatar_url": "https://octocoders.github.io/avatars/u/4?", 19 | "gravatar_id": "", 20 | "url": "https://octocoders.github.io/api/v3/users/Codertocat", 21 | "html_url": "https://octocoders.github.io/Codertocat", 22 | "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", 23 | "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", 24 | "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", 25 | "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", 26 | "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", 27 | "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", 28 | "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", 29 | "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", 30 | "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", 31 | "type": "User", 32 | "site_admin": false 33 | }, 34 | "labels": [ 35 | { 36 | "id": 941, 37 | "node_id": "MDU6TGFiZWw5NDE=", 38 | "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/labels/bug", 39 | "name": "bug", 40 | "color": "d73a4a", 41 | "default": true 42 | } 43 | ], 44 | "state": "open", 45 | "locked": false, 46 | "assignee": { 47 | "login": "Codertocat", 48 | "id": 4, 49 | "node_id": "MDQ6VXNlcjQ=", 50 | "avatar_url": "https://octocoders.github.io/avatars/u/4?", 51 | "gravatar_id": "", 52 | "url": "https://octocoders.github.io/api/v3/users/Codertocat", 53 | "html_url": "https://octocoders.github.io/Codertocat", 54 | "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", 55 | "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", 56 | "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", 57 | "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", 58 | "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", 59 | "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", 60 | "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", 61 | "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", 62 | "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", 63 | "type": "User", 64 | "site_admin": false 65 | }, 66 | "assignees": [ 67 | { 68 | "login": "Codertocat", 69 | "id": 4, 70 | "node_id": "MDQ6VXNlcjQ=", 71 | "avatar_url": "https://octocoders.github.io/avatars/u/4?", 72 | "gravatar_id": "", 73 | "url": "https://octocoders.github.io/api/v3/users/Codertocat", 74 | "html_url": "https://octocoders.github.io/Codertocat", 75 | "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", 76 | "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", 77 | "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", 78 | "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", 79 | "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", 80 | "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", 81 | "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", 82 | "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", 83 | "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", 84 | "type": "User", 85 | "site_admin": false 86 | } 87 | ], 88 | "milestone": { 89 | "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/milestones/1", 90 | "html_url": "https://octocoders.github.io/Codertocat/Hello-World/milestone/1", 91 | "labels_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/milestones/1/labels", 92 | "id": 2, 93 | "node_id": "MDk6TWlsZXN0b25lMg==", 94 | "number": 1, 95 | "title": "v1.0", 96 | "description": "Add new space flight simulator", 97 | "creator": { 98 | "login": "Codertocat", 99 | "id": 4, 100 | "node_id": "MDQ6VXNlcjQ=", 101 | "avatar_url": "https://octocoders.github.io/avatars/u/4?", 102 | "gravatar_id": "", 103 | "url": "https://octocoders.github.io/api/v3/users/Codertocat", 104 | "html_url": "https://octocoders.github.io/Codertocat", 105 | "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", 106 | "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", 107 | "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", 108 | "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", 109 | "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", 110 | "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", 111 | "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", 112 | "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", 113 | "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", 114 | "type": "User", 115 | "site_admin": false 116 | }, 117 | "open_issues": 1, 118 | "closed_issues": 0, 119 | "state": "closed", 120 | "created_at": "2019-05-15T19:37:52Z", 121 | "updated_at": "2019-05-15T19:37:53Z", 122 | "due_on": "2019-05-23T00:00:00Z", 123 | "closed_at": "2019-05-15T19:37:53Z" 124 | }, 125 | "comments": 0, 126 | "created_at": "2019-05-15T19:37:53Z", 127 | "updated_at": "2019-05-15T19:37:55Z", 128 | "closed_at": null, 129 | "author_association": "OWNER", 130 | "body": "It looks like you accidently spelled 'commit' with two 't's." 131 | }, 132 | "comment": { 133 | "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/comments/2", 134 | "html_url": "https://octocoders.github.io/Codertocat/Hello-World/issues/1#issuecomment-2", 135 | "issue_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/1", 136 | "id": 2, 137 | "node_id": "MDEyOklzc3VlQ29tbWVudDI=", 138 | "user": { 139 | "login": "Codertocat", 140 | "id": 4, 141 | "node_id": "MDQ6VXNlcjQ=", 142 | "avatar_url": "https://octocoders.github.io/avatars/u/4?", 143 | "gravatar_id": "", 144 | "url": "https://octocoders.github.io/api/v3/users/Codertocat", 145 | "html_url": "https://octocoders.github.io/Codertocat", 146 | "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", 147 | "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", 148 | "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", 149 | "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", 150 | "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", 151 | "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", 152 | "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", 153 | "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", 154 | "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", 155 | "type": "User", 156 | "site_admin": false 157 | }, 158 | "created_at": "2019-05-15T19:37:55Z", 159 | "updated_at": "2019-05-15T19:37:55Z", 160 | "author_association": "OWNER", 161 | "body": "You are totally right! I'll get this fixed right away." 162 | }, 163 | "repository": { 164 | "id": 118, 165 | "node_id": "MDEwOlJlcG9zaXRvcnkxMTg=", 166 | "name": "Hello-World", 167 | "full_name": "Codertocat/Hello-World", 168 | "private": false, 169 | "owner": { 170 | "login": "Codertocat", 171 | "id": 4, 172 | "node_id": "MDQ6VXNlcjQ=", 173 | "avatar_url": "https://octocoders.github.io/avatars/u/4?", 174 | "gravatar_id": "", 175 | "url": "https://octocoders.github.io/api/v3/users/Codertocat", 176 | "html_url": "https://octocoders.github.io/Codertocat", 177 | "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", 178 | "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", 179 | "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", 180 | "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", 181 | "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", 182 | "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", 183 | "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", 184 | "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", 185 | "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", 186 | "type": "User", 187 | "site_admin": false 188 | }, 189 | "html_url": "https://octocoders.github.io/Codertocat/Hello-World", 190 | "description": null, 191 | "fork": false, 192 | "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World", 193 | "forks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/forks", 194 | "keys_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/keys{/key_id}", 195 | "collaborators_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/collaborators{/collaborator}", 196 | "teams_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/teams", 197 | "hooks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/hooks", 198 | "issue_events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/events{/number}", 199 | "events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/events", 200 | "assignees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/assignees{/user}", 201 | "branches_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/branches{/branch}", 202 | "tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/tags", 203 | "blobs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/blobs{/sha}", 204 | "git_tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/tags{/sha}", 205 | "git_refs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/refs{/sha}", 206 | "trees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/trees{/sha}", 207 | "statuses_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/statuses/{sha}", 208 | "languages_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/languages", 209 | "stargazers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/stargazers", 210 | "contributors_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contributors", 211 | "subscribers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscribers", 212 | "subscription_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscription", 213 | "commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/commits{/sha}", 214 | "git_commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/commits{/sha}", 215 | "comments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/comments{/number}", 216 | "issue_comment_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/comments{/number}", 217 | "contents_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contents/{+path}", 218 | "compare_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/compare/{base}...{head}", 219 | "merges_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/merges", 220 | "archive_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/{archive_format}{/ref}", 221 | "downloads_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/downloads", 222 | "issues_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues{/number}", 223 | "pulls_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls{/number}", 224 | "milestones_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/milestones{/number}", 225 | "notifications_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/notifications{?since,all,participating}", 226 | "labels_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/labels{/name}", 227 | "releases_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/releases{/id}", 228 | "deployments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/deployments", 229 | "created_at": "2019-05-15T19:37:07Z", 230 | "updated_at": "2019-05-15T19:37:10Z", 231 | "pushed_at": "2019-05-15T19:37:50Z", 232 | "git_url": "git://octocoders.github.io/Codertocat/Hello-World.git", 233 | "ssh_url": "git@octocoders.github.io:Codertocat/Hello-World.git", 234 | "clone_url": "https://octocoders.github.io/Codertocat/Hello-World.git", 235 | "svn_url": "https://octocoders.github.io/Codertocat/Hello-World", 236 | "homepage": null, 237 | "size": 0, 238 | "stargazers_count": 0, 239 | "watchers_count": 0, 240 | "language": null, 241 | "has_issues": true, 242 | "has_projects": true, 243 | "has_downloads": true, 244 | "has_wiki": true, 245 | "has_pages": true, 246 | "forks_count": 0, 247 | "mirror_url": null, 248 | "archived": false, 249 | "disabled": false, 250 | "open_issues_count": 1, 251 | "license": null, 252 | "forks": 0, 253 | "open_issues": 1, 254 | "watchers": 0, 255 | "default_branch": "master" 256 | }, 257 | "enterprise": { 258 | "id": 1, 259 | "slug": "github", 260 | "name": "GitHub", 261 | "node_id": "MDg6QnVzaW5lc3Mx", 262 | "avatar_url": "https://octocoders.github.io/avatars/b/1?", 263 | "description": null, 264 | "website_url": null, 265 | "html_url": "https://octocoders.github.io/businesses/github", 266 | "created_at": "2019-05-14T19:31:12Z", 267 | "updated_at": "2019-05-14T19:31:12Z" 268 | }, 269 | "sender": { 270 | "login": "Codertocat", 271 | "id": 4, 272 | "node_id": "MDQ6VXNlcjQ=", 273 | "avatar_url": "https://octocoders.github.io/avatars/u/4?", 274 | "gravatar_id": "", 275 | "url": "https://octocoders.github.io/api/v3/users/Codertocat", 276 | "html_url": "https://octocoders.github.io/Codertocat", 277 | "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", 278 | "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", 279 | "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", 280 | "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", 281 | "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", 282 | "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", 283 | "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", 284 | "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", 285 | "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", 286 | "type": "User", 287 | "site_admin": false 288 | }, 289 | "installation": { 290 | "id": 5, 291 | "node_id": "MDIzOkludGVncmF0aW9uSW5zdGFsbGF0aW9uNQ==" 292 | } 293 | } -------------------------------------------------------------------------------- /dist/sourcemap-register.js: -------------------------------------------------------------------------------- 1 | (()=>{var e={650:e=>{var r=Object.prototype.toString;var n=typeof Buffer.alloc==="function"&&typeof Buffer.allocUnsafe==="function"&&typeof Buffer.from==="function";function isArrayBuffer(e){return r.call(e).slice(8,-1)==="ArrayBuffer"}function fromArrayBuffer(e,r,t){r>>>=0;var o=e.byteLength-r;if(o<0){throw new RangeError("'offset' is out of bounds")}if(t===undefined){t=o}else{t>>>=0;if(t>o){throw new RangeError("'length' is out of bounds")}}return n?Buffer.from(e.slice(r,r+t)):new Buffer(new Uint8Array(e.slice(r,r+t)))}function fromString(e,r){if(typeof r!=="string"||r===""){r="utf8"}if(!Buffer.isEncoding(r)){throw new TypeError('"encoding" must be a valid string encoding')}return n?Buffer.from(e,r):new Buffer(e,r)}function bufferFrom(e,r,t){if(typeof e==="number"){throw new TypeError('"value" argument must not be a number')}if(isArrayBuffer(e)){return fromArrayBuffer(e,r,t)}if(typeof e==="string"){return fromString(e,r)}return n?Buffer.from(e):new Buffer(e)}e.exports=bufferFrom},274:(e,r,n)=>{var t=n(339);var o=Object.prototype.hasOwnProperty;var i=typeof Map!=="undefined";function ArraySet(){this._array=[];this._set=i?new Map:Object.create(null)}ArraySet.fromArray=function ArraySet_fromArray(e,r){var n=new ArraySet;for(var t=0,o=e.length;t=0){return r}}else{var n=t.toSetString(e);if(o.call(this._set,n)){return this._set[n]}}throw new Error('"'+e+'" is not in the set.')};ArraySet.prototype.at=function ArraySet_at(e){if(e>=0&&e{var t=n(190);var o=5;var i=1<>1;return r?-n:n}r.encode=function base64VLQ_encode(e){var r="";var n;var i=toVLQSigned(e);do{n=i&a;i>>>=o;if(i>0){n|=u}r+=t.encode(n)}while(i>0);return r};r.decode=function base64VLQ_decode(e,r,n){var i=e.length;var s=0;var l=0;var c,p;do{if(r>=i){throw new Error("Expected more digits in base 64 VLQ value.")}p=t.decode(e.charCodeAt(r++));if(p===-1){throw new Error("Invalid base64 digit: "+e.charAt(r-1))}c=!!(p&u);p&=a;s=s+(p<{var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");r.encode=function(e){if(0<=e&&e{r.GREATEST_LOWER_BOUND=1;r.LEAST_UPPER_BOUND=2;function recursiveSearch(e,n,t,o,i,a){var u=Math.floor((n-e)/2)+e;var s=i(t,o[u],true);if(s===0){return u}else if(s>0){if(n-u>1){return recursiveSearch(u,n,t,o,i,a)}if(a==r.LEAST_UPPER_BOUND){return n1){return recursiveSearch(e,u,t,o,i,a)}if(a==r.LEAST_UPPER_BOUND){return u}else{return e<0?-1:e}}}r.search=function search(e,n,t,o){if(n.length===0){return-1}var i=recursiveSearch(-1,n.length,e,n,t,o||r.GREATEST_LOWER_BOUND);if(i<0){return-1}while(i-1>=0){if(t(n[i],n[i-1],true)!==0){break}--i}return i}},680:(e,r,n)=>{var t=n(339);function generatedPositionAfter(e,r){var n=e.generatedLine;var o=r.generatedLine;var i=e.generatedColumn;var a=r.generatedColumn;return o>n||o==n&&a>=i||t.compareByGeneratedPositionsInflated(e,r)<=0}function MappingList(){this._array=[];this._sorted=true;this._last={generatedLine:-1,generatedColumn:0}}MappingList.prototype.unsortedForEach=function MappingList_forEach(e,r){this._array.forEach(e,r)};MappingList.prototype.add=function MappingList_add(e){if(generatedPositionAfter(this._last,e)){this._last=e;this._array.push(e)}else{this._sorted=false;this._array.push(e)}};MappingList.prototype.toArray=function MappingList_toArray(){if(!this._sorted){this._array.sort(t.compareByGeneratedPositionsInflated);this._sorted=true}return this._array};r.H=MappingList},758:(e,r)=>{function swap(e,r,n){var t=e[r];e[r]=e[n];e[n]=t}function randomIntInRange(e,r){return Math.round(e+Math.random()*(r-e))}function doQuickSort(e,r,n,t){if(n{var t;var o=n(339);var i=n(345);var a=n(274).I;var u=n(449);var s=n(758).U;function SourceMapConsumer(e,r){var n=e;if(typeof e==="string"){n=o.parseSourceMapInput(e)}return n.sections!=null?new IndexedSourceMapConsumer(n,r):new BasicSourceMapConsumer(n,r)}SourceMapConsumer.fromSourceMap=function(e,r){return BasicSourceMapConsumer.fromSourceMap(e,r)};SourceMapConsumer.prototype._version=3;SourceMapConsumer.prototype.__generatedMappings=null;Object.defineProperty(SourceMapConsumer.prototype,"_generatedMappings",{configurable:true,enumerable:true,get:function(){if(!this.__generatedMappings){this._parseMappings(this._mappings,this.sourceRoot)}return this.__generatedMappings}});SourceMapConsumer.prototype.__originalMappings=null;Object.defineProperty(SourceMapConsumer.prototype,"_originalMappings",{configurable:true,enumerable:true,get:function(){if(!this.__originalMappings){this._parseMappings(this._mappings,this.sourceRoot)}return this.__originalMappings}});SourceMapConsumer.prototype._charIsMappingSeparator=function SourceMapConsumer_charIsMappingSeparator(e,r){var n=e.charAt(r);return n===";"||n===","};SourceMapConsumer.prototype._parseMappings=function SourceMapConsumer_parseMappings(e,r){throw new Error("Subclasses must implement _parseMappings")};SourceMapConsumer.GENERATED_ORDER=1;SourceMapConsumer.ORIGINAL_ORDER=2;SourceMapConsumer.GREATEST_LOWER_BOUND=1;SourceMapConsumer.LEAST_UPPER_BOUND=2;SourceMapConsumer.prototype.eachMapping=function SourceMapConsumer_eachMapping(e,r,n){var t=r||null;var i=n||SourceMapConsumer.GENERATED_ORDER;var a;switch(i){case SourceMapConsumer.GENERATED_ORDER:a=this._generatedMappings;break;case SourceMapConsumer.ORIGINAL_ORDER:a=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var u=this.sourceRoot;a.map((function(e){var r=e.source===null?null:this._sources.at(e.source);r=o.computeSourceURL(u,r,this._sourceMapURL);return{source:r,generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:e.name===null?null:this._names.at(e.name)}}),this).forEach(e,t)};SourceMapConsumer.prototype.allGeneratedPositionsFor=function SourceMapConsumer_allGeneratedPositionsFor(e){var r=o.getArg(e,"line");var n={source:o.getArg(e,"source"),originalLine:r,originalColumn:o.getArg(e,"column",0)};n.source=this._findSourceIndex(n.source);if(n.source<0){return[]}var t=[];var a=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",o.compareByOriginalPositions,i.LEAST_UPPER_BOUND);if(a>=0){var u=this._originalMappings[a];if(e.column===undefined){var s=u.originalLine;while(u&&u.originalLine===s){t.push({line:o.getArg(u,"generatedLine",null),column:o.getArg(u,"generatedColumn",null),lastColumn:o.getArg(u,"lastGeneratedColumn",null)});u=this._originalMappings[++a]}}else{var l=u.originalColumn;while(u&&u.originalLine===r&&u.originalColumn==l){t.push({line:o.getArg(u,"generatedLine",null),column:o.getArg(u,"generatedColumn",null),lastColumn:o.getArg(u,"lastGeneratedColumn",null)});u=this._originalMappings[++a]}}}return t};r.SourceMapConsumer=SourceMapConsumer;function BasicSourceMapConsumer(e,r){var n=e;if(typeof e==="string"){n=o.parseSourceMapInput(e)}var t=o.getArg(n,"version");var i=o.getArg(n,"sources");var u=o.getArg(n,"names",[]);var s=o.getArg(n,"sourceRoot",null);var l=o.getArg(n,"sourcesContent",null);var c=o.getArg(n,"mappings");var p=o.getArg(n,"file",null);if(t!=this._version){throw new Error("Unsupported version: "+t)}if(s){s=o.normalize(s)}i=i.map(String).map(o.normalize).map((function(e){return s&&o.isAbsolute(s)&&o.isAbsolute(e)?o.relative(s,e):e}));this._names=a.fromArray(u.map(String),true);this._sources=a.fromArray(i,true);this._absoluteSources=this._sources.toArray().map((function(e){return o.computeSourceURL(s,e,r)}));this.sourceRoot=s;this.sourcesContent=l;this._mappings=c;this._sourceMapURL=r;this.file=p}BasicSourceMapConsumer.prototype=Object.create(SourceMapConsumer.prototype);BasicSourceMapConsumer.prototype.consumer=SourceMapConsumer;BasicSourceMapConsumer.prototype._findSourceIndex=function(e){var r=e;if(this.sourceRoot!=null){r=o.relative(this.sourceRoot,r)}if(this._sources.has(r)){return this._sources.indexOf(r)}var n;for(n=0;n1){v.source=l+_[1];l+=_[1];v.originalLine=i+_[2];i=v.originalLine;v.originalLine+=1;v.originalColumn=a+_[3];a=v.originalColumn;if(_.length>4){v.name=c+_[4];c+=_[4]}}m.push(v);if(typeof v.originalLine==="number"){d.push(v)}}}s(m,o.compareByGeneratedPositionsDeflated);this.__generatedMappings=m;s(d,o.compareByOriginalPositions);this.__originalMappings=d};BasicSourceMapConsumer.prototype._findMapping=function SourceMapConsumer_findMapping(e,r,n,t,o,a){if(e[n]<=0){throw new TypeError("Line must be greater than or equal to 1, got "+e[n])}if(e[t]<0){throw new TypeError("Column must be greater than or equal to 0, got "+e[t])}return i.search(e,r,o,a)};BasicSourceMapConsumer.prototype.computeColumnSpans=function SourceMapConsumer_computeColumnSpans(){for(var e=0;e=0){var t=this._generatedMappings[n];if(t.generatedLine===r.generatedLine){var i=o.getArg(t,"source",null);if(i!==null){i=this._sources.at(i);i=o.computeSourceURL(this.sourceRoot,i,this._sourceMapURL)}var a=o.getArg(t,"name",null);if(a!==null){a=this._names.at(a)}return{source:i,line:o.getArg(t,"originalLine",null),column:o.getArg(t,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}};BasicSourceMapConsumer.prototype.hasContentsOfAllSources=function BasicSourceMapConsumer_hasContentsOfAllSources(){if(!this.sourcesContent){return false}return this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some((function(e){return e==null}))};BasicSourceMapConsumer.prototype.sourceContentFor=function SourceMapConsumer_sourceContentFor(e,r){if(!this.sourcesContent){return null}var n=this._findSourceIndex(e);if(n>=0){return this.sourcesContent[n]}var t=e;if(this.sourceRoot!=null){t=o.relative(this.sourceRoot,t)}var i;if(this.sourceRoot!=null&&(i=o.urlParse(this.sourceRoot))){var a=t.replace(/^file:\/\//,"");if(i.scheme=="file"&&this._sources.has(a)){return this.sourcesContent[this._sources.indexOf(a)]}if((!i.path||i.path=="/")&&this._sources.has("/"+t)){return this.sourcesContent[this._sources.indexOf("/"+t)]}}if(r){return null}else{throw new Error('"'+t+'" is not in the SourceMap.')}};BasicSourceMapConsumer.prototype.generatedPositionFor=function SourceMapConsumer_generatedPositionFor(e){var r=o.getArg(e,"source");r=this._findSourceIndex(r);if(r<0){return{line:null,column:null,lastColumn:null}}var n={source:r,originalLine:o.getArg(e,"line"),originalColumn:o.getArg(e,"column")};var t=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",o.compareByOriginalPositions,o.getArg(e,"bias",SourceMapConsumer.GREATEST_LOWER_BOUND));if(t>=0){var i=this._originalMappings[t];if(i.source===n.source){return{line:o.getArg(i,"generatedLine",null),column:o.getArg(i,"generatedColumn",null),lastColumn:o.getArg(i,"lastGeneratedColumn",null)}}}return{line:null,column:null,lastColumn:null}};t=BasicSourceMapConsumer;function IndexedSourceMapConsumer(e,r){var n=e;if(typeof e==="string"){n=o.parseSourceMapInput(e)}var t=o.getArg(n,"version");var i=o.getArg(n,"sections");if(t!=this._version){throw new Error("Unsupported version: "+t)}this._sources=new a;this._names=new a;var u={line:-1,column:0};this._sections=i.map((function(e){if(e.url){throw new Error("Support for url field in sections not implemented.")}var n=o.getArg(e,"offset");var t=o.getArg(n,"line");var i=o.getArg(n,"column");if(t{var t=n(449);var o=n(339);var i=n(274).I;var a=n(680).H;function SourceMapGenerator(e){if(!e){e={}}this._file=o.getArg(e,"file",null);this._sourceRoot=o.getArg(e,"sourceRoot",null);this._skipValidation=o.getArg(e,"skipValidation",false);this._sources=new i;this._names=new i;this._mappings=new a;this._sourcesContents=null}SourceMapGenerator.prototype._version=3;SourceMapGenerator.fromSourceMap=function SourceMapGenerator_fromSourceMap(e){var r=e.sourceRoot;var n=new SourceMapGenerator({file:e.file,sourceRoot:r});e.eachMapping((function(e){var t={generated:{line:e.generatedLine,column:e.generatedColumn}};if(e.source!=null){t.source=e.source;if(r!=null){t.source=o.relative(r,t.source)}t.original={line:e.originalLine,column:e.originalColumn};if(e.name!=null){t.name=e.name}}n.addMapping(t)}));e.sources.forEach((function(t){var i=t;if(r!==null){i=o.relative(r,t)}if(!n._sources.has(i)){n._sources.add(i)}var a=e.sourceContentFor(t);if(a!=null){n.setSourceContent(t,a)}}));return n};SourceMapGenerator.prototype.addMapping=function SourceMapGenerator_addMapping(e){var r=o.getArg(e,"generated");var n=o.getArg(e,"original",null);var t=o.getArg(e,"source",null);var i=o.getArg(e,"name",null);if(!this._skipValidation){this._validateMapping(r,n,t,i)}if(t!=null){t=String(t);if(!this._sources.has(t)){this._sources.add(t)}}if(i!=null){i=String(i);if(!this._names.has(i)){this._names.add(i)}}this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:n!=null&&n.line,originalColumn:n!=null&&n.column,source:t,name:i})};SourceMapGenerator.prototype.setSourceContent=function SourceMapGenerator_setSourceContent(e,r){var n=e;if(this._sourceRoot!=null){n=o.relative(this._sourceRoot,n)}if(r!=null){if(!this._sourcesContents){this._sourcesContents=Object.create(null)}this._sourcesContents[o.toSetString(n)]=r}else if(this._sourcesContents){delete this._sourcesContents[o.toSetString(n)];if(Object.keys(this._sourcesContents).length===0){this._sourcesContents=null}}};SourceMapGenerator.prototype.applySourceMap=function SourceMapGenerator_applySourceMap(e,r,n){var t=r;if(r==null){if(e.file==null){throw new Error("SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, "+'or the source map\'s "file" property. Both were omitted.')}t=e.file}var a=this._sourceRoot;if(a!=null){t=o.relative(a,t)}var u=new i;var s=new i;this._mappings.unsortedForEach((function(r){if(r.source===t&&r.originalLine!=null){var i=e.originalPositionFor({line:r.originalLine,column:r.originalColumn});if(i.source!=null){r.source=i.source;if(n!=null){r.source=o.join(n,r.source)}if(a!=null){r.source=o.relative(a,r.source)}r.originalLine=i.line;r.originalColumn=i.column;if(i.name!=null){r.name=i.name}}}var l=r.source;if(l!=null&&!u.has(l)){u.add(l)}var c=r.name;if(c!=null&&!s.has(c)){s.add(c)}}),this);this._sources=u;this._names=s;e.sources.forEach((function(r){var t=e.sourceContentFor(r);if(t!=null){if(n!=null){r=o.join(n,r)}if(a!=null){r=o.relative(a,r)}this.setSourceContent(r,t)}}),this)};SourceMapGenerator.prototype._validateMapping=function SourceMapGenerator_validateMapping(e,r,n,t){if(r&&typeof r.line!=="number"&&typeof r.column!=="number"){throw new Error("original.line and original.column are not numbers -- you probably meant to omit "+"the original mapping entirely and only map the generated position. If so, pass "+"null for the original mapping instead of an object with empty or null values.")}if(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!r&&!n&&!t){return}else if(e&&"line"in e&&"column"in e&&r&&"line"in r&&"column"in r&&e.line>0&&e.column>=0&&r.line>0&&r.column>=0&&n){return}else{throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:r,name:t}))}};SourceMapGenerator.prototype._serializeMappings=function SourceMapGenerator_serializeMappings(){var e=0;var r=1;var n=0;var i=0;var a=0;var u=0;var s="";var l;var c;var p;var f;var g=this._mappings.toArray();for(var h=0,d=g.length;h0){if(!o.compareByGeneratedPositionsInflated(c,g[h-1])){continue}l+=","}}l+=t.encode(c.generatedColumn-e);e=c.generatedColumn;if(c.source!=null){f=this._sources.indexOf(c.source);l+=t.encode(f-u);u=f;l+=t.encode(c.originalLine-1-i);i=c.originalLine-1;l+=t.encode(c.originalColumn-n);n=c.originalColumn;if(c.name!=null){p=this._names.indexOf(c.name);l+=t.encode(p-a);a=p}}s+=l}return s};SourceMapGenerator.prototype._generateSourcesContent=function SourceMapGenerator_generateSourcesContent(e,r){return e.map((function(e){if(!this._sourcesContents){return null}if(r!=null){e=o.relative(r,e)}var n=o.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null}),this)};SourceMapGenerator.prototype.toJSON=function SourceMapGenerator_toJSON(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};if(this._file!=null){e.file=this._file}if(this._sourceRoot!=null){e.sourceRoot=this._sourceRoot}if(this._sourcesContents){e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)}return e};SourceMapGenerator.prototype.toString=function SourceMapGenerator_toString(){return JSON.stringify(this.toJSON())};r.h=SourceMapGenerator},351:(e,r,n)=>{var t;var o=n(591).h;var i=n(339);var a=/(\r?\n)/;var u=10;var s="$$$isSourceNode$$$";function SourceNode(e,r,n,t,o){this.children=[];this.sourceContents={};this.line=e==null?null:e;this.column=r==null?null:r;this.source=n==null?null:n;this.name=o==null?null:o;this[s]=true;if(t!=null)this.add(t)}SourceNode.fromStringWithSourceMap=function SourceNode_fromStringWithSourceMap(e,r,n){var t=new SourceNode;var o=e.split(a);var u=0;var shiftNextLine=function(){var e=getNextLine();var r=getNextLine()||"";return e+r;function getNextLine(){return u=0;r--){this.prepend(e[r])}}else if(e[s]||typeof e==="string"){this.children.unshift(e)}else{throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e)}return this};SourceNode.prototype.walk=function SourceNode_walk(e){var r;for(var n=0,t=this.children.length;n0){r=[];for(n=0;n{function getArg(e,r,n){if(r in e){return e[r]}else if(arguments.length===3){return n}else{throw new Error('"'+r+'" is a required argument.')}}r.getArg=getArg;var n=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/;var t=/^data:.+\,.+$/;function urlParse(e){var r=e.match(n);if(!r){return null}return{scheme:r[1],auth:r[2],host:r[3],port:r[4],path:r[5]}}r.urlParse=urlParse;function urlGenerate(e){var r="";if(e.scheme){r+=e.scheme+":"}r+="//";if(e.auth){r+=e.auth+"@"}if(e.host){r+=e.host}if(e.port){r+=":"+e.port}if(e.path){r+=e.path}return r}r.urlGenerate=urlGenerate;function normalize(e){var n=e;var t=urlParse(e);if(t){if(!t.path){return e}n=t.path}var o=r.isAbsolute(n);var i=n.split(/\/+/);for(var a,u=0,s=i.length-1;s>=0;s--){a=i[s];if(a==="."){i.splice(s,1)}else if(a===".."){u++}else if(u>0){if(a===""){i.splice(s+1,u);u=0}else{i.splice(s,2);u--}}}n=i.join("/");if(n===""){n=o?"/":"."}if(t){t.path=n;return urlGenerate(t)}return n}r.normalize=normalize;function join(e,r){if(e===""){e="."}if(r===""){r="."}var n=urlParse(r);var o=urlParse(e);if(o){e=o.path||"/"}if(n&&!n.scheme){if(o){n.scheme=o.scheme}return urlGenerate(n)}if(n||r.match(t)){return r}if(o&&!o.host&&!o.path){o.host=r;return urlGenerate(o)}var i=r.charAt(0)==="/"?r:normalize(e.replace(/\/+$/,"")+"/"+r);if(o){o.path=i;return urlGenerate(o)}return i}r.join=join;r.isAbsolute=function(e){return e.charAt(0)==="/"||n.test(e)};function relative(e,r){if(e===""){e="."}e=e.replace(/\/$/,"");var n=0;while(r.indexOf(e+"/")!==0){var t=e.lastIndexOf("/");if(t<0){return r}e=e.slice(0,t);if(e.match(/^([^\/]+:\/)?\/*$/)){return r}++n}return Array(n+1).join("../")+r.substr(e.length+1)}r.relative=relative;var o=function(){var e=Object.create(null);return!("__proto__"in e)}();function identity(e){return e}function toSetString(e){if(isProtoString(e)){return"$"+e}return e}r.toSetString=o?identity:toSetString;function fromSetString(e){if(isProtoString(e)){return e.slice(1)}return e}r.fromSetString=o?identity:fromSetString;function isProtoString(e){if(!e){return false}var r=e.length;if(r<9){return false}if(e.charCodeAt(r-1)!==95||e.charCodeAt(r-2)!==95||e.charCodeAt(r-3)!==111||e.charCodeAt(r-4)!==116||e.charCodeAt(r-5)!==111||e.charCodeAt(r-6)!==114||e.charCodeAt(r-7)!==112||e.charCodeAt(r-8)!==95||e.charCodeAt(r-9)!==95){return false}for(var n=r-10;n>=0;n--){if(e.charCodeAt(n)!==36){return false}}return true}function compareByOriginalPositions(e,r,n){var t=strcmp(e.source,r.source);if(t!==0){return t}t=e.originalLine-r.originalLine;if(t!==0){return t}t=e.originalColumn-r.originalColumn;if(t!==0||n){return t}t=e.generatedColumn-r.generatedColumn;if(t!==0){return t}t=e.generatedLine-r.generatedLine;if(t!==0){return t}return strcmp(e.name,r.name)}r.compareByOriginalPositions=compareByOriginalPositions;function compareByGeneratedPositionsDeflated(e,r,n){var t=e.generatedLine-r.generatedLine;if(t!==0){return t}t=e.generatedColumn-r.generatedColumn;if(t!==0||n){return t}t=strcmp(e.source,r.source);if(t!==0){return t}t=e.originalLine-r.originalLine;if(t!==0){return t}t=e.originalColumn-r.originalColumn;if(t!==0){return t}return strcmp(e.name,r.name)}r.compareByGeneratedPositionsDeflated=compareByGeneratedPositionsDeflated;function strcmp(e,r){if(e===r){return 0}if(e===null){return 1}if(r===null){return-1}if(e>r){return 1}return-1}function compareByGeneratedPositionsInflated(e,r){var n=e.generatedLine-r.generatedLine;if(n!==0){return n}n=e.generatedColumn-r.generatedColumn;if(n!==0){return n}n=strcmp(e.source,r.source);if(n!==0){return n}n=e.originalLine-r.originalLine;if(n!==0){return n}n=e.originalColumn-r.originalColumn;if(n!==0){return n}return strcmp(e.name,r.name)}r.compareByGeneratedPositionsInflated=compareByGeneratedPositionsInflated;function parseSourceMapInput(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))}r.parseSourceMapInput=parseSourceMapInput;function computeSourceURL(e,r,n){r=r||"";if(e){if(e[e.length-1]!=="/"&&r[0]!=="/"){e+="/"}r=e+r}if(n){var t=urlParse(n);if(!t){throw new Error("sourceMapURL could not be parsed")}if(t.path){var o=t.path.lastIndexOf("/");if(o>=0){t.path=t.path.substring(0,o+1)}}r=join(urlGenerate(t),r)}return normalize(r)}r.computeSourceURL=computeSourceURL},997:(e,r,n)=>{n(591).h;r.SourceMapConsumer=n(952).SourceMapConsumer;n(351)},284:(e,r,n)=>{e=n.nmd(e);var t=n(997).SourceMapConsumer;var o=n(17);var i;try{i=n(147);if(!i.existsSync||!i.readFileSync){i=null}}catch(e){}var a=n(650);function dynamicRequire(e,r){return e.require(r)}var u=false;var s=false;var l=false;var c="auto";var p={};var f={};var g=/^data:application\/json[^,]+base64,/;var h=[];var d=[];function isInBrowser(){if(c==="browser")return true;if(c==="node")return false;return typeof window!=="undefined"&&typeof XMLHttpRequest==="function"&&!(window.require&&window.module&&window.process&&window.process.type==="renderer")}function hasGlobalProcessEventEmitter(){return typeof process==="object"&&process!==null&&typeof process.on==="function"}function globalProcessVersion(){if(typeof process==="object"&&process!==null){return process.version}else{return""}}function globalProcessStderr(){if(typeof process==="object"&&process!==null){return process.stderr}}function globalProcessExit(e){if(typeof process==="object"&&process!==null&&typeof process.exit==="function"){return process.exit(e)}}function handlerExec(e){return function(r){for(var n=0;n"}var n=this.getLineNumber();if(n!=null){r+=":"+n;var t=this.getColumnNumber();if(t){r+=":"+t}}}var o="";var i=this.getFunctionName();var a=true;var u=this.isConstructor();var s=!(this.isToplevel()||u);if(s){var l=this.getTypeName();if(l==="[object Object]"){l="null"}var c=this.getMethodName();if(i){if(l&&i.indexOf(l)!=0){o+=l+"."}o+=i;if(c&&i.indexOf("."+c)!=i.length-c.length-1){o+=" [as "+c+"]"}}else{o+=l+"."+(c||"")}}else if(u){o+="new "+(i||"")}else if(i){o+=i}else{o+=r;a=false}if(a){o+=" ("+r+")"}return o}function cloneCallSite(e){var r={};Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((function(n){r[n]=/^(?:is|get)/.test(n)?function(){return e[n].call(e)}:e[n]}));r.toString=CallSiteToString;return r}function wrapCallSite(e,r){if(r===undefined){r={nextPosition:null,curPosition:null}}if(e.isNative()){r.curPosition=null;return e}var n=e.getFileName()||e.getScriptNameOrSourceURL();if(n){var t=e.getLineNumber();var o=e.getColumnNumber()-1;var i=/^v(10\.1[6-9]|10\.[2-9][0-9]|10\.[0-9]{3,}|1[2-9]\d*|[2-9]\d|\d{3,}|11\.11)/;var a=i.test(globalProcessVersion())?0:62;if(t===1&&o>a&&!isInBrowser()&&!e.isEval()){o-=a}var u=mapSourcePosition({source:n,line:t,column:o});r.curPosition=u;e=cloneCallSite(e);var s=e.getFunctionName;e.getFunctionName=function(){if(r.nextPosition==null){return s()}return r.nextPosition.name||s()};e.getFileName=function(){return u.source};e.getLineNumber=function(){return u.line};e.getColumnNumber=function(){return u.column+1};e.getScriptNameOrSourceURL=function(){return u.source};return e}var l=e.isEval()&&e.getEvalOrigin();if(l){l=mapEvalOrigin(l);e=cloneCallSite(e);e.getEvalOrigin=function(){return l};return e}return e}function prepareStackTrace(e,r){if(l){p={};f={}}var n=e.name||"Error";var t=e.message||"";var o=n+": "+t;var i={nextPosition:null,curPosition:null};var a=[];for(var u=r.length-1;u>=0;u--){a.push("\n at "+wrapCallSite(r[u],i));i.nextPosition=i.curPosition}i.curPosition=i.nextPosition=null;return o+a.reverse().join("")}function getErrorSource(e){var r=/\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(e.stack);if(r){var n=r[1];var t=+r[2];var o=+r[3];var a=p[n];if(!a&&i&&i.existsSync(n)){try{a=i.readFileSync(n,"utf8")}catch(e){a=""}}if(a){var u=a.split(/(?:\r\n|\r|\n)/)[t-1];if(u){return n+":"+t+"\n"+u+"\n"+new Array(o).join(" ")+"^"}}}return null}function printErrorAndExit(e){var r=getErrorSource(e);var n=globalProcessStderr();if(n&&n._handle&&n._handle.setBlocking){n._handle.setBlocking(true)}if(r){console.error();console.error(r)}console.error(e.stack);globalProcessExit(1)}function shimEmitUncaughtException(){var e=process.emit;process.emit=function(r){if(r==="uncaughtException"){var n=arguments[1]&&arguments[1].stack;var t=this.listeners(r).length>0;if(n&&!t){return printErrorAndExit(arguments[1])}}return e.apply(this,arguments)}}var S=h.slice(0);var _=d.slice(0);r.wrapCallSite=wrapCallSite;r.getErrorSource=getErrorSource;r.mapSourcePosition=mapSourcePosition;r.retrieveSourceMap=v;r.install=function(r){r=r||{};if(r.environment){c=r.environment;if(["node","browser","auto"].indexOf(c)===-1){throw new Error("environment "+c+" was unknown. Available options are {auto, browser, node}")}}if(r.retrieveFile){if(r.overrideRetrieveFile){h.length=0}h.unshift(r.retrieveFile)}if(r.retrieveSourceMap){if(r.overrideRetrieveSourceMap){d.length=0}d.unshift(r.retrieveSourceMap)}if(r.hookRequire&&!isInBrowser()){var n=dynamicRequire(e,"module");var t=n.prototype._compile;if(!t.__sourceMapSupport){n.prototype._compile=function(e,r){p[r]=e;f[r]=undefined;return t.call(this,e,r)};n.prototype._compile.__sourceMapSupport=true}}if(!l){l="emptyCacheBetweenOperations"in r?r.emptyCacheBetweenOperations:false}if(!u){u=true;Error.prepareStackTrace=prepareStackTrace}if(!s){var o="handleUncaughtExceptions"in r?r.handleUncaughtExceptions:true;try{var i=dynamicRequire(e,"worker_threads");if(i.isMainThread===false){o=false}}catch(e){}if(o&&hasGlobalProcessEventEmitter()){s=true;shimEmitUncaughtException()}}};r.resetRetrieveHandlers=function(){h.length=0;d.length=0;h=S.slice(0);d=_.slice(0);v=handlerExec(d);m=handlerExec(h)}},147:e=>{"use strict";e.exports=require("fs")},17:e=>{"use strict";e.exports=require("path")}};var r={};function __webpack_require__(n){var t=r[n];if(t!==undefined){return t.exports}var o=r[n]={id:n,loaded:false,exports:{}};var i=true;try{e[n](o,o.exports,__webpack_require__);i=false}finally{if(i)delete r[n]}o.loaded=true;return o.exports}(()=>{__webpack_require__.nmd=e=>{e.paths=[];if(!e.children)e.children=[];return e}})();if(typeof __webpack_require__!=="undefined")__webpack_require__.ab=__dirname+"/";var n={};(()=>{__webpack_require__(284).install()})();module.exports=n})(); -------------------------------------------------------------------------------- /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/github 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/http-client 26 | MIT 27 | Actions Http Client for Node.js 28 | 29 | Copyright (c) GitHub, Inc. 30 | 31 | All rights reserved. 32 | 33 | MIT License 34 | 35 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 36 | associated documentation files (the "Software"), to deal in the Software without restriction, 37 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 38 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 39 | subject to the following conditions: 40 | 41 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 42 | 43 | THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 44 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN 45 | NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 46 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 47 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 48 | 49 | 50 | @octokit/auth-token 51 | MIT 52 | The MIT License 53 | 54 | Copyright (c) 2019 Octokit contributors 55 | 56 | Permission is hereby granted, free of charge, to any person obtaining a copy 57 | of this software and associated documentation files (the "Software"), to deal 58 | in the Software without restriction, including without limitation the rights 59 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 60 | copies of the Software, and to permit persons to whom the Software is 61 | furnished to do so, subject to the following conditions: 62 | 63 | The above copyright notice and this permission notice shall be included in 64 | all copies or substantial portions of the Software. 65 | 66 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 67 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 68 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 69 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 70 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 71 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 72 | THE SOFTWARE. 73 | 74 | 75 | @octokit/core 76 | MIT 77 | The MIT License 78 | 79 | Copyright (c) 2019 Octokit contributors 80 | 81 | Permission is hereby granted, free of charge, to any person obtaining a copy 82 | of this software and associated documentation files (the "Software"), to deal 83 | in the Software without restriction, including without limitation the rights 84 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 85 | copies of the Software, and to permit persons to whom the Software is 86 | furnished to do so, subject to the following conditions: 87 | 88 | The above copyright notice and this permission notice shall be included in 89 | all copies or substantial portions of the Software. 90 | 91 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 92 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 93 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 94 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 95 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 96 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 97 | THE SOFTWARE. 98 | 99 | 100 | @octokit/endpoint 101 | MIT 102 | The MIT License 103 | 104 | Copyright (c) 2018 Octokit contributors 105 | 106 | Permission is hereby granted, free of charge, to any person obtaining a copy 107 | of this software and associated documentation files (the "Software"), to deal 108 | in the Software without restriction, including without limitation the rights 109 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 110 | copies of the Software, and to permit persons to whom the Software is 111 | furnished to do so, subject to the following conditions: 112 | 113 | The above copyright notice and this permission notice shall be included in 114 | all copies or substantial portions of the Software. 115 | 116 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 117 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 118 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 119 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 120 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 121 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 122 | THE SOFTWARE. 123 | 124 | 125 | @octokit/graphql 126 | MIT 127 | The MIT License 128 | 129 | Copyright (c) 2018 Octokit contributors 130 | 131 | Permission is hereby granted, free of charge, to any person obtaining a copy 132 | of this software and associated documentation files (the "Software"), to deal 133 | in the Software without restriction, including without limitation the rights 134 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 135 | copies of the Software, and to permit persons to whom the Software is 136 | furnished to do so, subject to the following conditions: 137 | 138 | The above copyright notice and this permission notice shall be included in 139 | all copies or substantial portions of the Software. 140 | 141 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 142 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 143 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 144 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 145 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 146 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 147 | THE SOFTWARE. 148 | 149 | 150 | @octokit/plugin-paginate-rest 151 | MIT 152 | MIT License Copyright (c) 2019 Octokit contributors 153 | 154 | 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: 155 | 156 | The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. 157 | 158 | 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. 159 | 160 | 161 | @octokit/plugin-rest-endpoint-methods 162 | MIT 163 | MIT License Copyright (c) 2019 Octokit contributors 164 | 165 | 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: 166 | 167 | The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. 168 | 169 | 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. 170 | 171 | 172 | @octokit/request 173 | MIT 174 | The MIT License 175 | 176 | Copyright (c) 2018 Octokit contributors 177 | 178 | Permission is hereby granted, free of charge, to any person obtaining a copy 179 | of this software and associated documentation files (the "Software"), to deal 180 | in the Software without restriction, including without limitation the rights 181 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 182 | copies of the Software, and to permit persons to whom the Software is 183 | furnished to do so, subject to the following conditions: 184 | 185 | The above copyright notice and this permission notice shall be included in 186 | all copies or substantial portions of the Software. 187 | 188 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 189 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 190 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 191 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 192 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 193 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 194 | THE SOFTWARE. 195 | 196 | 197 | @octokit/request-error 198 | MIT 199 | The MIT License 200 | 201 | Copyright (c) 2019 Octokit contributors 202 | 203 | Permission is hereby granted, free of charge, to any person obtaining a copy 204 | of this software and associated documentation files (the "Software"), to deal 205 | in the Software without restriction, including without limitation the rights 206 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 207 | copies of the Software, and to permit persons to whom the Software is 208 | furnished to do so, subject to the following conditions: 209 | 210 | The above copyright notice and this permission notice shall be included in 211 | all copies or substantial portions of the Software. 212 | 213 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 214 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 215 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 216 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 217 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 218 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 219 | THE SOFTWARE. 220 | 221 | 222 | @vercel/ncc 223 | MIT 224 | Copyright 2018 ZEIT, Inc. 225 | 226 | 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: 227 | 228 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 229 | 230 | 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. 231 | 232 | asynckit 233 | MIT 234 | The MIT License (MIT) 235 | 236 | Copyright (c) 2016 Alex Indigo 237 | 238 | Permission is hereby granted, free of charge, to any person obtaining a copy 239 | of this software and associated documentation files (the "Software"), to deal 240 | in the Software without restriction, including without limitation the rights 241 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 242 | copies of the Software, and to permit persons to whom the Software is 243 | furnished to do so, subject to the following conditions: 244 | 245 | The above copyright notice and this permission notice shall be included in all 246 | copies or substantial portions of the Software. 247 | 248 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 249 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 250 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 251 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 252 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 253 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 254 | SOFTWARE. 255 | 256 | 257 | axios 258 | MIT 259 | # Copyright (c) 2014-present Matt Zabriskie & Collaborators 260 | 261 | 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: 262 | 263 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 264 | 265 | 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. 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 | combined-stream 474 | MIT 475 | Copyright (c) 2011 Debuggable Limited 476 | 477 | Permission is hereby granted, free of charge, to any person obtaining a copy 478 | of this software and associated documentation files (the "Software"), to deal 479 | in the Software without restriction, including without limitation the rights 480 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 481 | copies of the Software, and to permit persons to whom the Software is 482 | furnished to do so, subject to the following conditions: 483 | 484 | The above copyright notice and this permission notice shall be included in 485 | all copies or substantial portions of the Software. 486 | 487 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 488 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 489 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 490 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 491 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 492 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 493 | THE SOFTWARE. 494 | 495 | 496 | debug 497 | MIT 498 | (The MIT License) 499 | 500 | Copyright (c) 2014-2017 TJ Holowaychuk 501 | Copyright (c) 2018-2021 Josh Junon 502 | 503 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software 504 | and associated documentation files (the 'Software'), to deal in the Software without restriction, 505 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 506 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 507 | subject to the following conditions: 508 | 509 | The above copyright notice and this permission notice shall be included in all copies or substantial 510 | portions of the Software. 511 | 512 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 513 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 514 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 515 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 516 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 517 | 518 | 519 | 520 | delayed-stream 521 | MIT 522 | Copyright (c) 2011 Debuggable Limited 523 | 524 | Permission is hereby granted, free of charge, to any person obtaining a copy 525 | of this software and associated documentation files (the "Software"), to deal 526 | in the Software without restriction, including without limitation the rights 527 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 528 | copies of the Software, and to permit persons to whom the Software is 529 | furnished to do so, subject to the following conditions: 530 | 531 | The above copyright notice and this permission notice shall be included in 532 | all copies or substantial portions of the Software. 533 | 534 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 535 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 536 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 537 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 538 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 539 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 540 | THE SOFTWARE. 541 | 542 | 543 | deprecation 544 | ISC 545 | The ISC License 546 | 547 | Copyright (c) Gregor Martynus and contributors 548 | 549 | Permission to use, copy, modify, and/or distribute this software for any 550 | purpose with or without fee is hereby granted, provided that the above 551 | copyright notice and this permission notice appear in all copies. 552 | 553 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 554 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 555 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 556 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 557 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 558 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 559 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 560 | 561 | 562 | follow-redirects 563 | MIT 564 | Copyright 2014–present Olivier Lalonde , James Talmage , Ruben Verborgh 565 | 566 | Permission is hereby granted, free of charge, to any person obtaining a copy of 567 | this software and associated documentation files (the "Software"), to deal in 568 | the Software without restriction, including without limitation the rights to 569 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 570 | of the Software, and to permit persons to whom the Software is furnished to do 571 | so, subject to the following conditions: 572 | 573 | The above copyright notice and this permission notice shall be included in all 574 | copies or substantial portions of the Software. 575 | 576 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 577 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 578 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 579 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 580 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 581 | IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 582 | 583 | 584 | form-data 585 | MIT 586 | Copyright (c) 2012 Felix Geisendörfer (felix@debuggable.com) and contributors 587 | 588 | Permission is hereby granted, free of charge, to any person obtaining a copy 589 | of this software and associated documentation files (the "Software"), to deal 590 | in the Software without restriction, including without limitation the rights 591 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 592 | copies of the Software, and to permit persons to whom the Software is 593 | furnished to do so, subject to the following conditions: 594 | 595 | The above copyright notice and this permission notice shall be included in 596 | all copies or substantial portions of the Software. 597 | 598 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 599 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 600 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 601 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 602 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 603 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 604 | THE SOFTWARE. 605 | 606 | 607 | has-flag 608 | MIT 609 | MIT License 610 | 611 | Copyright (c) Sindre Sorhus (sindresorhus.com) 612 | 613 | 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: 614 | 615 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 616 | 617 | 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. 618 | 619 | 620 | is-plain-object 621 | MIT 622 | The MIT License (MIT) 623 | 624 | Copyright (c) 2014-2017, Jon Schlinkert. 625 | 626 | Permission is hereby granted, free of charge, to any person obtaining a copy 627 | of this software and associated documentation files (the "Software"), to deal 628 | in the Software without restriction, including without limitation the rights 629 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 630 | copies of the Software, and to permit persons to whom the Software is 631 | furnished to do so, subject to the following conditions: 632 | 633 | The above copyright notice and this permission notice shall be included in 634 | all copies or substantial portions of the Software. 635 | 636 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 637 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 638 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 639 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 640 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 641 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 642 | THE SOFTWARE. 643 | 644 | 645 | mime-db 646 | MIT 647 | (The MIT License) 648 | 649 | Copyright (c) 2014 Jonathan Ong 650 | Copyright (c) 2015-2022 Douglas Christopher Wilson 651 | 652 | Permission is hereby granted, free of charge, to any person obtaining 653 | a copy of this software and associated documentation files (the 654 | 'Software'), to deal in the Software without restriction, including 655 | without limitation the rights to use, copy, modify, merge, publish, 656 | distribute, sublicense, and/or sell copies of the Software, and to 657 | permit persons to whom the Software is furnished to do so, subject to 658 | the following conditions: 659 | 660 | The above copyright notice and this permission notice shall be 661 | included in all copies or substantial portions of the Software. 662 | 663 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 664 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 665 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 666 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 667 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 668 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 669 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 670 | 671 | 672 | mime-types 673 | MIT 674 | (The MIT License) 675 | 676 | Copyright (c) 2014 Jonathan Ong 677 | Copyright (c) 2015 Douglas Christopher Wilson 678 | 679 | Permission is hereby granted, free of charge, to any person obtaining 680 | a copy of this software and associated documentation files (the 681 | 'Software'), to deal in the Software without restriction, including 682 | without limitation the rights to use, copy, modify, merge, publish, 683 | distribute, sublicense, and/or sell copies of the Software, and to 684 | permit persons to whom the Software is furnished to do so, subject to 685 | the following conditions: 686 | 687 | The above copyright notice and this permission notice shall be 688 | included in all copies or substantial portions of the Software. 689 | 690 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 691 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 692 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 693 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 694 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 695 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 696 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 697 | 698 | 699 | ms 700 | MIT 701 | The MIT License (MIT) 702 | 703 | Copyright (c) 2016 Zeit, Inc. 704 | 705 | Permission is hereby granted, free of charge, to any person obtaining a copy 706 | of this software and associated documentation files (the "Software"), to deal 707 | in the Software without restriction, including without limitation the rights 708 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 709 | copies of the Software, and to permit persons to whom the Software is 710 | furnished to do so, subject to the following conditions: 711 | 712 | The above copyright notice and this permission notice shall be included in all 713 | copies or substantial portions of the Software. 714 | 715 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 716 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 717 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 718 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 719 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 720 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 721 | SOFTWARE. 722 | 723 | 724 | node-fetch 725 | MIT 726 | The MIT License (MIT) 727 | 728 | Copyright (c) 2016 David Frank 729 | 730 | Permission is hereby granted, free of charge, to any person obtaining a copy 731 | of this software and associated documentation files (the "Software"), to deal 732 | in the Software without restriction, including without limitation the rights 733 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 734 | copies of the Software, and to permit persons to whom the Software is 735 | furnished to do so, subject to the following conditions: 736 | 737 | The above copyright notice and this permission notice shall be included in all 738 | copies or substantial portions of the Software. 739 | 740 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 741 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 742 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 743 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 744 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 745 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 746 | SOFTWARE. 747 | 748 | 749 | 750 | once 751 | ISC 752 | The ISC License 753 | 754 | Copyright (c) Isaac Z. Schlueter and Contributors 755 | 756 | Permission to use, copy, modify, and/or distribute this software for any 757 | purpose with or without fee is hereby granted, provided that the above 758 | copyright notice and this permission notice appear in all copies. 759 | 760 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 761 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 762 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 763 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 764 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 765 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 766 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 767 | 768 | 769 | openai 770 | MIT 771 | The MIT License 772 | 773 | Copyright (c) OpenAI (https://openai.com) 774 | 775 | Permission is hereby granted, free of charge, to any person obtaining a copy 776 | of this software and associated documentation files (the "Software"), to deal 777 | in the Software without restriction, including without limitation the rights 778 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 779 | copies of the Software, and to permit persons to whom the Software is 780 | furnished to do so, subject to the following conditions: 781 | 782 | The above copyright notice and this permission notice shall be included in 783 | all copies or substantial portions of the Software. 784 | 785 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 786 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 787 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 788 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 789 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 790 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 791 | THE SOFTWARE. 792 | 793 | 794 | proxy-from-env 795 | MIT 796 | The MIT License 797 | 798 | Copyright (C) 2016-2018 Rob Wu 799 | 800 | Permission is hereby granted, free of charge, to any person obtaining a copy of 801 | this software and associated documentation files (the "Software"), to deal in 802 | the Software without restriction, including without limitation the rights to 803 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 804 | of the Software, and to permit persons to whom the Software is furnished to do 805 | so, subject to the following conditions: 806 | 807 | The above copyright notice and this permission notice shall be included in all 808 | copies or substantial portions of the Software. 809 | 810 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 811 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 812 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 813 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 814 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 815 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 816 | 817 | 818 | supports-color 819 | MIT 820 | MIT License 821 | 822 | Copyright (c) Sindre Sorhus (sindresorhus.com) 823 | 824 | 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: 825 | 826 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 827 | 828 | 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. 829 | 830 | 831 | tr46 832 | MIT 833 | 834 | tunnel 835 | MIT 836 | The MIT License (MIT) 837 | 838 | Copyright (c) 2012 Koichi Kobayashi 839 | 840 | Permission is hereby granted, free of charge, to any person obtaining a copy 841 | of this software and associated documentation files (the "Software"), to deal 842 | in the Software without restriction, including without limitation the rights 843 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 844 | copies of the Software, and to permit persons to whom the Software is 845 | furnished to do so, subject to the following conditions: 846 | 847 | The above copyright notice and this permission notice shall be included in 848 | all copies or substantial portions of the Software. 849 | 850 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 851 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 852 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 853 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 854 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 855 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 856 | THE SOFTWARE. 857 | 858 | 859 | universal-user-agent 860 | ISC 861 | # [ISC License](https://spdx.org/licenses/ISC) 862 | 863 | Copyright (c) 2018, Gregor Martynus (https://github.com/gr2m) 864 | 865 | 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. 866 | 867 | 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. 868 | 869 | 870 | uuid 871 | MIT 872 | The MIT License (MIT) 873 | 874 | Copyright (c) 2010-2020 Robert Kieffer and other contributors 875 | 876 | 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: 877 | 878 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 879 | 880 | 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. 881 | 882 | 883 | webidl-conversions 884 | BSD-2-Clause 885 | # The BSD 2-Clause License 886 | 887 | Copyright (c) 2014, Domenic Denicola 888 | All rights reserved. 889 | 890 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 891 | 892 | 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 893 | 894 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 895 | 896 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 897 | 898 | 899 | whatwg-url 900 | MIT 901 | The MIT License (MIT) 902 | 903 | Copyright (c) 2015–2016 Sebastian Mayr 904 | 905 | Permission is hereby granted, free of charge, to any person obtaining a copy 906 | of this software and associated documentation files (the "Software"), to deal 907 | in the Software without restriction, including without limitation the rights 908 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 909 | copies of the Software, and to permit persons to whom the Software is 910 | furnished to do so, subject to the following conditions: 911 | 912 | The above copyright notice and this permission notice shall be included in 913 | all copies or substantial portions of the Software. 914 | 915 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 916 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 917 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 918 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 919 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 920 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 921 | THE SOFTWARE. 922 | 923 | 924 | wrappy 925 | ISC 926 | The ISC License 927 | 928 | Copyright (c) Isaac Z. Schlueter and Contributors 929 | 930 | Permission to use, copy, modify, and/or distribute this software for any 931 | purpose with or without fee is hereby granted, provided that the above 932 | copyright notice and this permission notice appear in all copies. 933 | 934 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 935 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 936 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 937 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 938 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 939 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 940 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 941 | --------------------------------------------------------------------------------