From 3b8f0af9f98995566f19cb1162d63c995b95d1f7 Mon Sep 17 00:00:00 2001 From: Jeri Peier Date: Wed, 19 Jan 2022 11:51:52 +0100 Subject: [PATCH] chore(angular): sync angular components commits in github issue (#1054) --- .../angular-components-sync-workflow.yml | 23 + package.json | 1 + scripts/angular-components-sync-test.ts | 621 ++++++++++++++++++ scripts/angular-components-sync.ts | 194 ++++++ yarn.lock | 173 ++++- 5 files changed, 1007 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/angular-components-sync-workflow.yml create mode 100644 scripts/angular-components-sync-test.ts create mode 100644 scripts/angular-components-sync.ts diff --git a/.github/workflows/angular-components-sync-workflow.yml b/.github/workflows/angular-components-sync-workflow.yml new file mode 100644 index 0000000000..8c8b494432 --- /dev/null +++ b/.github/workflows/angular-components-sync-workflow.yml @@ -0,0 +1,23 @@ +name: Angular Components Sync +on: + schedule: + # * is a special character in YAML so you have to quote this string + - cron: '0 7 * * *' + +jobs: + update-issue: + runs-on: ubuntu-latest + steps: + - name: Shallow checkout + uses: actions/checkout@v2 + with: + fetch-depth: 1 + - uses: actions/setup-node@v1 + with: + node-version: 16 + + - name: "Yarn: Install global dependencies" + run: yarn global add typescript ts-node + + - name: "Execute Angular Components Sync" + run: ts-node scripts/angular-components-sync.ts diff --git a/package.json b/package.json index 906e14f197..c831e29779 100644 --- a/package.json +++ b/package.json @@ -134,6 +134,7 @@ "marked": "^2.0.3", "minimist": "^1.2.2", "npm-run-all": "^4.1.5", + "octokit": "^1.7.1", "prettier": "2.5.1", "protractor": "~7.0.0", "requirejs": "2.3.6", diff --git a/scripts/angular-components-sync-test.ts b/scripts/angular-components-sync-test.ts new file mode 100644 index 0000000000..3df825b01a --- /dev/null +++ b/scripts/angular-components-sync-test.ts @@ -0,0 +1,621 @@ +import { Octokit } from 'octokit'; + +import { AngularComponentsSync } from './angular-components-sync'; + +const commitList = [ + { + sha: '667a555edff9422b879dd401ac53ce2d279ee1a4', + node_id: 'C_kwDOAuvuAtoAKDY2N2E1NTVlZGZmOTQyMmI4NzlkZDQwMWFjNTNjZTJkMjc5ZWUxYTQ', + commit: { + author: { + name: 'Kristiyan Kostadinov', + email: 'crisbeto@users.noreply.github.com', + date: '2022-01-17T14:06:13Z', + }, + committer: { + name: 'GitHub', + email: 'noreply@github.com', + date: '2022-01-17T14:06:13Z', + }, + message: + 'refactor: enable useUnknownInCatchVariables compiler option (#24215)\n\nEnables the `useUnknownInCatchVariables` compiler option and fixes a couple of errors.', + tree: { + sha: 'bb456645791bd10f62aa0d10e79af34e3245056f', + url: 'https://api.github.com/repos/angular/components/git/trees/bb456645791bd10f62aa0d10e79af34e3245056f', + }, + url: 'https://api.github.com/repos/angular/components/git/commits/667a555edff9422b879dd401ac53ce2d279ee1a4', + comment_count: 0, + verification: { + verified: true, + reason: 'valid', + signature: + '-----BEGIN PGP SIGNATURE-----\n\nwsBcBAABCAAQBQJh5XfVCRBK7hj4Ov3rIwAAP5kIAC6E8xAfSjL1bxNc6S+mahZp\np9I76HVglwtWJuab1AbOOH80N/VuNQycY/OmPfc0MxuB5gp2FwdIcj84qs/14p7y\nuoYO8CQbU9R3K9FDnTif8NLjllIcdvRqblCEfjIcCh98mDlJlY4sJZCAqMbainyH\nVCH5pY3qWmpGByDMcNmDA15jZv9uKjzHBSJya2R6tuFRucRSLzC7ao9o6wJm1rkr\nX9ZjPxt7RA6H5XdQF60GfkaOoWN1ZabGk9oUNC95qBA1ncqDBMbZLNh5WTx88Sru\nrdApnRQfj6xMWh7rTwtLKxj809FaaZWhIBjsfnNhz5MQ9vbRKKh8EAtsasV4HEQ=\n=Q8a2\n-----END PGP SIGNATURE-----\n', + payload: + 'tree bb456645791bd10f62aa0d10e79af34e3245056f\nparent f63d669977282c4490f88a093580618a81b5bb9d\nauthor Kristiyan Kostadinov 1642428373 +0100\ncommitter GitHub 1642428373 +0000\n\nrefactor: enable useUnknownInCatchVariables compiler option (#24215)\n\nEnables the `useUnknownInCatchVariables` compiler option and fixes a couple of errors.', + }, + }, + url: 'https://api.github.com/repos/angular/components/commits/667a555edff9422b879dd401ac53ce2d279ee1a4', + html_url: + 'https://github.com/angular/components/commit/667a555edff9422b879dd401ac53ce2d279ee1a4', + comments_url: + 'https://api.github.com/repos/angular/components/commits/667a555edff9422b879dd401ac53ce2d279ee1a4/comments', + author: { + login: 'crisbeto', + id: 4450522, + node_id: 'MDQ6VXNlcjQ0NTA1MjI=', + avatar_url: 'https://avatars.githubusercontent.com/u/4450522?v=4', + gravatar_id: '', + url: 'https://api.github.com/users/crisbeto', + html_url: 'https://github.com/crisbeto', + followers_url: 'https://api.github.com/users/crisbeto/followers', + following_url: 'https://api.github.com/users/crisbeto/following{/other_user}', + gists_url: 'https://api.github.com/users/crisbeto/gists{/gist_id}', + starred_url: 'https://api.github.com/users/crisbeto/starred{/owner}{/repo}', + subscriptions_url: 'https://api.github.com/users/crisbeto/subscriptions', + organizations_url: 'https://api.github.com/users/crisbeto/orgs', + repos_url: 'https://api.github.com/users/crisbeto/repos', + events_url: 'https://api.github.com/users/crisbeto/events{/privacy}', + received_events_url: 'https://api.github.com/users/crisbeto/received_events', + type: 'User', + site_admin: false, + }, + committer: { + login: 'web-flow', + id: 19864447, + node_id: 'MDQ6VXNlcjE5ODY0NDQ3', + avatar_url: 'https://avatars.githubusercontent.com/u/19864447?v=4', + gravatar_id: '', + url: 'https://api.github.com/users/web-flow', + html_url: 'https://github.com/web-flow', + followers_url: 'https://api.github.com/users/web-flow/followers', + following_url: 'https://api.github.com/users/web-flow/following{/other_user}', + gists_url: 'https://api.github.com/users/web-flow/gists{/gist_id}', + starred_url: 'https://api.github.com/users/web-flow/starred{/owner}{/repo}', + subscriptions_url: 'https://api.github.com/users/web-flow/subscriptions', + organizations_url: 'https://api.github.com/users/web-flow/orgs', + repos_url: 'https://api.github.com/users/web-flow/repos', + events_url: 'https://api.github.com/users/web-flow/events{/privacy}', + received_events_url: 'https://api.github.com/users/web-flow/received_events', + type: 'User', + site_admin: false, + }, + parents: [ + { + sha: 'f63d669977282c4490f88a093580618a81b5bb9d', + url: 'https://api.github.com/repos/angular/components/commits/f63d669977282c4490f88a093580618a81b5bb9d', + html_url: + 'https://github.com/angular/components/commit/f63d669977282c4490f88a093580618a81b5bb9d', + }, + ], + }, + { + sha: 'f63d669977282c4490f88a093580618a81b5bb9d', + node_id: 'C_kwDOAuvuAtoAKGY2M2Q2Njk5NzcyODJjNDQ5MGY4OGEwOTM1ODA2MThhODFiNWJiOWQ', + commit: { + author: { + name: 'Kristiyan Kostadinov', + email: 'crisbeto@users.noreply.github.com', + date: '2022-01-17T14:05:27Z', + }, + committer: { + name: 'GitHub', + email: 'noreply@github.com', + date: '2022-01-17T14:05:27Z', + }, + message: + 'build: add missing test (#24219)\n\nFixes a failure in the lint check due to a missing unit test.', + tree: { + sha: '281fdd0db5037917951279c4142bacda698e5fa7', + url: 'https://api.github.com/repos/angular/components/git/trees/281fdd0db5037917951279c4142bacda698e5fa7', + }, + url: 'https://api.github.com/repos/angular/components/git/commits/f63d669977282c4490f88a093580618a81b5bb9d', + comment_count: 0, + verification: { + verified: true, + reason: 'valid', + signature: + '-----BEGIN PGP SIGNATURE-----\n\nwsBcBAABCAAQBQJh5XenCRBK7hj4Ov3rIwAAjBYIADQ8td7owVMFLmjuzKEEpvrf\njGWUEVd4mygzqtB1lkUt/pW4lLskk3PAJhBPyjVRxYLeeWcghPwSI8NHOsKhW3ZJ\nellFfd39niu4r7ApCkSlSALkqyn28UpUYOCzYZghaPA7n1B1wrHevfsaDrLcg1Pb\n2TaFVB9wisChzr17NwbO9cpvvXMdjxs4dWjphxdym62jgY5R2qaPscaKSQSXZlzo\nyMwaWLpMBnPNeeDFU/akje87r20AXpb2IbOe/PQc23BDINTO4k2J+VHOYsXZO8SA\nWpliPK83To9u/pDVkdZvRN7M1eYWWKhhESHC7FCzY7XK//3GMLneJeXPw0i73wI=\n=B1qv\n-----END PGP SIGNATURE-----\n', + payload: + 'tree 281fdd0db5037917951279c4142bacda698e5fa7\nparent 99c611219181b8014a6ed4c585939eda9a97f7f5\nauthor Kristiyan Kostadinov 1642428327 +0100\ncommitter GitHub 1642428327 +0000\n\nbuild: add missing test (#24219)\n\nFixes a failure in the lint check due to a missing unit test.', + }, + }, + url: 'https://api.github.com/repos/angular/components/commits/f63d669977282c4490f88a093580618a81b5bb9d', + html_url: + 'https://github.com/angular/components/commit/f63d669977282c4490f88a093580618a81b5bb9d', + comments_url: + 'https://api.github.com/repos/angular/components/commits/f63d669977282c4490f88a093580618a81b5bb9d/comments', + author: { + login: 'crisbeto', + id: 4450522, + node_id: 'MDQ6VXNlcjQ0NTA1MjI=', + avatar_url: 'https://avatars.githubusercontent.com/u/4450522?v=4', + gravatar_id: '', + url: 'https://api.github.com/users/crisbeto', + html_url: 'https://github.com/crisbeto', + followers_url: 'https://api.github.com/users/crisbeto/followers', + following_url: 'https://api.github.com/users/crisbeto/following{/other_user}', + gists_url: 'https://api.github.com/users/crisbeto/gists{/gist_id}', + starred_url: 'https://api.github.com/users/crisbeto/starred{/owner}{/repo}', + subscriptions_url: 'https://api.github.com/users/crisbeto/subscriptions', + organizations_url: 'https://api.github.com/users/crisbeto/orgs', + repos_url: 'https://api.github.com/users/crisbeto/repos', + events_url: 'https://api.github.com/users/crisbeto/events{/privacy}', + received_events_url: 'https://api.github.com/users/crisbeto/received_events', + type: 'User', + site_admin: false, + }, + committer: { + login: 'web-flow', + id: 19864447, + node_id: 'MDQ6VXNlcjE5ODY0NDQ3', + avatar_url: 'https://avatars.githubusercontent.com/u/19864447?v=4', + gravatar_id: '', + url: 'https://api.github.com/users/web-flow', + html_url: 'https://github.com/web-flow', + followers_url: 'https://api.github.com/users/web-flow/followers', + following_url: 'https://api.github.com/users/web-flow/following{/other_user}', + gists_url: 'https://api.github.com/users/web-flow/gists{/gist_id}', + starred_url: 'https://api.github.com/users/web-flow/starred{/owner}{/repo}', + subscriptions_url: 'https://api.github.com/users/web-flow/subscriptions', + organizations_url: 'https://api.github.com/users/web-flow/orgs', + repos_url: 'https://api.github.com/users/web-flow/repos', + events_url: 'https://api.github.com/users/web-flow/events{/privacy}', + received_events_url: 'https://api.github.com/users/web-flow/received_events', + type: 'User', + site_admin: false, + }, + parents: [ + { + sha: '99c611219181b8014a6ed4c585939eda9a97f7f5', + url: 'https://api.github.com/repos/angular/components/commits/99c611219181b8014a6ed4c585939eda9a97f7f5', + html_url: + 'https://github.com/angular/components/commit/99c611219181b8014a6ed4c585939eda9a97f7f5', + }, + ], + }, + { + sha: '99c611219181b8014a6ed4c585939eda9a97f7f5', + node_id: 'C_kwDOAuvuAtoAKDk5YzYxMTIxOTE4MWI4MDE0YTZlZDRjNTg1OTM5ZWRhOWE5N2Y3ZjU', + commit: { + author: { + name: 'Kristiyan Kostadinov', + email: 'crisbeto@users.noreply.github.com', + date: '2022-01-17T13:18:51Z', + }, + committer: { + name: 'GitHub', + email: 'noreply@github.com', + date: '2022-01-17T13:18:51Z', + }, + message: + 'fix(select): component value not in sync with control value on init (#18443)\n\nFixes the `MatSelect.value` property not being in sync with the `ControlValueAccessor` initial value on init.\n\nFixes #18423.', + tree: { + sha: '4ffd7654c8a5d043c180347aa507da80652345d5', + url: 'https://api.github.com/repos/angular/components/git/trees/4ffd7654c8a5d043c180347aa507da80652345d5', + }, + url: 'https://api.github.com/repos/angular/components/git/commits/99c611219181b8014a6ed4c585939eda9a97f7f5', + comment_count: 0, + verification: { + verified: true, + reason: 'valid', + signature: + '-----BEGIN PGP SIGNATURE-----\n\nwsBcBAABCAAQBQJh5Wy7CRBK7hj4Ov3rIwAApzoIAA4Kfo9uC3zDfWGXHwrDfo0y\nbLrZAfIQUtmUcQQ9ZYGllPdekOTeufiRJ6Q4ATOsIYQ6QTioiLDBn0xze5lDR4wz\nYqTT0BrXq7ean7dgpIPk/I/W3YLli8Mal9SFjm3jY+E6b/p7JxfIJ/ViCszwv7JY\n873Kig/7W19nqOe0lTtTB9CqezvM7eoAShNCTz2+2pyphkMhPcHMTshoZkKrVL2a\nWZ1WuJstb9y+BlYrzV/KogLFOade8bPdkHzPNgdF2GPBjMm4lp7WTmjAF+Oy12TU\nySgRdYOmxi4f9qLwa61NX2F4TS1rRoVtA0US3ZIRv9Ie3oR2wkdQfdkpf2lbjJQ=\n=ef/L\n-----END PGP SIGNATURE-----\n', + payload: + 'tree 4ffd7654c8a5d043c180347aa507da80652345d5\nparent 0f47b7a2a4cab4ea8f6006a2be54a3e92ec21465\nauthor Kristiyan Kostadinov 1642425531 +0100\ncommitter GitHub 1642425531 +0000\n\nfix(select): component value not in sync with control value on init (#18443)\n\nFixes the `MatSelect.value` property not being in sync with the `ControlValueAccessor` initial value on init.\n\nFixes #18423.', + }, + }, + url: 'https://api.github.com/repos/angular/components/commits/99c611219181b8014a6ed4c585939eda9a97f7f5', + html_url: + 'https://github.com/angular/components/commit/99c611219181b8014a6ed4c585939eda9a97f7f5', + comments_url: + 'https://api.github.com/repos/angular/components/commits/99c611219181b8014a6ed4c585939eda9a97f7f5/comments', + author: { + login: 'crisbeto', + id: 4450522, + node_id: 'MDQ6VXNlcjQ0NTA1MjI=', + avatar_url: 'https://avatars.githubusercontent.com/u/4450522?v=4', + gravatar_id: '', + url: 'https://api.github.com/users/crisbeto', + html_url: 'https://github.com/crisbeto', + followers_url: 'https://api.github.com/users/crisbeto/followers', + following_url: 'https://api.github.com/users/crisbeto/following{/other_user}', + gists_url: 'https://api.github.com/users/crisbeto/gists{/gist_id}', + starred_url: 'https://api.github.com/users/crisbeto/starred{/owner}{/repo}', + subscriptions_url: 'https://api.github.com/users/crisbeto/subscriptions', + organizations_url: 'https://api.github.com/users/crisbeto/orgs', + repos_url: 'https://api.github.com/users/crisbeto/repos', + events_url: 'https://api.github.com/users/crisbeto/events{/privacy}', + received_events_url: 'https://api.github.com/users/crisbeto/received_events', + type: 'User', + site_admin: false, + }, + committer: { + login: 'web-flow', + id: 19864447, + node_id: 'MDQ6VXNlcjE5ODY0NDQ3', + avatar_url: 'https://avatars.githubusercontent.com/u/19864447?v=4', + gravatar_id: '', + url: 'https://api.github.com/users/web-flow', + html_url: 'https://github.com/web-flow', + followers_url: 'https://api.github.com/users/web-flow/followers', + following_url: 'https://api.github.com/users/web-flow/following{/other_user}', + gists_url: 'https://api.github.com/users/web-flow/gists{/gist_id}', + starred_url: 'https://api.github.com/users/web-flow/starred{/owner}{/repo}', + subscriptions_url: 'https://api.github.com/users/web-flow/subscriptions', + organizations_url: 'https://api.github.com/users/web-flow/orgs', + repos_url: 'https://api.github.com/users/web-flow/repos', + events_url: 'https://api.github.com/users/web-flow/events{/privacy}', + received_events_url: 'https://api.github.com/users/web-flow/received_events', + type: 'User', + site_admin: false, + }, + parents: [ + { + sha: '0f47b7a2a4cab4ea8f6006a2be54a3e92ec21465', + url: 'https://api.github.com/repos/angular/components/commits/0f47b7a2a4cab4ea8f6006a2be54a3e92ec21465', + html_url: + 'https://github.com/angular/components/commit/0f47b7a2a4cab4ea8f6006a2be54a3e92ec21465', + }, + ], + }, + { + sha: '0f47b7a2a4cab4ea8f6006a2be54a3e92ec21465', + node_id: 'C_kwDOAuvuAtoAKDBmNDdiN2EyYTRjYWI0ZWE4ZjYwMDZhMmJlNTRhM2U5MmVjMjE0NjU', + commit: { + author: { + name: 'Paul Gschwendtner', + email: 'paulgschwendtner@gmail.com', + date: '2022-01-15T21:50:21Z', + }, + committer: { + name: 'GitHub', + email: 'noreply@github.com', + date: '2022-01-15T21:50:21Z', + }, + message: + "chore: improve type safety in breakpoint observer (#14356)\n\n* Fixes a workaround where we cast the MediaQueryList event listener to any because TypeScript didn't have proper types before TS 3.1.", + tree: { + sha: 'b2c5a550c62ac3582498c330038dd049834058b9', + url: 'https://api.github.com/repos/angular/components/git/trees/b2c5a550c62ac3582498c330038dd049834058b9', + }, + url: 'https://api.github.com/repos/angular/components/git/commits/0f47b7a2a4cab4ea8f6006a2be54a3e92ec21465', + comment_count: 0, + verification: { + verified: true, + reason: 'valid', + signature: + '-----BEGIN PGP SIGNATURE-----\n\nwsBcBAABCAAQBQJh40GdCRBK7hj4Ov3rIwAAwcEIAC6ZfxSamLYV+G9XYc/BscYd\nVTOwDInccxtF7zJlV1GIFaYG8HDet1QczgN21jCZlemNg7jBRpQV/GurmoQjfVz0\ny4Tr9Z8+dlsAQY2WAUZEKe+o+6HI0Eu5PIy4JMe9NC/rGSmOrfK1cd16of9ocwHT\nc6Z15c7A6g6KFbQH9YPA/CMstBycIjmckZRAd1dPcqGcjjtgXqT52R3ELgJz0ikA\nxz1IEIEur2JpbiTCUSCXwEAxqb2viiaMwo95nuCqDRmCgI6pSRFAb9eL2fvgJLQ+\n7ze0mJPwq3EzwH5KVaxEmboHyDiQTBVTxpAXqmFFukqMB4p5RGQdcJewU16DKdM=\n=K2br\n-----END PGP SIGNATURE-----\n', + payload: + "tree b2c5a550c62ac3582498c330038dd049834058b9\nparent f10d245cca22930e6d88aad03ede12f50f96746f\nauthor Paul Gschwendtner 1642283421 +0100\ncommitter GitHub 1642283421 +0000\n\nchore: improve type safety in breakpoint observer (#14356)\n\n* Fixes a workaround where we cast the MediaQueryList event listener to any because TypeScript didn't have proper types before TS 3.1.", + }, + }, + url: 'https://api.github.com/repos/angular/components/commits/0f47b7a2a4cab4ea8f6006a2be54a3e92ec21465', + html_url: + 'https://github.com/angular/components/commit/0f47b7a2a4cab4ea8f6006a2be54a3e92ec21465', + comments_url: + 'https://api.github.com/repos/angular/components/commits/0f47b7a2a4cab4ea8f6006a2be54a3e92ec21465/comments', + author: { + login: 'devversion', + id: 4987015, + node_id: 'MDQ6VXNlcjQ5ODcwMTU=', + avatar_url: 'https://avatars.githubusercontent.com/u/4987015?v=4', + gravatar_id: '', + url: 'https://api.github.com/users/devversion', + html_url: 'https://github.com/devversion', + followers_url: 'https://api.github.com/users/devversion/followers', + following_url: 'https://api.github.com/users/devversion/following{/other_user}', + gists_url: 'https://api.github.com/users/devversion/gists{/gist_id}', + starred_url: 'https://api.github.com/users/devversion/starred{/owner}{/repo}', + subscriptions_url: 'https://api.github.com/users/devversion/subscriptions', + organizations_url: 'https://api.github.com/users/devversion/orgs', + repos_url: 'https://api.github.com/users/devversion/repos', + events_url: 'https://api.github.com/users/devversion/events{/privacy}', + received_events_url: 'https://api.github.com/users/devversion/received_events', + type: 'User', + site_admin: false, + }, + committer: { + login: 'web-flow', + id: 19864447, + node_id: 'MDQ6VXNlcjE5ODY0NDQ3', + avatar_url: 'https://avatars.githubusercontent.com/u/19864447?v=4', + gravatar_id: '', + url: 'https://api.github.com/users/web-flow', + html_url: 'https://github.com/web-flow', + followers_url: 'https://api.github.com/users/web-flow/followers', + following_url: 'https://api.github.com/users/web-flow/following{/other_user}', + gists_url: 'https://api.github.com/users/web-flow/gists{/gist_id}', + starred_url: 'https://api.github.com/users/web-flow/starred{/owner}{/repo}', + subscriptions_url: 'https://api.github.com/users/web-flow/subscriptions', + organizations_url: 'https://api.github.com/users/web-flow/orgs', + repos_url: 'https://api.github.com/users/web-flow/repos', + events_url: 'https://api.github.com/users/web-flow/events{/privacy}', + received_events_url: 'https://api.github.com/users/web-flow/received_events', + type: 'User', + site_admin: false, + }, + parents: [ + { + sha: 'f10d245cca22930e6d88aad03ede12f50f96746f', + url: 'https://api.github.com/repos/angular/components/commits/f10d245cca22930e6d88aad03ede12f50f96746f', + html_url: + 'https://github.com/angular/components/commit/f10d245cca22930e6d88aad03ede12f50f96746f', + }, + ], + }, + { + sha: 'f10d245cca22930e6d88aad03ede12f50f96746f', + node_id: 'C_kwDOAuvuAtoAKGYxMGQyNDVjY2EyMjkzMGU2ZDg4YWFkMDNlZGUxMmY1MGY5Njc0NmY', + commit: { + author: { + name: 'Ruslan Lekhman', + email: 'lekhman112@gmail.com', + date: '2022-01-15T21:49:29Z', + }, + committer: { + name: 'GitHub', + email: 'noreply@github.com', + date: '2022-01-15T21:49:29Z', + }, + message: 'feat(material/tabs): label & body classes (#23691)\n\ncloses #23685, #9290, #15997', + tree: { + sha: '6080d205b131337349f90f8e015e6a359e8e0f74', + url: 'https://api.github.com/repos/angular/components/git/trees/6080d205b131337349f90f8e015e6a359e8e0f74', + }, + url: 'https://api.github.com/repos/angular/components/git/commits/f10d245cca22930e6d88aad03ede12f50f96746f', + comment_count: 0, + verification: { + verified: true, + reason: 'valid', + signature: + '-----BEGIN PGP SIGNATURE-----\n\nwsBcBAABCAAQBQJh40FpCRBK7hj4Ov3rIwAAAkgIAA+jU7dPfMQxCoZiNZ5M/73a\n/Q7v/la0nkAk9OE2930aUi0auptHXTGuiXX/VUr5A6BAnnpO4oxZdAPw+HqwEo/R\nISjuAr3B3IqE5KyBOMQ8yn7Df8pTLbl0OVc/hAYlhsSl4AnBdLCb3eB6mgR467pN\n9Al0WI9iVZi8+2JW1iPEJQL3rf0IXU9t7FVygSWaYHldISdsAPROgIqplIdYPGQ1\nSdhfUqKS/vqEfCswjqd7o0zYxwiBRi8ikRFNBXuaMILGwEFvhpQCjLlSoPjcttlj\nOJouinCCZgk25KVvboQG/05B7Didx/AEMrvInBpSQWXD0M/dgHIv6b/XwtF78fw=\n=unTN\n-----END PGP SIGNATURE-----\n', + payload: + 'tree 6080d205b131337349f90f8e015e6a359e8e0f74\nparent 653e46bda332157c1ec0c92913ce462e48b905f4\nauthor Ruslan Lekhman 1642283369 -0700\ncommitter GitHub 1642283369 +0000\n\nfeat(material/tabs): label & body classes (#23691)\n\ncloses #23685, #9290, #15997', + }, + }, + url: 'https://api.github.com/repos/angular/components/commits/f10d245cca22930e6d88aad03ede12f50f96746f', + html_url: + 'https://github.com/angular/components/commit/f10d245cca22930e6d88aad03ede12f50f96746f', + comments_url: + 'https://api.github.com/repos/angular/components/commits/f10d245cca22930e6d88aad03ede12f50f96746f/comments', + author: { + login: 'lekhmanrus', + id: 2744696, + node_id: 'MDQ6VXNlcjI3NDQ2OTY=', + avatar_url: 'https://avatars.githubusercontent.com/u/2744696?v=4', + gravatar_id: '', + url: 'https://api.github.com/users/lekhmanrus', + html_url: 'https://github.com/lekhmanrus', + followers_url: 'https://api.github.com/users/lekhmanrus/followers', + following_url: 'https://api.github.com/users/lekhmanrus/following{/other_user}', + gists_url: 'https://api.github.com/users/lekhmanrus/gists{/gist_id}', + starred_url: 'https://api.github.com/users/lekhmanrus/starred{/owner}{/repo}', + subscriptions_url: 'https://api.github.com/users/lekhmanrus/subscriptions', + organizations_url: 'https://api.github.com/users/lekhmanrus/orgs', + repos_url: 'https://api.github.com/users/lekhmanrus/repos', + events_url: 'https://api.github.com/users/lekhmanrus/events{/privacy}', + received_events_url: 'https://api.github.com/users/lekhmanrus/received_events', + type: 'User', + site_admin: false, + }, + committer: { + login: 'web-flow', + id: 19864447, + node_id: 'MDQ6VXNlcjE5ODY0NDQ3', + avatar_url: 'https://avatars.githubusercontent.com/u/19864447?v=4', + gravatar_id: '', + url: 'https://api.github.com/users/web-flow', + html_url: 'https://github.com/web-flow', + followers_url: 'https://api.github.com/users/web-flow/followers', + following_url: 'https://api.github.com/users/web-flow/following{/other_user}', + gists_url: 'https://api.github.com/users/web-flow/gists{/gist_id}', + starred_url: 'https://api.github.com/users/web-flow/starred{/owner}{/repo}', + subscriptions_url: 'https://api.github.com/users/web-flow/subscriptions', + organizations_url: 'https://api.github.com/users/web-flow/orgs', + repos_url: 'https://api.github.com/users/web-flow/repos', + events_url: 'https://api.github.com/users/web-flow/events{/privacy}', + received_events_url: 'https://api.github.com/users/web-flow/received_events', + type: 'User', + site_admin: false, + }, + parents: [ + { + sha: '653e46bda332157c1ec0c92913ce462e48b905f4', + url: 'https://api.github.com/repos/angular/components/commits/653e46bda332157c1ec0c92913ce462e48b905f4', + html_url: + 'https://github.com/angular/components/commit/653e46bda332157c1ec0c92913ce462e48b905f4', + }, + ], + }, +]; + +testNoChecked(); +testSomeChecked(); +testSomeCheckedWithGap(); +testSomeCheckedNotAtStart(); +testNoContent(); +testNoOutputContent(); + +function testNoChecked() { + test( + createIssueBody( + [ + { checked: false, sha: '0f47b7a2a4cab4ea8f6006a2be54a3e92ec21465' }, + { checked: false, sha: '99c611219181b8014a6ed4c585939eda9a97f7f5' }, + { checked: false, sha: 'f63d669977282c4490f88a093580618a81b5bb9d' }, + { checked: false, sha: '667a555edff9422b879dd401ac53ce2d279ee1a4' }, + ], + 'f10d245cca22930e6d88aad03ede12f50f96746f' + ), + createIssueBody( + [ + { checked: false, sha: '0f47b7a2a4cab4ea8f6006a2be54a3e92ec21465' }, + { checked: false, sha: '99c611219181b8014a6ed4c585939eda9a97f7f5' }, + { checked: false, sha: 'f63d669977282c4490f88a093580618a81b5bb9d' }, + { checked: false, sha: '667a555edff9422b879dd401ac53ce2d279ee1a4' }, + ], + 'f10d245cca22930e6d88aad03ede12f50f96746f' + ) + ); +} +function testSomeChecked() { + test( + createIssueBody( + [ + { checked: true, sha: '0f47b7a2a4cab4ea8f6006a2be54a3e92ec21465' }, + { checked: true, sha: '99c611219181b8014a6ed4c585939eda9a97f7f5' }, + { checked: false, sha: 'f63d669977282c4490f88a093580618a81b5bb9d' }, + { checked: false, sha: '667a555edff9422b879dd401ac53ce2d279ee1a4' }, + ], + 'f10d245cca22930e6d88aad03ede12f50f96746f' + ), + createIssueBody( + [ + { checked: false, sha: 'f63d669977282c4490f88a093580618a81b5bb9d' }, + { checked: false, sha: '667a555edff9422b879dd401ac53ce2d279ee1a4' }, + ], + '99c611219181b8014a6ed4c585939eda9a97f7f5' + ) + ); +} +function testSomeCheckedWithGap() { + test( + createIssueBody( + [ + { checked: true, sha: '0f47b7a2a4cab4ea8f6006a2be54a3e92ec21465' }, + { checked: true, sha: '99c611219181b8014a6ed4c585939eda9a97f7f5' }, + { checked: false, sha: 'f63d669977282c4490f88a093580618a81b5bb9d' }, + { checked: true, sha: '667a555edff9422b879dd401ac53ce2d279ee1a4' }, + ], + 'f10d245cca22930e6d88aad03ede12f50f96746f' + ), + createIssueBody( + [ + { checked: false, sha: 'f63d669977282c4490f88a093580618a81b5bb9d' }, + { checked: true, sha: '667a555edff9422b879dd401ac53ce2d279ee1a4' }, + ], + '99c611219181b8014a6ed4c585939eda9a97f7f5' + ) + ); +} +function testSomeCheckedNotAtStart() { + test( + createIssueBody( + [ + { checked: false, sha: '0f47b7a2a4cab4ea8f6006a2be54a3e92ec21465' }, + { checked: true, sha: '99c611219181b8014a6ed4c585939eda9a97f7f5' }, + { checked: true, sha: 'f63d669977282c4490f88a093580618a81b5bb9d' }, + ], + 'f10d245cca22930e6d88aad03ede12f50f96746f' + ), + createIssueBody( + [ + { checked: false, sha: '0f47b7a2a4cab4ea8f6006a2be54a3e92ec21465' }, + { checked: true, sha: '99c611219181b8014a6ed4c585939eda9a97f7f5' }, + { checked: true, sha: 'f63d669977282c4490f88a093580618a81b5bb9d' }, + { checked: false, sha: '667a555edff9422b879dd401ac53ce2d279ee1a4' }, + ], + 'f10d245cca22930e6d88aad03ede12f50f96746f' + ) + ); +} +function testNoContent() { + test( + createIssueBody('none', 'f10d245cca22930e6d88aad03ede12f50f96746f'), + createIssueBody( + [ + { checked: false, sha: '0f47b7a2a4cab4ea8f6006a2be54a3e92ec21465' }, + { checked: false, sha: '99c611219181b8014a6ed4c585939eda9a97f7f5' }, + { checked: false, sha: 'f63d669977282c4490f88a093580618a81b5bb9d' }, + { checked: false, sha: '667a555edff9422b879dd401ac53ce2d279ee1a4' }, + ], + 'f10d245cca22930e6d88aad03ede12f50f96746f' + ) + ); +} +function testNoOutputContent() { + test( + createIssueBody( + [ + { checked: true, sha: '0f47b7a2a4cab4ea8f6006a2be54a3e92ec21465' }, + { checked: true, sha: '99c611219181b8014a6ed4c585939eda9a97f7f5' }, + { checked: true, sha: 'f63d669977282c4490f88a093580618a81b5bb9d' }, + { checked: true, sha: '667a555edff9422b879dd401ac53ce2d279ee1a4' }, + ], + 'f10d245cca22930e6d88aad03ede12f50f96746f' + ), + createIssueBody('none', '667a555edff9422b879dd401ac53ce2d279ee1a4') + ); +} + +async function test(input: string, expectedOutput: string) { + let done = false; + let result = ''; + const angularComponentsSync = new AngularComponentsSync( + createOctokitMock(input, (body) => { + result = body; + done = true; + }), + new Date(0) + ); + await angularComponentsSync.run(); + const expected = result === expectedOutput; + console.log('done', done, 'expected', expected); + if (!expected) { + console.log('expected'); + console.error(result); + console.log('to equal'); + console.log(expectedOutput); + } +} + +function createIssueBody(commits: { checked: boolean; sha: string }[] | 'none', lastSha: string) { + return `In order to get the newest findings from angular/components, we like to check every commit of angular/components.\r +\r +**Commits**\r +${ + commits === 'none' + ? 'No unchecked commits' + : commits + .map( + (commit) => + `- [${commit.checked ? 'x' : ' '}] [${ + commitList + .find((origCommit) => origCommit.sha === commit.sha)! + .commit.message.match(/^(.*)$/m)![0] + }](https://github.com/angular/components/commit/${commit.sha})` + ) + .join('\r\n') +}\r +\r +**Commits to be considered for the next major release**\r + - ...\r +\r +Last synchronization:\r +\`1970-01-01T00:00:00.000Z\`\r +\r +Last checked sha:\r +\`${lastSha}\``; +} + +function createOctokitMock(issueBody: string, receiveBody: (body: string) => void) { + return { + rest: { + issues: { + get: () => ({ + data: { + body: issueBody, + }, + }), + update: (payload: any) => { + receiveBody(payload.body); + }, + }, + repos: { + listCommits: () => ({ + data: commitList, + }), + }, + }, + } as unknown as Octokit; +} diff --git a/scripts/angular-components-sync.ts b/scripts/angular-components-sync.ts new file mode 100644 index 0000000000..9b240c9b01 --- /dev/null +++ b/scripts/angular-components-sync.ts @@ -0,0 +1,194 @@ +import { Octokit } from 'octokit'; + +interface IssueBody { + emptyList: boolean; + lastSha: string; + commits: { checked: boolean; sha: string }[]; + body: string; +} + +interface GithubCommit { + sha: string; + commit: { message: string }; +} + +const githubToken = process.env.GITHUB_TOKEN || `YOUR_LOCAL_TEST_TOKEN`; + +const issuePath = { + owner: 'sbb-design-systems', + repo: 'sbb-angular', + issue_number: 1047, +}; + +const commitsInIssueStart = '**Commits**'; +const commitsInIssueEnd = '**Commits'; +const commitsInIssueRegex = new RegExp( + `${escapeRegex(commitsInIssueStart)}(.*)${escapeRegex(commitsInIssueEnd)}`, + 's' +); +const lastSynchronizationTitle = `Last synchronization:`; +const lastSynchronizationInIssueRegex = new RegExp( + escapeRegex(lastSynchronizationTitle) + '\r\n' + '`(.*)`\r\n', + 's' +); +const lastCheckedShaTitle = `Last checked sha:`; +const lastCheckedShaInIssueRegex = new RegExp( + escapeRegex(lastCheckedShaTitle) + '\r\n' + '`(.*)`', + 's' +); +const emptyListInIssueMessage = 'No unchecked commits'; + +export class AngularComponentsSync { + constructor(private _octokit: Octokit, private _now: Date) {} + + async run() { + const issue = await this._loadIssue(); + if (!issue.data.body) { + throw new Error('Could not load issue body'); + } + const parsedIssue = this._parseIssue(issue.data.body); + + const firstUncheckedCommit = parsedIssue.commits.find((commit) => !commit.checked); + const referenceSha = parsedIssue.emptyList + ? parsedIssue.lastSha + : firstUncheckedCommit?.sha || parsedIssue.commits[parsedIssue.commits.length - 1].sha; + + if (!referenceSha) { + throw new Error('Could not determine reference sha (last checked commit)'); + } + + const latestAngularComponentsCommits = (await this._loadLatestAngularComponentsCommits()) + .data as GithubCommit[]; + + const commitsEndIndex = latestAngularComponentsCommits.findIndex( + (commit) => commit.sha === referenceSha + ); + + if (commitsEndIndex === -1) { + throw new Error( + `Could not find commit with sha ${referenceSha}. This can happen because we only check the last 100 commits.` + ); + } + + let issueBody = ''; + + // If all previous issues were checked or the issue commit list is empty + if (!firstUncheckedCommit || parsedIssue.emptyList) { + issueBody = this._createIssueBody( + latestAngularComponentsCommits.slice(0, commitsEndIndex), + parsedIssue, + referenceSha + ); + } else { + const commitsInRange = latestAngularComponentsCommits.slice(0, commitsEndIndex + 1); + + const lastCheckedCommitBeforeNotCheckedIndex = + latestAngularComponentsCommits.findIndex( + (commit) => commit.sha === firstUncheckedCommit.sha + ) + 1; + + const newReferenceSha = + latestAngularComponentsCommits[lastCheckedCommitBeforeNotCheckedIndex].sha; + issueBody = this._createIssueBody(commitsInRange, parsedIssue, newReferenceSha); + } + + await this._updateIssue(issueBody); + } + + private async _loadIssue() { + return this._octokit.rest.issues.get(issuePath); + } + + private async _loadLatestAngularComponentsCommits() { + return this._octokit.rest.repos.listCommits({ + owner: 'angular', + repo: 'components', + per_page: 100, + }); + } + + private async _updateIssue(body: string) { + return this._octokit.rest.issues.update({ + ...issuePath, + body: body, + }); + } + + private _parseIssue(issueBody: string): IssueBody { + const emptyList = issueBody.includes(emptyListInIssueMessage); + return { + lastSha: issueBody.match(lastCheckedShaInIssueRegex)![1], + emptyList, + commits: emptyList + ? [] + : issueBody + .match(commitsInIssueRegex)![1] + .trim() + .split('\r\n') + .map((line) => ({ + checked: line.startsWith('- [x]'), + sha: line.match(/angular\/components\/commit\/(.*)\)/)![1], + })), + body: issueBody, + }; + } + + private _createIssueBody( + commitsInRange: GithubCommit[], + issueBody: IssueBody, + newReferenceSha: string + ) { + const commitsInIssueBlock = `${commitsInIssueStart}\r\n${ + commitsInRange.length + ? this._createIssueCommits(commitsInRange, issueBody) + : emptyListInIssueMessage + }\r\n\r\n${commitsInIssueEnd}`; + + const lastShaBlock = `${lastCheckedShaTitle}\r\n\`${newReferenceSha}\``; + const lastSynchronizationBlock = `${lastSynchronizationTitle}\r\n\`${this._now.toISOString()}\`\r\n`; + + return issueBody.body + .replace(commitsInIssueRegex, commitsInIssueBlock) + .replace(lastCheckedShaInIssueRegex, lastShaBlock) + .replace(lastSynchronizationInIssueRegex, lastSynchronizationBlock); + } + + private _createIssueCommits(commitsInRange: GithubCommit[], issueBody: IssueBody) { + return commitsInRange + .reverse() + .map((commit) => + this._createIssueCommitLine( + issueBody.commits.some( + (existentCommit) => existentCommit.sha === commit.sha && existentCommit.checked + ), + this._extractCommitSubject(commit.commit.message), + commit.sha + ) + ) + .join('\r\n'); + } + + private _createIssueCommitLine(checked: boolean, subject: string, sha: string) { + return `- [${ + checked ? 'x' : ' ' + }] [${subject}](https://github.com/angular/components/commit/${sha})`; + } + + private _extractCommitSubject(message: string) { + return message.match(/^(.*)$/m)?.[0] || ''; + } +} + +function escapeRegex(string: string) { + return string.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); +} + +if (module === require.main) { + const angularComponentsSync = new AngularComponentsSync( + new Octokit({ + auth: githubToken, + }), + new Date() + ); + angularComponentsSync.run(); +} diff --git a/yarn.lock b/yarn.lock index 215829571b..2ff5b6536c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2861,6 +2861,35 @@ consola "^2.15.0" node-fetch "^2.6.1" +"@octokit/app@^12.0.4": + version "12.0.5" + resolved "https://registry.yarnpkg.com/@octokit/app/-/app-12.0.5.tgz#0b25446daffcb36967b26944410eab1ccbba0c06" + integrity sha512-lM3pIfx2h+UbvsXHFVs1ApJ9Rmp8LO4ciFSr5q/9MdHmhsH6WtwayieUn875xwB77IoR9r8czxxxASu2WCtdeA== + dependencies: + "@octokit/auth-app" "^3.3.0" + "@octokit/auth-unauthenticated" "^2.0.4" + "@octokit/core" "^3.4.0" + "@octokit/oauth-app" "^3.3.2" + "@octokit/plugin-paginate-rest" "^2.13.3" + "@octokit/types" "^6.27.1" + "@octokit/webhooks" "^9.0.1" + +"@octokit/auth-app@^3.3.0": + version "3.6.1" + resolved "https://registry.yarnpkg.com/@octokit/auth-app/-/auth-app-3.6.1.tgz#aa5b02cc211175cbc28ce6c03c73373c1206d632" + integrity sha512-6oa6CFphIYI7NxxHrdVOzhG7hkcKyGyYocg7lNDSJVauVOLtylg8hNJzoUyPAYKKK0yUeoZamE/lMs2tG+S+JA== + dependencies: + "@octokit/auth-oauth-app" "^4.3.0" + "@octokit/auth-oauth-user" "^1.2.3" + "@octokit/request" "^5.6.0" + "@octokit/request-error" "^2.1.0" + "@octokit/types" "^6.0.3" + "@types/lru-cache" "^5.1.0" + deprecation "^2.3.1" + lru-cache "^6.0.0" + universal-github-app-jwt "^1.0.1" + universal-user-agent "^6.0.0" + "@octokit/auth-app@^3.6.0": version "3.6.0" resolved "https://registry.yarnpkg.com/@octokit/auth-app/-/auth-app-3.6.0.tgz#79fc6f652d2362ce0bd3122f6f764a87cc813dea" @@ -2877,7 +2906,7 @@ universal-github-app-jwt "^1.0.1" universal-user-agent "^6.0.0" -"@octokit/auth-oauth-app@^4.3.0": +"@octokit/auth-oauth-app@^4.0.0", "@octokit/auth-oauth-app@^4.3.0": version "4.3.0" resolved "https://registry.yarnpkg.com/@octokit/auth-oauth-app/-/auth-oauth-app-4.3.0.tgz#de02f184360ffd7cfccef861053784fc4410e7ea" integrity sha512-cETmhmOQRHCz6cLP7StThlJROff3A/ln67Q961GuIr9zvyFXZ4lIJy9RE6Uw5O7D8IXWPU3jhDnG47FTSGQr8Q== @@ -2900,7 +2929,7 @@ "@octokit/types" "^6.10.0" universal-user-agent "^6.0.0" -"@octokit/auth-oauth-user@^1.2.1", "@octokit/auth-oauth-user@^1.2.3": +"@octokit/auth-oauth-user@^1.2.1", "@octokit/auth-oauth-user@^1.2.3", "@octokit/auth-oauth-user@^1.3.0": version "1.3.0" resolved "https://registry.yarnpkg.com/@octokit/auth-oauth-user/-/auth-oauth-user-1.3.0.tgz#da4e4529145181a6aa717ae858afb76ebd6e3360" integrity sha512-3QC/TAdk7onnxfyZ24BnJRfZv8TRzQK7SEFUS9vLng4Vv6Hv6I64ujdk/CUkREec8lhrwU764SZ/d+yrjjqhaQ== @@ -2919,7 +2948,15 @@ dependencies: "@octokit/types" "^6.0.3" -"@octokit/core@^3.4.0", "@octokit/core@^3.5.1": +"@octokit/auth-unauthenticated@^2.0.0", "@octokit/auth-unauthenticated@^2.0.4": + version "2.1.0" + resolved "https://registry.yarnpkg.com/@octokit/auth-unauthenticated/-/auth-unauthenticated-2.1.0.tgz#ef97de366836e09f130de4e2205be955f9cf131c" + integrity sha512-+baofLfSL0CAv3CfGQ9rxiZZQEX8VNJMGuuS4PgrMRBUL52Ho5+hQYb63UJQshw7EXYMPDZxbXznc0y33cbPqw== + dependencies: + "@octokit/request-error" "^2.1.0" + "@octokit/types" "^6.0.3" + +"@octokit/core@^3.3.2", "@octokit/core@^3.4.0", "@octokit/core@^3.5.1": version "3.5.1" resolved "https://registry.yarnpkg.com/@octokit/core/-/core-3.5.1.tgz#8601ceeb1ec0e1b1b8217b960a413ed8e947809b" integrity sha512-omncwpLVxMP+GLpLPgeGJBF6IWJFjXDS5flY5VbppePYX9XehevbDykRH9PdCdvqt9TS5AOTiDide7h0qrkHjw== @@ -2959,7 +2996,22 @@ "@octokit/types" "^6.0.3" universal-user-agent "^6.0.0" -"@octokit/oauth-authorization-url@^4.3.1": +"@octokit/oauth-app@^3.3.2", "@octokit/oauth-app@^3.5.1": + version "3.6.0" + resolved "https://registry.yarnpkg.com/@octokit/oauth-app/-/oauth-app-3.6.0.tgz#36f660c7eb6b5a5cd23f6207a8d95e74b6834db0" + integrity sha512-OxPw4ItQXaC2GuEXyZB7EmZ2rHvNFX4y3yAsqdFIRW7qg2HyoEPxacxza6c8wqbEEvu84b98AJ5BXm+IjPWrww== + dependencies: + "@octokit/auth-oauth-app" "^4.0.0" + "@octokit/auth-oauth-user" "^1.3.0" + "@octokit/auth-unauthenticated" "^2.0.0" + "@octokit/core" "^3.3.2" + "@octokit/oauth-authorization-url" "^4.2.1" + "@octokit/oauth-methods" "^1.2.2" + "@types/aws-lambda" "^8.10.83" + fromentries "^1.3.1" + universal-user-agent "^6.0.0" + +"@octokit/oauth-authorization-url@^4.2.1", "@octokit/oauth-authorization-url@^4.3.1": version "4.3.3" resolved "https://registry.yarnpkg.com/@octokit/oauth-authorization-url/-/oauth-authorization-url-4.3.3.tgz#6a6ef38f243086fec882b62744f39b517528dfb9" integrity sha512-lhP/t0i8EwTmayHG4dqLXgU+uPVys4WD/qUNvC+HfB1S1dyqULm5Yx9uKc1x79aP66U1Cb4OZeW8QU/RA9A4XA== @@ -2975,11 +3027,27 @@ "@octokit/types" "^6.12.2" btoa-lite "^1.0.0" +"@octokit/oauth-methods@^1.2.2": + version "1.2.6" + resolved "https://registry.yarnpkg.com/@octokit/oauth-methods/-/oauth-methods-1.2.6.tgz#b9ac65e374b2cc55ee9dd8dcdd16558550438ea7" + integrity sha512-nImHQoOtKnSNn05uk2o76om1tJWiAo4lOu2xMAHYsNr0fwopP+Dv+2MlGvaMMlFjoqVd3fF3X5ZDTKCsqgmUaQ== + dependencies: + "@octokit/oauth-authorization-url" "^4.3.1" + "@octokit/request" "^5.4.14" + "@octokit/request-error" "^2.0.5" + "@octokit/types" "^6.12.2" + btoa-lite "^1.0.0" + "@octokit/openapi-types@^10.0.0": version "10.0.0" resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-10.0.0.tgz#db4335de99509021f501fc4e026e6ff495fe1e62" integrity sha512-k1iO2zKuEjjRS1EJb4FwSLk+iF6EGp+ZV0OMRViQoWhQ1fZTk9hg1xccZII5uyYoiqcbC73MRBmT45y1vp2PPg== +"@octokit/openapi-types@^11.2.0": + version "11.2.0" + resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-11.2.0.tgz#b38d7fc3736d52a1e96b230c1ccd4a58a2f400a6" + integrity sha512-PBsVO+15KSlGmiI8QAzaqvsNlZlrDlyAJYcrXBCvVUxCp7VnXjkwPoFHgjEJXx3WF9BAwkA6nfCUA7i9sODzKA== + "@octokit/openapi-types@^5.3.2": version "5.3.2" resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-5.3.2.tgz#b8ac43c5c3d00aef61a34cf744e315110c78deb4" @@ -3002,6 +3070,13 @@ dependencies: "@octokit/types" "^6.26.0" +"@octokit/plugin-paginate-rest@^2.16.8": + version "2.17.0" + resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.17.0.tgz#32e9c7cab2a374421d3d0de239102287d791bce7" + integrity sha512-tzMbrbnam2Mt4AhuyCHvpRkS0oZ5MvwwcQPYGtMv4tUa5kkzG58SVB0fcsLulOZQeRnOgdkZWkRUiyBlh0Bkyw== + dependencies: + "@octokit/types" "^6.34.0" + "@octokit/plugin-request-log@^1.0.4": version "1.0.4" resolved "https://registry.yarnpkg.com/@octokit/plugin-request-log/-/plugin-request-log-1.0.4.tgz#5e50ed7083a613816b1e4a28aeec5fb7f1462e85" @@ -3015,7 +3090,31 @@ "@octokit/types" "^6.26.0" deprecation "^2.3.1" -"@octokit/request-error@^2.0.5", "@octokit/request-error@^2.1.0": +"@octokit/plugin-rest-endpoint-methods@^5.12.0": + version "5.13.0" + resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.13.0.tgz#8c46109021a3412233f6f50d28786f8e552427ba" + integrity sha512-uJjMTkN1KaOIgNtUPMtIXDOjx6dGYysdIFhgA52x4xSadQCz3b/zJexvITDVpANnfKPW/+E0xkOvLntqMYpviA== + dependencies: + "@octokit/types" "^6.34.0" + deprecation "^2.3.1" + +"@octokit/plugin-retry@^3.0.9": + version "3.0.9" + resolved "https://registry.yarnpkg.com/@octokit/plugin-retry/-/plugin-retry-3.0.9.tgz#ae625cca1e42b0253049102acd71c1d5134788fe" + integrity sha512-r+fArdP5+TG6l1Rv/C9hVoty6tldw6cE2pRHNGmFPdyfrc696R6JjrQ3d7HdVqGwuzfyrcaLAKD7K8TX8aehUQ== + dependencies: + "@octokit/types" "^6.0.3" + bottleneck "^2.15.3" + +"@octokit/plugin-throttling@^3.5.1": + version "3.5.2" + resolved "https://registry.yarnpkg.com/@octokit/plugin-throttling/-/plugin-throttling-3.5.2.tgz#8b1797a5f14edbca0b8af619394056ed0ed5c9b5" + integrity sha512-Eu7kfJxU8vmHqWGNszWpg+GVp2tnAfax3XQV5CkYPEE69C+KvInJXW9WajgSeW+cxYe0UVdouzCtcreGNuJo7A== + dependencies: + "@octokit/types" "^6.0.1" + bottleneck "^2.15.3" + +"@octokit/request-error@^2.0.2", "@octokit/request-error@^2.0.5", "@octokit/request-error@^2.1.0": version "2.1.0" resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-2.1.0.tgz#9e150357831bfc788d13a4fd4b1913d60c74d677" integrity sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg== @@ -3058,6 +3157,13 @@ "@octokit/plugin-request-log" "^1.0.4" "@octokit/plugin-rest-endpoint-methods" "^5.9.0" +"@octokit/types@^6.0.1", "@octokit/types@^6.27.1", "@octokit/types@^6.34.0": + version "6.34.0" + resolved "https://registry.yarnpkg.com/@octokit/types/-/types-6.34.0.tgz#c6021333334d1ecfb5d370a8798162ddf1ae8218" + integrity sha512-s1zLBjWhdEI2zwaoSgyOFoKSl109CUcVBCc7biPJ3aAf6LGLU6szDvi31JPU7bxfla2lqfhjbbg/5DdFNxOwHw== + dependencies: + "@octokit/openapi-types" "^11.2.0" + "@octokit/types@^6.0.3": version "6.12.2" resolved "https://registry.yarnpkg.com/@octokit/types/-/types-6.12.2.tgz#5b44add079a478b8eb27d78cf384cc47e4411362" @@ -3086,6 +3192,26 @@ dependencies: "@octokit/openapi-types" "^9.5.0" +"@octokit/webhooks-methods@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@octokit/webhooks-methods/-/webhooks-methods-2.0.0.tgz#1108b9ea661ca6c81e4a8bfa63a09eb27d5bc2db" + integrity sha512-35cfQ4YWlnZnmZKmIxlGPUPLtbkF8lr/A/1Sk1eC0ddLMwQN06dOuLc+dI3YLQS+T+MoNt3DIQ0NynwgKPilig== + +"@octokit/webhooks-types@5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@octokit/webhooks-types/-/webhooks-types-5.2.0.tgz#9d1d451f37460107409c81cab04dd473108abb02" + integrity sha512-OZhKy1w8/GF4GWtdiJc+o8sloWAHRueGB78FWFLZnueK7EHV9MzDVr4weJZMflJwMK4uuYLzcnJVnAoy3yB35g== + +"@octokit/webhooks@^9.0.1": + version "9.22.0" + resolved "https://registry.yarnpkg.com/@octokit/webhooks/-/webhooks-9.22.0.tgz#07a36a10358d39c1870758fae2b1ad3c24ca578d" + integrity sha512-wUd7nGfDRHG6xkz311djmq6lIB2tQ+r94SNkyv9o0bQhOsrkwH8fQCM7uVsbpkGUU2lqCYsVoa8z/UC9HJgRaw== + dependencies: + "@octokit/request-error" "^2.0.2" + "@octokit/webhooks-methods" "^2.0.0" + "@octokit/webhooks-types" "5.2.0" + aggregate-error "^3.1.0" + "@phenomnomnominal/tsquery@^4.0.0": version "4.1.0" resolved "https://registry.yarnpkg.com/@phenomnomnominal/tsquery/-/tsquery-4.1.0.tgz#9c836d6db829b5127ccc1ffd8e4c2ad08d600071" @@ -3330,6 +3456,11 @@ resolved "https://registry.yarnpkg.com/@types/argparse/-/argparse-1.0.38.tgz#a81fd8606d481f873a3800c6ebae4f1d768a56a9" integrity sha512-ebDJ9b0e702Yr7pWgB0jzm+CX4Srzz8RcXtLJDJB+BSccqMa36uyH/zUsSYao5+BD1ytv3k3rPYCq4mAE1hsXA== +"@types/aws-lambda@^8.10.83": + version "8.10.89" + resolved "https://registry.yarnpkg.com/@types/aws-lambda/-/aws-lambda-8.10.89.tgz#22617ecc1eef9571abebb50c947553362da6051b" + integrity sha512-jwtSuEZj4rY4R2pAEOXi+RutS8RWbwMzoGlRVukdyOpnfqA/XPkAf8QoGWmg4o/UaNpQ8Mj0Xhkp5SZ1t/Zq4Q== + "@types/browser-sync@^2.26.3": version "2.26.3" resolved "https://registry.yarnpkg.com/@types/browser-sync/-/browser-sync-2.26.3.tgz#d8a2c316144b55d5cb11328b7cb63dc1778de524" @@ -3940,6 +4071,14 @@ aggregate-error@^3.0.0: clean-stack "^2.0.0" indent-string "^4.0.0" +aggregate-error@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a" + integrity sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA== + dependencies: + clean-stack "^2.0.0" + indent-string "^4.0.0" + ajv-formats@2.1.1, ajv-formats@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/ajv-formats/-/ajv-formats-2.1.1.tgz#6e669400659eb74973bbf2e33327180a0996b520" @@ -4526,6 +4665,11 @@ boolbase@^1.0.0: resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24= +bottleneck@^2.15.3: + version "2.19.5" + resolved "https://registry.yarnpkg.com/bottleneck/-/bottleneck-2.19.5.tgz#5df0b90f59fd47656ebe63c78a98419205cadd91" + integrity sha512-VHiNCbI1lKdl44tGrhNfU3lup0Tj/ZBMJB5/2ZbNXRCPuRCO7ed2mgcK4r17y+KB2EfuYuRaVlwNbAeaWGSpbw== + brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -7355,6 +7499,11 @@ from@~0: resolved "https://registry.yarnpkg.com/from/-/from-0.1.7.tgz#83c60afc58b9c56997007ed1a768b3ab303a44fe" integrity sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4= +fromentries@^1.3.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/fromentries/-/fromentries-1.3.2.tgz#e4bca6808816bf8f93b52750f1127f5a6fd86e3a" + integrity sha512-cHEpEQHUg0f8XdtZCc2ZAhrHzKzT0MrFUTcvx+hfxYu7rGMDc5SKoXFh+n4YigxsHXRzc6OrCshdR1bWH6HHyg== + fs-access@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/fs-access/-/fs-access-1.0.1.tgz#d6a87f262271cefebec30c553407fb995da8777a" @@ -10485,6 +10634,20 @@ obuf@^1.0.0, obuf@^1.1.2: resolved "https://registry.yarnpkg.com/obuf/-/obuf-1.1.2.tgz#09bea3343d41859ebd446292d11c9d4db619084e" integrity sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg== +octokit@^1.7.1: + version "1.7.1" + resolved "https://registry.yarnpkg.com/octokit/-/octokit-1.7.1.tgz#d86e51c8e0cec65cb64822ca2c9ff1b052593799" + integrity sha512-1b7eRgU8uWetHOWr8f9ptnVo2EKbrkOfocMeQdpgCt7tl/LK67HptFsy2Xg4fMjsJ/+onoBJW0hy/fO0In3/uA== + dependencies: + "@octokit/app" "^12.0.4" + "@octokit/core" "^3.5.1" + "@octokit/oauth-app" "^3.5.1" + "@octokit/plugin-paginate-rest" "^2.16.8" + "@octokit/plugin-rest-endpoint-methods" "^5.12.0" + "@octokit/plugin-retry" "^3.0.9" + "@octokit/plugin-throttling" "^3.5.1" + "@octokit/types" "^6.26.0" + on-finished@^2.3.0, on-finished@~2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947"