diff --git a/.github/scripts/shared/octokit.mts b/.github/scripts/shared/octokit.mts new file mode 100644 index 00000000..bc1ee5bf --- /dev/null +++ b/.github/scripts/shared/octokit.mts @@ -0,0 +1,16 @@ +import { Octokit } from 'octokit'; + +/** + * Creates an Octokit client. It retries every method, writes included, so pass + * `request: { retries: 0 }` on a request that must not be repeated. + * + * @param token - The GitHub token to authenticate with. + * @param options - Extra Octokit options. + * @returns The Octokit client. + */ +export function createOctokit( + token: string, + options: ConstructorParameters[0] = {}, +): Octokit { + return new Octokit({ auth: token, ...options }); +} diff --git a/.github/scripts/shared/slack-blocks.mts b/.github/scripts/shared/slack-blocks.mts new file mode 100644 index 00000000..2ccf7f47 --- /dev/null +++ b/.github/scripts/shared/slack-blocks.mts @@ -0,0 +1,60 @@ +/** + * A Slack Block Kit block with a text object. + * + * @property type - The block type, such as `section`. + * @property text - The text shown in the block. + * @property text.type - The text format, such as `mrkdwn`. + * @property text.text - The text itself. + */ +export type SlackBlock = { + type: string; + text: { type: string; text: string }; +}; + +/** Slack rejects section text over 3000 characters, so stay under it. */ +export const MAX_SECTION_LENGTH = 2800; + +/** + * Escapes the characters Slack treats as markup. + * + * @param text - The text to escape. + * @returns The escaped text. + */ +export function escapeSlack(text: string): string { + return text + .replace(/&/gu, '&') + .replace(//gu, '>'); +} + +/** + * Escapes the text and cuts it so the escaped text is at most `maxLength`. It + * goes by code point and escapes each one whole, so a cut can't land inside an + * entity like `&` or an emoji. + * + * @param text - The text to escape and cut. + * @param maxLength - The most characters the escaped text may have. + * @returns The escaped text, ending in `…` when it was cut. + */ +export function escapeAndTruncate(text: string, maxLength: number): string { + if (maxLength <= 0) { + return ''; + } + const escaped = escapeSlack(text); + if (escaped.length <= maxLength) { + return escaped; + } + let result = ''; + for (const character of text) { + const next = escapeSlack(character); + if (result.length + next.length > maxLength - 1) { + break; + } + result += next; + } + return `${result}…`; +} + +export function section(text: string): SlackBlock { + return { type: 'section', text: { type: 'mrkdwn', text } }; +} diff --git a/.github/scripts/shared/topology.mts b/.github/scripts/shared/topology.mts new file mode 100644 index 00000000..7beb2447 --- /dev/null +++ b/.github/scripts/shared/topology.mts @@ -0,0 +1,74 @@ +import type { Octokit } from 'octokit'; + +/** + * A team's entry in `topology.json`. + * + * @property githubHandle - The team's GitHub handle, such as `@MetaMask/core-platform`. + * @property slackHandle - The team's Slack handles. + * @property slackHandle.team - The team's Slack user group handle, such as `@core-platform-team`. + */ +type TopologyTeam = { + githubHandle?: string; + slackHandle?: { team?: string }; +}; + +/** `topology.json` from MetaMask-planning, keyed by team. */ +export type Topology = Record; + +/** + * Turns `@MetaMask/Core-Platform` into `core-platform`. + * + * @param team - The team handle or slug. + * @returns The lowercase slug without the `@` or the `metamask/` prefix. + */ +export function normalizeTeamSlug(team: string): string { + return team + .trim() + .toLowerCase() + .replace(/^@/u, '') + .replace(/^metamask\//u, ''); +} + +export async function fetchTopology(octokit: Octokit): Promise { + const { data } = await octokit.rest.repos.getContent({ + owner: 'MetaMask', + repo: 'MetaMask-planning', + path: 'topology.json', + mediaType: { format: 'raw' }, + }); + if (typeof data !== 'string') { + throw new Error('topology.json was not returned as raw text'); + } + const topology: unknown = JSON.parse(data); + if ( + typeof topology !== 'object' || + topology === null || + Array.isArray(topology) + ) { + throw new Error('topology.json is not a JSON object'); + } + return topology as Topology; +} + +/** + * Finds the team's Slack user group handle, such as `@core-platform-team`. + * + * @param topology - The parsed `topology.json`. + * @param slug - The team handle or slug to look up. + * @returns The Slack handle, or `undefined` when the team has none. + */ +export function getSlackHandle( + topology: Topology, + slug: string, +): string | undefined { + const wanted = normalizeTeamSlug(slug); + const team = Object.values(topology).find( + (candidate) => + typeof candidate?.githubHandle === 'string' && + normalizeTeamSlug(candidate.githubHandle) === wanted, + ); + const handle = team?.slackHandle?.team; + return typeof handle === 'string' && handle.trim() + ? handle.trim() + : undefined; +} diff --git a/.github/scripts/tests/slack-blocks.test.mts b/.github/scripts/tests/slack-blocks.test.mts new file mode 100644 index 00000000..96edd7cd --- /dev/null +++ b/.github/scripts/tests/slack-blocks.test.mts @@ -0,0 +1,69 @@ +import { describe, expect, it } from 'vitest'; + +import { + MAX_SECTION_LENGTH, + escapeAndTruncate, + escapeSlack, +} from '../shared/slack-blocks.mts'; + +describe('slack-blocks', () => { + describe('escapeSlack', () => { + it('escapes &, < and >', () => { + const escaped = escapeSlack('a & c'); + + expect(escaped).toBe('a <b> & c'); + }); + }); + + describe('escapeAndTruncate', () => { + it('escapes text that fits', () => { + const result = escapeAndTruncate('a & b', 10); + + expect(result).toBe('a & b'); + }); + + it('cuts by the escaped length, not the original length', () => { + const result = escapeAndTruncate('&'.repeat(601), MAX_SECTION_LENGTH); + + expect(result.length).toBeLessThanOrEqual(MAX_SECTION_LENGTH); + expect(result.endsWith('…')).toBe(true); + }); + + it('never cuts an escape sequence in half', () => { + const result = escapeAndTruncate('&&&&', 8); + + expect(result).toBe('&…'); + }); + + it.each([ + [3, 'a…'], + [4, 'a😀…'], + ])( + 'never cuts an emoji in half, for a limit of %i', + (maxLength, expected) => { + const result = escapeAndTruncate('a😀bc', maxLength); + + expect(result).toBe(expected); + }, + ); + + it.each([ + ['x', 0], + ['&', 0], + ['x', -3], + ])( + 'returns nothing when there is no room, for %j and a limit of %i', + (text, maxLength) => { + const result = escapeAndTruncate(text, maxLength); + + expect(result).toBe(''); + }, + ); + + it('fits the ellipsis alone in a limit of 1', () => { + const result = escapeAndTruncate('xyz', 1); + + expect(result).toBe('…'); + }); + }); +}); diff --git a/.github/scripts/tests/topology.test.mts b/.github/scripts/tests/topology.test.mts new file mode 100644 index 00000000..2d8a926b --- /dev/null +++ b/.github/scripts/tests/topology.test.mts @@ -0,0 +1,109 @@ +import type { Octokit } from 'octokit'; +import { describe, expect, it, vi } from 'vitest'; + +import { + fetchTopology, + getSlackHandle, + normalizeTeamSlug, +} from '../shared/topology.mts'; +import type { Topology } from '../shared/topology.mts'; + +const topology: Topology = { + bad: null, + core: { + githubHandle: '@MetaMask/core-platform', + slackHandle: { team: '@core-platform-team' }, + }, + ui: { githubHandle: '@MetaMask/ui', slackHandle: { team: '' } }, + none: { githubHandle: '@MetaMask/none' }, +}; + +describe('topology', () => { + describe('normalizeTeamSlug', () => { + it('lowercases and drops the @ and the org', () => { + const slug = normalizeTeamSlug('@MetaMask/Core-Platform'); + + expect(slug).toBe('core-platform'); + }); + }); + + describe('fetchTopology', () => { + function octokitReturning(data: string): { + octokit: Octokit; + getContent: ReturnType; + } { + const getContent = vi.fn().mockResolvedValue({ data }); + const octokit = { rest: { repos: { getContent } } } as unknown as Octokit; + return { octokit, getContent }; + } + + it('reads topology.json with one request', async () => { + const { octokit, getContent } = octokitReturning( + JSON.stringify(topology), + ); + + const result = await fetchTopology(octokit); + + expect(result).toStrictEqual(topology); + expect(getContent).toHaveBeenCalledTimes(1); + expect(getContent).toHaveBeenCalledWith({ + owner: 'MetaMask', + repo: 'MetaMask-planning', + path: 'topology.json', + mediaType: { format: 'raw' }, + }); + }); + + it('rejects a response that is not raw text', async () => { + const getContent = vi.fn().mockResolvedValue({ data: [] }); + const octokit = { rest: { repos: { getContent } } } as unknown as Octokit; + + const result = fetchTopology(octokit); + + await expect(result).rejects.toThrow('not returned as raw text'); + }); + + it('rejects a response that is not a JSON object', async () => { + const { octokit } = octokitReturning('[]'); + + const result = fetchTopology(octokit); + + await expect(result).rejects.toThrow('not a JSON object'); + }); + }); + + describe('getSlackHandle', () => { + it('matches the team ignoring case, @ and the org', () => { + const handle = getSlackHandle(topology, 'MetaMask/Core-Platform'); + + expect(handle).toBe('@core-platform-team'); + }); + + it.each(['ui', 'none', 'unknown'])('has no handle for %s', (slug) => { + const handle = getSlackHandle(topology, slug); + + expect(handle).toBeUndefined(); + }); + + it('skips a team whose github handle is not a string', () => { + const malformed = { + broken: { githubHandle: 5, slackHandle: { team: '@x' } }, + good: { githubHandle: '@MetaMask/c', slackHandle: { team: '@c-team' } }, + } as unknown as Topology; + + const handle = getSlackHandle(malformed, 'c'); + + expect(handle).toBe('@c-team'); + }); + + it('ignores a Slack handle that is not a string', () => { + const malformed = { + wrongTeam: { githubHandle: '@MetaMask/b', slackHandle: { team: 123 } }, + } as unknown as Topology; + + const handle = getSlackHandle(malformed, 'b'); + + expect(handle).toBeUndefined(); + }); + }); +}); diff --git a/package.json b/package.json index 5f9fd81e..bcbfc2c0 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "execa": "^9.5.2", "googleapis": "144.0.0", "luxon": "^3.3.0", + "octokit": "5.0.5", "ora": "^5.4.1", "prettier": "^3.6.2", "semver": "^7.7.2", diff --git a/vitest.config.mts b/vitest.config.mts index f27216e5..39796f7f 100644 --- a/vitest.config.mts +++ b/vitest.config.mts @@ -49,10 +49,10 @@ export default defineConfig({ thresholds: { // Raises the thresholds in this file when coverage improves. autoUpdate: true, - branches: 41.75, - functions: 50.79, - lines: 41.37, - statements: 41.56, + branches: 42.22, + functions: 51.1, + lines: 41.78, + statements: 41.95, }, }, }, diff --git a/yarn.lock b/yarn.lock index b177d8b0..8a54790d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -316,6 +316,7 @@ __metadata: googleapis: "npm:144.0.0" knip: "npm:^6.39.0" luxon: "npm:^3.3.0" + octokit: "npm:5.0.5" ora: "npm:^5.4.1" oxfmt: "npm:^0.72.0" oxlint: "npm:^1.93.0" @@ -495,6 +496,75 @@ __metadata: languageName: node linkType: hard +"@octokit/app@npm:^16.1.2": + version: 16.1.4 + resolution: "@octokit/app@npm:16.1.4" + dependencies: + "@octokit/auth-app": "npm:^8.3.0" + "@octokit/auth-unauthenticated": "npm:^7.0.4" + "@octokit/core": "npm:^7.0.7" + "@octokit/oauth-app": "npm:^8.0.4" + "@octokit/plugin-paginate-rest": "npm:^15.0.0" + "@octokit/types": "npm:^17.0.0" + "@octokit/webhooks": "npm:^14.0.0" + checksum: 10/b06ce492ac17d3ae9dcd085f215b6ed9bbabae82fd60f189ab034c70a75f1000b62d9999c88dbe599894c3d260cffcd90fe9cfc17dd669765aa343b2efc73b4b + languageName: node + linkType: hard + +"@octokit/auth-app@npm:^8.3.0": + version: 8.3.1 + resolution: "@octokit/auth-app@npm:8.3.1" + dependencies: + "@octokit/auth-oauth-app": "npm:^9.0.5" + "@octokit/auth-oauth-user": "npm:^6.0.4" + "@octokit/request": "npm:^10.0.16" + "@octokit/request-error": "npm:^7.1.2" + "@octokit/types": "npm:^18.0.0" + toad-cache: "npm:^3.7.0" + universal-github-app-jwt: "npm:^2.2.0" + universal-user-agent: "npm:^7.0.0" + checksum: 10/c2a6860bd4a85c57ee190ac5d6888cf89d9f9c1e0a8c6088d1c2e803bd30910cb76fd44ca6431ed2a06c8a9888c421d50d42f9adca63e29b9d5e353d13292a42 + languageName: node + linkType: hard + +"@octokit/auth-oauth-app@npm:^9.0.4, @octokit/auth-oauth-app@npm:^9.0.5": + version: 9.0.5 + resolution: "@octokit/auth-oauth-app@npm:9.0.5" + dependencies: + "@octokit/auth-oauth-device": "npm:^8.0.5" + "@octokit/auth-oauth-user": "npm:^6.0.4" + "@octokit/request": "npm:^10.0.16" + "@octokit/types": "npm:^18.0.0" + universal-user-agent: "npm:^7.0.0" + checksum: 10/4b649336f48d122c5087d8101d0647dc8331b513828b2cdb2f33c9e0533f13760ca58dc399fd6a0314e4c2e80be04828b23c813b0a713d3d3c8e3a943e1e302b + languageName: node + linkType: hard + +"@octokit/auth-oauth-device@npm:^8.0.5": + version: 8.0.5 + resolution: "@octokit/auth-oauth-device@npm:8.0.5" + dependencies: + "@octokit/oauth-methods": "npm:^6.0.5" + "@octokit/request": "npm:^10.0.16" + "@octokit/types": "npm:^18.0.0" + universal-user-agent: "npm:^7.0.0" + checksum: 10/bf2880de60b53c97ac26c5cd8353f5196f2f373e8df0f0a91c4d101c75c99eb337a9f71f04c795015caca1851f75136fa7617ca6d3e4d324f7be43795a2ba4d8 + languageName: node + linkType: hard + +"@octokit/auth-oauth-user@npm:^6.0.3, @octokit/auth-oauth-user@npm:^6.0.4": + version: 6.0.4 + resolution: "@octokit/auth-oauth-user@npm:6.0.4" + dependencies: + "@octokit/auth-oauth-device": "npm:^8.0.5" + "@octokit/oauth-methods": "npm:^6.0.5" + "@octokit/request": "npm:^10.0.16" + "@octokit/types": "npm:^18.0.0" + universal-user-agent: "npm:^7.0.0" + checksum: 10/4528ee2b52fec961cbe4568cee45be4df8f3db0b6b7ae319b953a80cd405b26790b65ba9569da64713f9a5cfefa2c28ad2bcec55dfcbafbd187ad6b970047c20 + languageName: node + linkType: hard + "@octokit/auth-token@npm:^3.0.0": version: 3.0.4 resolution: "@octokit/auth-token@npm:3.0.4" @@ -509,6 +579,23 @@ __metadata: languageName: node linkType: hard +"@octokit/auth-token@npm:^6.0.0": + version: 6.0.0 + resolution: "@octokit/auth-token@npm:6.0.0" + checksum: 10/a30f5c4c984964b57193de5b6f67169f74e4779fedbe716157dd3558dd9de3ca5c105cae521b7bd8ce1ae180773a2ef01afe2306ad5a329f4fd291eba2b7c7d1 + languageName: node + linkType: hard + +"@octokit/auth-unauthenticated@npm:^7.0.4": + version: 7.0.5 + resolution: "@octokit/auth-unauthenticated@npm:7.0.5" + dependencies: + "@octokit/request-error": "npm:^7.1.2" + "@octokit/types": "npm:^18.0.0" + checksum: 10/6cf03b6a033c7b951082d4c82a7acb1092c64c63a06a4ebaa94a5068baca211d79a3df889c6d6f9bb186ae9fc092b17ab93604555e5b9fc20bbc741006f68f04 + languageName: node + linkType: hard + "@octokit/core@npm:^4.2.1": version: 4.2.4 resolution: "@octokit/core@npm:4.2.4" @@ -539,6 +626,31 @@ __metadata: languageName: node linkType: hard +"@octokit/core@npm:^7.0.6, @octokit/core@npm:^7.0.7": + version: 7.0.8 + resolution: "@octokit/core@npm:7.0.8" + dependencies: + "@octokit/auth-token": "npm:^6.0.0" + "@octokit/graphql": "npm:^9.0.5" + "@octokit/request": "npm:^10.0.16" + "@octokit/request-error": "npm:^7.1.2" + "@octokit/types": "npm:^18.0.0" + before-after-hook: "npm:^4.0.0" + universal-user-agent: "npm:^7.0.0" + checksum: 10/d1a570ee76730f50e2f7ce796e9ad2cf4b558c18f4b2bb4e9d0e2b9aeefcda55c0f708c78118eadd18e55c02377024d842a7e56bba1937d16587bdfcf0e9ab09 + languageName: node + linkType: hard + +"@octokit/endpoint@npm:^11.0.5": + version: 11.0.6 + resolution: "@octokit/endpoint@npm:11.0.6" + dependencies: + "@octokit/types": "npm:^18.0.0" + universal-user-agent: "npm:^7.0.2" + checksum: 10/f70c435ff8ecbe2dc87e080387a2ebdf7d90023fa59820e98a90f325334e3a2c57641c2d9a8b2ed7a17e577ef884979bf96c79483446b1fc1ebc1d1b21f22fbd + languageName: node + linkType: hard + "@octokit/endpoint@npm:^7.0.0": version: 7.0.6 resolution: "@octokit/endpoint@npm:7.0.6" @@ -582,6 +694,52 @@ __metadata: languageName: node linkType: hard +"@octokit/graphql@npm:^9.0.5": + version: 9.0.6 + resolution: "@octokit/graphql@npm:9.0.6" + dependencies: + "@octokit/request": "npm:^10.0.16" + "@octokit/types": "npm:^18.0.0" + universal-user-agent: "npm:^7.0.0" + checksum: 10/df6d11659e8cd4dcd2b0d21c9ac283b17ecacc0db5528d27aeebd0a5fea54632ce2183b39dfcbe5e7efaffea5e88ca823832ef344d6e546e62e66fc87d24b808 + languageName: node + linkType: hard + +"@octokit/oauth-app@npm:^8.0.3, @octokit/oauth-app@npm:^8.0.4": + version: 8.0.4 + resolution: "@octokit/oauth-app@npm:8.0.4" + dependencies: + "@octokit/auth-oauth-app": "npm:^9.0.4" + "@octokit/auth-oauth-user": "npm:^6.0.3" + "@octokit/auth-unauthenticated": "npm:^7.0.4" + "@octokit/core": "npm:^7.0.7" + "@octokit/oauth-authorization-url": "npm:^8.0.0" + "@octokit/oauth-methods": "npm:^6.0.3" + "@types/aws-lambda": "npm:^8.10.83" + universal-user-agent: "npm:^7.0.0" + checksum: 10/e6d99bbe32d965f2da2bc93f8281d05065f8a50e7f906aa294d1a5656134e681b0437d804b5f0df67bd8aafd563b4f75c6afc275211b51006899bea921f48e06 + languageName: node + linkType: hard + +"@octokit/oauth-authorization-url@npm:^8.0.0": + version: 8.0.0 + resolution: "@octokit/oauth-authorization-url@npm:8.0.0" + checksum: 10/0623bee436aef4e20754dfd4a157b6161e2a6572f5fca6cd4687ed644737bd1aa18010aa08d77b4906f2f1cd87c7050dc7e2bacde9972e24ed3a099dc427e9e6 + languageName: node + linkType: hard + +"@octokit/oauth-methods@npm:^6.0.3, @octokit/oauth-methods@npm:^6.0.5": + version: 6.0.5 + resolution: "@octokit/oauth-methods@npm:6.0.5" + dependencies: + "@octokit/oauth-authorization-url": "npm:^8.0.0" + "@octokit/request": "npm:^10.0.16" + "@octokit/request-error": "npm:^7.1.2" + "@octokit/types": "npm:^18.0.0" + checksum: 10/fd9a93d1459ba9a8dc61892d99569a817c41c75c4198973338008ebf50faad7aa2cde7ebcb6b886b27173a17d3a80ea9b5a544cd62ba8417f88b4ae4487b85df + languageName: node + linkType: hard + "@octokit/openapi-types@npm:^18.0.0": version: 18.0.0 resolution: "@octokit/openapi-types@npm:18.0.0" @@ -596,6 +754,43 @@ __metadata: languageName: node linkType: hard +"@octokit/openapi-types@npm:^27.0.0": + version: 27.0.0 + resolution: "@octokit/openapi-types@npm:27.0.0" + checksum: 10/5cd2cdf4e41fdf522e15e3d53f3ece8380d98dda9173a6fc905828fb2c33e8733d5f5d2a757ae3a572525f4749748e66cb40e7939372132988d8eb4ba978d54f + languageName: node + linkType: hard + +"@octokit/openapi-types@npm:^28.0.0": + version: 28.0.0 + resolution: "@octokit/openapi-types@npm:28.0.0" + checksum: 10/031cebd35b7a110771ab9909d4d2f8ac2dba7185b55ea2ba91dfa0736f397797c768b7c12b12290e9cb42f1dd1d157ffe829d2009be8542e227780e588a40c68 + languageName: node + linkType: hard + +"@octokit/openapi-types@npm:^29.0.1": + version: 29.0.1 + resolution: "@octokit/openapi-types@npm:29.0.1" + checksum: 10/843b0ad4891152e0e22c3c6527602992448dc6aec92d9d90f5e9b5c4ceb440224e911d3fdb583be0af06d2db7b93b4bc5663450d8117b818df8e77c407af877d + languageName: node + linkType: hard + +"@octokit/openapi-webhooks-types@npm:12.2.0": + version: 12.2.0 + resolution: "@octokit/openapi-webhooks-types@npm:12.2.0" + checksum: 10/69805cc1bf01d9516999f4ac6c076fda2ebbfc005015060f30c027f2cfb7e11ce99c2a784230bc26531717d21dd899d75eed123e4dac1314fdbf3170d3651ebb + languageName: node + linkType: hard + +"@octokit/plugin-paginate-graphql@npm:^6.0.0": + version: 6.0.0 + resolution: "@octokit/plugin-paginate-graphql@npm:6.0.0" + peerDependencies: + "@octokit/core": ">=6" + checksum: 10/217869dadc4bd310c33bfcf60210483dac57f16c40e869dd56ae8df321e5e27a7351f29c9932565b6a8efaeec33d514036081c1977f51d5e048ab37fa7b21ca1 + languageName: node + linkType: hard + "@octokit/plugin-paginate-rest@npm:11.4.4-cjs.2": version: 11.4.4-cjs.2 resolution: "@octokit/plugin-paginate-rest@npm:11.4.4-cjs.2" @@ -607,6 +802,28 @@ __metadata: languageName: node linkType: hard +"@octokit/plugin-paginate-rest@npm:^14.0.0": + version: 14.0.0 + resolution: "@octokit/plugin-paginate-rest@npm:14.0.0" + dependencies: + "@octokit/types": "npm:^16.0.0" + peerDependencies: + "@octokit/core": ">=6" + checksum: 10/57ddd857528dad9c02431bc6254c2374c06057872cf9656a4a88b162ebe1c2bc9f34fbec360f2ccff72c940f29b120758ce14e8135bd027223d381eb1b8b6579 + languageName: node + linkType: hard + +"@octokit/plugin-paginate-rest@npm:^15.0.0": + version: 15.0.0 + resolution: "@octokit/plugin-paginate-rest@npm:15.0.0" + dependencies: + "@octokit/types": "npm:^17.0.0" + peerDependencies: + "@octokit/core": ">=6" + checksum: 10/e84e22137412d69e3a27fd6f9002d4a7a109cd3540c52354561bf0f000fed9a18d756639a7339caae44aa8d48202ed03f4537e885a0bba2a4bcb9d4c20df02f0 + languageName: node + linkType: hard + "@octokit/plugin-paginate-rest@npm:^6.1.2": version: 6.1.2 resolution: "@octokit/plugin-paginate-rest@npm:6.1.2" @@ -648,6 +865,17 @@ __metadata: languageName: node linkType: hard +"@octokit/plugin-rest-endpoint-methods@npm:^17.0.0": + version: 17.0.0 + resolution: "@octokit/plugin-rest-endpoint-methods@npm:17.0.0" + dependencies: + "@octokit/types": "npm:^16.0.0" + peerDependencies: + "@octokit/core": ">=6" + checksum: 10/e9d9ad4d9755cc7fb82fdcbfa870ddea8a432180f0f76c8469095557fd1e26f8caea8cae58401209be17c4f3d8cc48c0e16a3643e37e48f4d23c39e058bf2c55 + languageName: node + linkType: hard + "@octokit/plugin-rest-endpoint-methods@npm:^7.1.2": version: 7.2.3 resolution: "@octokit/plugin-rest-endpoint-methods@npm:7.2.3" @@ -659,6 +887,31 @@ __metadata: languageName: node linkType: hard +"@octokit/plugin-retry@npm:^8.0.3": + version: 8.1.1 + resolution: "@octokit/plugin-retry@npm:8.1.1" + dependencies: + "@octokit/request-error": "npm:^7.1.1" + "@octokit/types": "npm:^17.0.0" + bottleneck: "npm:^2.15.3" + peerDependencies: + "@octokit/core": ">=7" + checksum: 10/ee42b70c04b6749362093bf79d3b5f4019a3a5e3cdf79e28e9d781e4a43242aa67781d1e71dba069646ea6a0b442e155403877493cd3e194e7045386b26023d7 + languageName: node + linkType: hard + +"@octokit/plugin-throttling@npm:^11.0.3": + version: 11.0.5 + resolution: "@octokit/plugin-throttling@npm:11.0.5" + dependencies: + "@octokit/types": "npm:^17.0.0" + bottleneck: "npm:^2.15.3" + peerDependencies: + "@octokit/core": ^7.0.0 + checksum: 10/0262e8229fc515499e157a7877e62f8b1a27073374301e4c296584e3a9ac2e3714f4a25fcaebc1e81f3745bf52dcf43157593e242f84de1309bfa32d4f2182ff + languageName: node + linkType: hard + "@octokit/request-error@npm:^3.0.0": version: 3.0.3 resolution: "@octokit/request-error@npm:3.0.3" @@ -681,6 +934,29 @@ __metadata: languageName: node linkType: hard +"@octokit/request-error@npm:^7.0.0, @octokit/request-error@npm:^7.0.2, @octokit/request-error@npm:^7.1.1, @octokit/request-error@npm:^7.1.2": + version: 7.1.2 + resolution: "@octokit/request-error@npm:7.1.2" + dependencies: + "@octokit/types": "npm:^18.0.0" + checksum: 10/cdc39ee0776b3ee149e3af6373a339f7e3eea98a712d83452db302eb7acd16187325a8be2853623c1215e629674c220395bb47937d8ce8a8a2fa757dc803c52d + languageName: node + linkType: hard + +"@octokit/request@npm:^10.0.16": + version: 10.0.19 + resolution: "@octokit/request@npm:10.0.19" + dependencies: + "@octokit/endpoint": "npm:^11.0.5" + "@octokit/request-error": "npm:^7.1.2" + "@octokit/types": "npm:^18.0.0" + content-type: "npm:^3.0.0" + json-with-bigint: "npm:^3.5.12" + universal-user-agent: "npm:^7.0.2" + checksum: 10/36be0b19b6f783c8822672efd62f1dc799d38652def6a41a9735f55981e988388d83d0178594c0fea38e3ecc6e2fd68714273c0e4eba9853b1746e5d327d756b + languageName: node + linkType: hard + "@octokit/request@npm:^6.0.0": version: 6.2.8 resolution: "@octokit/request@npm:6.2.8" @@ -756,6 +1032,33 @@ __metadata: languageName: node linkType: hard +"@octokit/types@npm:^16.0.0": + version: 16.0.0 + resolution: "@octokit/types@npm:16.0.0" + dependencies: + "@octokit/openapi-types": "npm:^27.0.0" + checksum: 10/03d5cfc29556a9b53eae8beb1bf15c0b704dc722db2c51b53f093f3c3ee6c1d8e20b682be8117a3a17034b458be7746d1b22aaefb959ceb5152ad7589b39e2c9 + languageName: node + linkType: hard + +"@octokit/types@npm:^17.0.0": + version: 17.0.0 + resolution: "@octokit/types@npm:17.0.0" + dependencies: + "@octokit/openapi-types": "npm:^28.0.0" + checksum: 10/38db90d8a2dde153b84a26b6ba2aa4e4a8ddda03dd13d6b4a6f075ffe850c946b6852ba77457e4de8c07b10d06f59d174223e69243c88ecb5cf6280ee541601e + languageName: node + linkType: hard + +"@octokit/types@npm:^18.0.0": + version: 18.0.0 + resolution: "@octokit/types@npm:18.0.0" + dependencies: + "@octokit/openapi-types": "npm:^29.0.1" + checksum: 10/40cdc058e18295d838f7f0680bf839d7622fe23e1467166a9d2df4b3a8dff995f088c3f132b0b789fb27213647f6dc3a84f286c099de5c4a5a0b858fb07b4e55 + languageName: node + linkType: hard + "@octokit/types@npm:^9.0.0, @octokit/types@npm:^9.2.3": version: 9.3.2 resolution: "@octokit/types@npm:9.3.2" @@ -765,6 +1068,24 @@ __metadata: languageName: node linkType: hard +"@octokit/webhooks-methods@npm:^6.0.0": + version: 6.0.0 + resolution: "@octokit/webhooks-methods@npm:6.0.0" + checksum: 10/4f62040d465d86178542492eb2c8ea82e2607a9d91e01b9ad0e4b55407b747a325f70c7ed2a9cdddf2f08c85e50b6570847b2aa4f54b9a2bab0b0f336130a451 + languageName: node + linkType: hard + +"@octokit/webhooks@npm:^14.0.0": + version: 14.3.0 + resolution: "@octokit/webhooks@npm:14.3.0" + dependencies: + "@octokit/openapi-webhooks-types": "npm:12.2.0" + "@octokit/request-error": "npm:^7.0.0" + "@octokit/webhooks-methods": "npm:^6.0.0" + checksum: 10/91ebd27ac421daa860c0ce119871dd57b4e09c875de55ac70aa0981e2cc206f38bef4c784bf2ee66983fd836eebebf289c34f2cbe13f1d50286ba2e850f0ba3b + languageName: node + linkType: hard + "@oxc-parser/binding-android-arm-eabi@npm:0.156.0": version: 0.156.0 resolution: "@oxc-parser/binding-android-arm-eabi@npm:0.156.0" @@ -1727,6 +2048,13 @@ __metadata: languageName: node linkType: hard +"@types/aws-lambda@npm:^8.10.83": + version: 8.10.164 + resolution: "@types/aws-lambda@npm:8.10.164" + checksum: 10/1cd59cdeadc2c56a8fd8e9bd5edef1547ba9e721592ff4b32fbd74d99d1c965651d47793eef0b7e004afbbb464b5d59ad9cad7af73377e9ce1d166e94da1d8f1 + languageName: node + linkType: hard + "@types/chai@npm:^5.2.2": version: 5.2.3 resolution: "@types/chai@npm:5.2.3" @@ -2079,6 +2407,13 @@ __metadata: languageName: node linkType: hard +"before-after-hook@npm:^4.0.0": + version: 4.0.0 + resolution: "before-after-hook@npm:4.0.0" + checksum: 10/9fd52bc0c3cca0fb115e04dacbeeaacff38fa23e1af725d62392254c31ef433b15da60efcba61552e44d64e26f25ea259f72dba005115924389e88d2fd56e19f + languageName: node + linkType: hard + "bignumber.js@npm:^9.0.0": version: 9.1.2 resolution: "bignumber.js@npm:9.1.2" @@ -2116,6 +2451,13 @@ __metadata: languageName: node linkType: hard +"bottleneck@npm:^2.15.3": + version: 2.19.5 + resolution: "bottleneck@npm:2.19.5" + checksum: 10/ffb982185236fc42b135f88eb3cfc8b87c4307fb9c3e3658e843ed673ad1c77780b65a01ab532f9857fa0f75ad4d6c1857985b21c9b2bd7eac8ef3c378d7ebf6 + languageName: node + linkType: hard + "brace-expansion@npm:^1.1.7": version: 1.1.11 resolution: "brace-expansion@npm:1.1.11" @@ -2329,6 +2671,13 @@ __metadata: languageName: node linkType: hard +"content-type@npm:^3.0.0": + version: 3.1.1 + resolution: "content-type@npm:3.1.1" + checksum: 10/97d3f22c21475ab05ea3b4a46044d573d281db5706f6268b95adbccdf4d05ebcb34c9517a27e1e60588d04eaf43dc78e7a5ad8f2aae47241caf4fae2fa957eba + languageName: node + linkType: hard + "core-util-is@npm:~1.0.0": version: 1.0.3 resolution: "core-util-is@npm:1.0.3" @@ -3379,6 +3728,13 @@ __metadata: languageName: node linkType: hard +"json-with-bigint@npm:^3.5.12": + version: 3.5.12 + resolution: "json-with-bigint@npm:3.5.12" + checksum: 10/096a98e435311ab7cdc645769b949cda0cc723b2f1fd0dd5e86839432a703e804a99136da658536e86b876a85d193a87066352e6723dbcc498439fc6c3c34d5c + languageName: node + linkType: hard + "jsonfile@npm:^6.0.1": version: 6.2.0 resolution: "jsonfile@npm:6.2.0" @@ -3943,6 +4299,25 @@ __metadata: languageName: node linkType: hard +"octokit@npm:5.0.5": + version: 5.0.5 + resolution: "octokit@npm:5.0.5" + dependencies: + "@octokit/app": "npm:^16.1.2" + "@octokit/core": "npm:^7.0.6" + "@octokit/oauth-app": "npm:^8.0.3" + "@octokit/plugin-paginate-graphql": "npm:^6.0.0" + "@octokit/plugin-paginate-rest": "npm:^14.0.0" + "@octokit/plugin-rest-endpoint-methods": "npm:^17.0.0" + "@octokit/plugin-retry": "npm:^8.0.3" + "@octokit/plugin-throttling": "npm:^11.0.3" + "@octokit/request-error": "npm:^7.0.2" + "@octokit/types": "npm:^16.0.0" + "@octokit/webhooks": "npm:^14.0.0" + checksum: 10/ceb915ea85719eb4030c9e18258c435d9daab095db9d7bd5b6873eb33fccbaa22abb461e61bb5297cc2dc47bd37cd676b791af9e34521fde82eda79087bbc56f + languageName: node + linkType: hard + "once@npm:^1.3.0, once@npm:^1.4.0": version: 1.4.0 resolution: "once@npm:1.4.0" @@ -4983,6 +5358,13 @@ __metadata: languageName: node linkType: hard +"toad-cache@npm:^3.7.0": + version: 3.7.4 + resolution: "toad-cache@npm:3.7.4" + checksum: 10/0f18d68db82af03b0579d726fb696bbfef043e524860bfad7b86fc6343a96f70115262ff1ec3fa05a656298f729498fa08bb0d955f05f69c869fa558c580922f + languageName: node + linkType: hard + "tr46@npm:~0.0.3": version: 0.0.3 resolution: "tr46@npm:0.0.3" @@ -5101,6 +5483,13 @@ __metadata: languageName: node linkType: hard +"universal-github-app-jwt@npm:^2.2.0": + version: 2.2.2 + resolution: "universal-github-app-jwt@npm:2.2.2" + checksum: 10/97ff36427760fb3c4ca222705e1b7bd768fd0df3051f69c23141b387c94c3ea2a858c73eea996c14faf53cc7a6102ffca79d210cdec95df8e21d20e9452b6339 + languageName: node + linkType: hard + "universal-user-agent@npm:^6.0.0": version: 6.0.0 resolution: "universal-user-agent@npm:6.0.0" @@ -5108,6 +5497,13 @@ __metadata: languageName: node linkType: hard +"universal-user-agent@npm:^7.0.0, universal-user-agent@npm:^7.0.2": + version: 7.0.3 + resolution: "universal-user-agent@npm:7.0.3" + checksum: 10/c497e85f8b11eb8fa4dce584d7a39cc98710164959f494cafc3c269b51abb20fff269951838efd7424d15f6b3d001507f3cb8b52bb5676fdb642019dfd17e63e + languageName: node + linkType: hard + "universalify@npm:^2.0.0": version: 2.0.1 resolution: "universalify@npm:2.0.1"