@framers/agentos-ext-github 0.8.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/README.md +19 -13
  2. package/dist/documents/GitHubDocumentsConnector.d.ts +123 -26
  3. package/dist/documents/GitHubDocumentsConnector.d.ts.map +1 -1
  4. package/dist/documents/GitHubDocumentsConnector.js +229 -46
  5. package/dist/documents/GitHubDocumentsConnector.js.map +1 -1
  6. package/dist/documents/index.d.ts +3 -3
  7. package/dist/documents/index.d.ts.map +1 -1
  8. package/dist/documents/index.js +2 -2
  9. package/dist/documents/index.js.map +1 -1
  10. package/dist/documents/links.d.ts +28 -14
  11. package/dist/documents/links.d.ts.map +1 -1
  12. package/dist/documents/links.js +113 -39
  13. package/dist/documents/links.js.map +1 -1
  14. package/dist/documents/tree.d.ts +47 -13
  15. package/dist/documents/tree.d.ts.map +1 -1
  16. package/dist/documents/tree.js +98 -15
  17. package/dist/documents/tree.js.map +1 -1
  18. package/manifest.json +1 -1
  19. package/package.json +5 -4
  20. package/dist/__tests__/app.test.d.ts +0 -7
  21. package/dist/__tests__/app.test.d.ts.map +0 -1
  22. package/dist/__tests__/app.test.js +0 -1219
  23. package/dist/__tests__/app.test.js.map +0 -1
  24. package/dist/__tests__/documents.test.d.ts +0 -9
  25. package/dist/__tests__/documents.test.d.ts.map +0 -1
  26. package/dist/__tests__/documents.test.js +0 -644
  27. package/dist/__tests__/documents.test.js.map +0 -1
  28. package/dist/__tests__/entry.test.d.ts +0 -7
  29. package/dist/__tests__/entry.test.d.ts.map +0 -1
  30. package/dist/__tests__/entry.test.js +0 -34
  31. package/dist/__tests__/entry.test.js.map +0 -1
  32. package/dist/__tests__/events.test.d.ts +0 -8
  33. package/dist/__tests__/events.test.d.ts.map +0 -1
  34. package/dist/__tests__/events.test.js +0 -321
  35. package/dist/__tests__/events.test.js.map +0 -1
  36. package/dist/__tests__/fileAndBranchTools.test.d.ts +0 -6
  37. package/dist/__tests__/fileAndBranchTools.test.d.ts.map +0 -1
  38. package/dist/__tests__/fileAndBranchTools.test.js +0 -310
  39. package/dist/__tests__/fileAndBranchTools.test.js.map +0 -1
  40. package/dist/__tests__/indexer.test.d.ts +0 -6
  41. package/dist/__tests__/indexer.test.d.ts.map +0 -1
  42. package/dist/__tests__/indexer.test.js +0 -253
  43. package/dist/__tests__/indexer.test.js.map +0 -1
  44. package/dist/__tests__/issueTools.test.d.ts +0 -5
  45. package/dist/__tests__/issueTools.test.d.ts.map +0 -1
  46. package/dist/__tests__/issueTools.test.js +0 -183
  47. package/dist/__tests__/issueTools.test.js.map +0 -1
  48. package/dist/__tests__/links.test.d.ts +0 -8
  49. package/dist/__tests__/links.test.d.ts.map +0 -1
  50. package/dist/__tests__/links.test.js +0 -182
  51. package/dist/__tests__/links.test.js.map +0 -1
  52. package/dist/__tests__/prTools.test.d.ts +0 -5
  53. package/dist/__tests__/prTools.test.d.ts.map +0 -1
  54. package/dist/__tests__/prTools.test.js +0 -318
  55. package/dist/__tests__/prTools.test.js.map +0 -1
  56. package/dist/__tests__/refs.test.d.ts +0 -7
  57. package/dist/__tests__/refs.test.d.ts.map +0 -1
  58. package/dist/__tests__/refs.test.js +0 -420
  59. package/dist/__tests__/refs.test.js.map +0 -1
  60. package/dist/__tests__/releaseAndActionsTools.test.d.ts +0 -6
  61. package/dist/__tests__/releaseAndActionsTools.test.d.ts.map +0 -1
  62. package/dist/__tests__/releaseAndActionsTools.test.js +0 -315
  63. package/dist/__tests__/releaseAndActionsTools.test.js.map +0 -1
  64. package/dist/__tests__/repoTools.test.d.ts +0 -6
  65. package/dist/__tests__/repoTools.test.d.ts.map +0 -1
  66. package/dist/__tests__/repoTools.test.js +0 -308
  67. package/dist/__tests__/repoTools.test.js.map +0 -1
  68. package/dist/__tests__/service.test.d.ts +0 -6
  69. package/dist/__tests__/service.test.d.ts.map +0 -1
  70. package/dist/__tests__/service.test.js +0 -173
  71. package/dist/__tests__/service.test.js.map +0 -1
@@ -1,183 +0,0 @@
1
- // @ts-nocheck
2
- /**
3
- * @fileoverview Tests for GitHubIssueUpdateTool and GitHubCommentListTool.
4
- */
5
- import { describe, it, expect, vi, beforeEach } from 'vitest';
6
- import { GitHubIssueUpdateTool } from '../tools/issueUpdate.js';
7
- import { GitHubCommentListTool } from '../tools/commentList.js';
8
- /** Creates a mock GitHubService whose octokit methods can be spied on. */
9
- function createMockService(overrides = {}) {
10
- const octokit = {
11
- rest: {
12
- issues: {
13
- update: vi.fn(),
14
- listComments: vi.fn(),
15
- ...overrides,
16
- },
17
- },
18
- };
19
- return { getOctokit: () => octokit };
20
- }
21
- /* -------------------------------------------------------------------------- */
22
- /* GitHubIssueUpdateTool */
23
- /* -------------------------------------------------------------------------- */
24
- describe('GitHubIssueUpdateTool', () => {
25
- let service;
26
- let tool;
27
- beforeEach(() => {
28
- service = createMockService();
29
- tool = new GitHubIssueUpdateTool(service);
30
- });
31
- it('has correct metadata', () => {
32
- expect(tool.name).toBe('github_issue_update');
33
- expect(tool.category).toBe('developer');
34
- expect(tool.hasSideEffects).toBe(true);
35
- });
36
- it('updates issue with all provided fields', async () => {
37
- const octokit = service.getOctokit();
38
- octokit.rest.issues.update.mockResolvedValue({
39
- data: {
40
- number: 42,
41
- title: 'Updated Title',
42
- state: 'closed',
43
- labels: [{ name: 'bug' }, { name: 'urgent' }],
44
- assignees: [{ login: 'alice' }],
45
- html_url: 'https://github.com/owner/repo/issues/42',
46
- },
47
- });
48
- const result = await tool.execute({
49
- owner: 'owner',
50
- repo: 'repo',
51
- issue_number: 42,
52
- title: 'Updated Title',
53
- body: 'New body',
54
- state: 'closed',
55
- labels: ['bug', 'urgent'],
56
- assignees: ['alice'],
57
- });
58
- expect(result.success).toBe(true);
59
- expect(result.data).toEqual({
60
- number: 42,
61
- title: 'Updated Title',
62
- state: 'closed',
63
- labels: ['bug', 'urgent'],
64
- assignees: ['alice'],
65
- url: 'https://github.com/owner/repo/issues/42',
66
- });
67
- // Verify all fields were passed through
68
- const callArgs = octokit.rest.issues.update.mock.calls[0][0];
69
- expect(callArgs.title).toBe('Updated Title');
70
- expect(callArgs.body).toBe('New body');
71
- expect(callArgs.state).toBe('closed');
72
- expect(callArgs.labels).toEqual(['bug', 'urgent']);
73
- expect(callArgs.assignees).toEqual(['alice']);
74
- });
75
- it('only passes provided fields (partial update)', async () => {
76
- const octokit = service.getOctokit();
77
- octokit.rest.issues.update.mockResolvedValue({
78
- data: {
79
- number: 7,
80
- title: 'Same Title',
81
- state: 'open',
82
- labels: [],
83
- assignees: [],
84
- html_url: 'https://github.com/o/r/issues/7',
85
- },
86
- });
87
- await tool.execute({
88
- owner: 'o',
89
- repo: 'r',
90
- issue_number: 7,
91
- state: 'open',
92
- });
93
- const callArgs = octokit.rest.issues.update.mock.calls[0][0];
94
- expect(callArgs).toHaveProperty('state', 'open');
95
- expect(callArgs).not.toHaveProperty('title');
96
- expect(callArgs).not.toHaveProperty('body');
97
- expect(callArgs).not.toHaveProperty('labels');
98
- expect(callArgs).not.toHaveProperty('assignees');
99
- });
100
- it('returns error on API failure', async () => {
101
- const octokit = service.getOctokit();
102
- octokit.rest.issues.update.mockRejectedValue(new Error('Not Found'));
103
- const result = await tool.execute({
104
- owner: 'x',
105
- repo: 'y',
106
- issue_number: 999,
107
- });
108
- expect(result.success).toBe(false);
109
- expect(result.error).toBe('Not Found');
110
- });
111
- });
112
- /* -------------------------------------------------------------------------- */
113
- /* GitHubCommentListTool */
114
- /* -------------------------------------------------------------------------- */
115
- describe('GitHubCommentListTool', () => {
116
- let service;
117
- let tool;
118
- beforeEach(() => {
119
- service = createMockService();
120
- tool = new GitHubCommentListTool(service);
121
- });
122
- it('has correct metadata', () => {
123
- expect(tool.name).toBe('github_comment_list');
124
- expect(tool.category).toBe('developer');
125
- expect(tool.hasSideEffects).toBe(false);
126
- });
127
- it('lists comments with default per_page', async () => {
128
- const octokit = service.getOctokit();
129
- octokit.rest.issues.listComments.mockResolvedValue({
130
- data: [
131
- {
132
- id: 100,
133
- user: { login: 'bob' },
134
- body: 'Looks good!',
135
- created_at: '2024-01-01T00:00:00Z',
136
- html_url: 'https://github.com/owner/repo/issues/1#issuecomment-100',
137
- },
138
- {
139
- id: 101,
140
- user: { login: 'alice' },
141
- body: 'Merging now.',
142
- created_at: '2024-01-02T00:00:00Z',
143
- html_url: 'https://github.com/owner/repo/issues/1#issuecomment-101',
144
- },
145
- ],
146
- });
147
- const result = await tool.execute({ owner: 'owner', repo: 'repo', issue_number: 1 });
148
- expect(result.success).toBe(true);
149
- expect(result.data).toEqual([
150
- {
151
- id: 100,
152
- author: 'bob',
153
- body: 'Looks good!',
154
- createdAt: '2024-01-01T00:00:00Z',
155
- url: 'https://github.com/owner/repo/issues/1#issuecomment-100',
156
- },
157
- {
158
- id: 101,
159
- author: 'alice',
160
- body: 'Merging now.',
161
- createdAt: '2024-01-02T00:00:00Z',
162
- url: 'https://github.com/owner/repo/issues/1#issuecomment-101',
163
- },
164
- ]);
165
- const callArgs = octokit.rest.issues.listComments.mock.calls[0][0];
166
- expect(callArgs.per_page).toBe(10);
167
- });
168
- it('clamps per_page to 30', async () => {
169
- const octokit = service.getOctokit();
170
- octokit.rest.issues.listComments.mockResolvedValue({ data: [] });
171
- await tool.execute({ owner: 'o', repo: 'r', issue_number: 5, per_page: 100 });
172
- const callArgs = octokit.rest.issues.listComments.mock.calls[0][0];
173
- expect(callArgs.per_page).toBe(30);
174
- });
175
- it('returns error on API failure', async () => {
176
- const octokit = service.getOctokit();
177
- octokit.rest.issues.listComments.mockRejectedValue(new Error('Forbidden'));
178
- const result = await tool.execute({ owner: 'x', repo: 'y', issue_number: 1 });
179
- expect(result.success).toBe(false);
180
- expect(result.error).toBe('Forbidden');
181
- });
182
- });
183
- //# sourceMappingURL=issueTools.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"issueTools.test.js","sourceRoot":"","sources":["../../src/__tests__/issueTools.test.ts"],"names":[],"mappings":"AAAA,cAAc;AACd;;G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AI,EAAE,GAAG,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC,CAAC;QAE9E,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACnC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,8 +0,0 @@
1
- /**
2
- * @fileoverview `parseGitHubLink` over the addresses a person pastes: a repository, a folder and a file on github.com and
3
- * a file on raw.githubusercontent.com, each with and without `.git`, a trailing slash, a fragment and a query, under
4
- * http, with a port and without a scheme; the GitHub addresses the pack does not read, each refused and never answered
5
- * as another site's; and the addresses of other hosts, which are not GitHub's.
6
- */
7
- export {};
8
- //# sourceMappingURL=links.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"links.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/links.test.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
@@ -1,182 +0,0 @@
1
- /**
2
- * @fileoverview `parseGitHubLink` over the addresses a person pastes: a repository, a folder and a file on github.com and
3
- * a file on raw.githubusercontent.com, each with and without `.git`, a trailing slash, a fragment and a query, under
4
- * http, with a port and without a scheme; the GitHub addresses the pack does not read, each refused and never answered
5
- * as another site's; and the addresses of other hosts, which are not GitHub's.
6
- */
7
- import { describe, expect, it } from 'vitest';
8
- import { parseGitHubLink } from '../documents/index.js';
9
- const COMMIT = '9f2c4e6a'.repeat(5);
10
- const REPOSITORY = { kind: 'github_repository', owner: 'acme-team', repo: 'handbook' };
11
- const REFUSED = { kind: 'refused' };
12
- /** A folder of the handbook at `refAndPath`. */
13
- function folder(refAndPath) {
14
- return { kind: 'github_folder', owner: 'acme-team', repo: 'handbook', refAndPath };
15
- }
16
- /** A file of the handbook at `refAndPath`, raw when the address served its bytes alone. */
17
- function file(refAndPath, raw = false) {
18
- return { kind: 'github_file', owner: 'acme-team', repo: 'handbook', refAndPath, raw };
19
- }
20
- describe('parseGitHubLink', () => {
21
- it('reads a repository whatever its scheme, port, .git, trailing slash, query or fragment', () => {
22
- const forms = [
23
- 'https://github.com/acme-team/handbook',
24
- 'https://github.com/acme-team/handbook/',
25
- 'https://github.com/acme-team/handbook.git',
26
- 'https://github.com/acme-team/handbook.git/',
27
- 'https://github.com/acme-team/handbook#readme',
28
- 'https://github.com/acme-team/handbook?tab=readme-ov-file',
29
- 'http://github.com/acme-team/handbook',
30
- 'https://github.com:8443/acme-team/handbook',
31
- 'https://www.github.com/acme-team/handbook',
32
- 'HTTPS://GitHub.COM/acme-team/handbook',
33
- ' https://github.com/acme-team/handbook\n',
34
- 'github.com/acme-team/handbook',
35
- 'github.com:8443/acme-team/handbook/',
36
- '//github.com/acme-team/handbook',
37
- 'git://github.com/acme-team/handbook.git',
38
- 'ssh://git@github.com/acme-team/handbook.git',
39
- 'git@github.com:acme-team/handbook.git',
40
- 'https://github.com./acme-team/handbook',
41
- // An address's host may end in more than one dot (https://url.spec.whatwg.org/#host-parsing keeps them all).
42
- 'https://github.com../acme-team/handbook',
43
- 'github.com...:8443/acme-team/handbook',
44
- ];
45
- for (const form of forms)
46
- expect(parseGitHubLink(form), form).toEqual(REPOSITORY);
47
- });
48
- it("reads a folder's ref and path as one text, a branch's own slashes included, for the connector to settle", () => {
49
- const forms = [
50
- ['https://github.com/acme-team/handbook/tree/release/1.0/docs', folder('release/1.0/docs')],
51
- ['https://github.com/acme-team/handbook/tree/release/1.0/docs/', folder('release/1.0/docs')],
52
- ['https://github.com/acme-team/handbook/tree/release/1.0/docs#top', folder('release/1.0/docs')],
53
- ['https://github.com/acme-team/handbook/tree/release/1.0/docs?plain=1', folder('release/1.0/docs')],
54
- ['http://github.com:80/acme-team/handbook/tree/main/docs', folder('main/docs')],
55
- ['github.com/acme-team/handbook/tree/main/docs', folder('main/docs')],
56
- ['https://github.com/acme-team/handbook.git/tree/main/docs', folder('main/docs')],
57
- ['https://github.com/acme-team/handbook/tree/main', folder('main')],
58
- // GitHub's own form of a branch by its full name, read as the branch.
59
- ['https://github.com/acme-team/handbook/tree/refs/heads/release/1.0/docs', folder('release/1.0/docs')],
60
- // Each segment decoded: a branch holding a "#", a folder holding a space.
61
- ['https://github.com/acme-team/handbook/tree/docs%231/guide%20one', folder('docs#1/guide one')],
62
- [`https://github.com/acme-team/handbook/tree/${COMMIT}/docs`, folder(`${COMMIT}/docs`)],
63
- // GitHub shows the folder for a blob address that names no path.
64
- ['https://github.com/acme-team/handbook/blob/main', folder('main')],
65
- ];
66
- for (const [form, link] of forms)
67
- expect(parseGitHubLink(form), form).toEqual(link);
68
- });
69
- it("reads a file on github.com and on raw.githubusercontent.com, GitHub's raw addresses marked raw", () => {
70
- const forms = [
71
- ['https://github.com/acme-team/handbook/blob/main/docs/agenda.md', file('main/docs/agenda.md')],
72
- ['https://github.com/acme-team/handbook/blob/main/docs/agenda.md#L3-L4', file('main/docs/agenda.md')],
73
- ['https://github.com/acme-team/handbook/blob/main/docs/agenda.md?plain=1', file('main/docs/agenda.md')],
74
- ['http://www.github.com/acme-team/handbook/blob/main/docs/agenda.md', file('main/docs/agenda.md')],
75
- [`https://github.com/acme-team/handbook/blob/${COMMIT}/docs/agenda.md`, file(`${COMMIT}/docs/agenda.md`)],
76
- ['https://github.com/acme-team/handbook/blob/refs/heads/main/docs/agenda.md', file('main/docs/agenda.md')],
77
- ['https://github.com/acme-team/handbook/raw/main/docs/agenda.md', file('main/docs/agenda.md', true)],
78
- ['https://github.com/acme-team/handbook/raw/refs/heads/main/docs/agenda.md', file('main/docs/agenda.md', true)],
79
- ['https://raw.githubusercontent.com/acme-team/handbook/main/docs/agenda.md', file('main/docs/agenda.md', true)],
80
- ['https://raw.githubusercontent.com/acme-team/handbook/refs/heads/main/docs/agenda.md', file('main/docs/agenda.md', true)],
81
- ['http://raw.githubusercontent.com:8443/acme-team/handbook/main/README.md', file('main/README.md', true)],
82
- ['raw.githubusercontent.com/acme-team/handbook/main/README.md', file('main/README.md', true)],
83
- // The text may be a branch alone (release/1.0): resolveRef settles it, answering an empty path for a ref alone.
84
- ['https://github.com/acme-team/handbook/blob/release/1.0', file('release/1.0')],
85
- ];
86
- for (const [form, link] of forms)
87
- expect(parseGitHubLink(form), form).toEqual(link);
88
- });
89
- it('refuses a GitHub address that names no repository, folder or file the pack reads', () => {
90
- const forms = [
91
- 'https://github.com/acme-team/handbook/issues/12',
92
- 'https://github.com/acme-team/handbook/pull/3',
93
- 'https://github.com/acme-team/handbook/pulls',
94
- 'https://github.com/acme-team/handbook/wiki',
95
- 'https://github.com/acme-team/handbook/wiki/Home',
96
- 'https://github.com/acme-team/handbook/releases',
97
- 'https://github.com/acme-team/handbook/releases/tag/v1.0',
98
- 'https://github.com/acme-team/handbook/actions',
99
- `https://github.com/acme-team/handbook/commit/${COMMIT}`,
100
- 'https://github.com/acme-team/handbook/compare/main...release',
101
- 'https://github.com/acme-team/handbook/discussions/4',
102
- 'https://github.com/acme-team/handbook/tree',
103
- 'https://github.com/acme-team/handbook/blob',
104
- 'https://github.com/acme-team/handbook/raw/main',
105
- 'https://github.com/acme-team/handbook/tree/refs/tags/v1.0/docs',
106
- 'https://github.com/acme-team/handbook/tree/refs/pull/3/head',
107
- 'https://github.com/acme-team/handbook/tree/main//docs',
108
- 'https://github.com/acme-team/handbook/tree/main/%2E%2E%2Fsecret',
109
- 'https://github.com/acme-team/handbook/tree/main/a%00b',
110
- 'https://github.com/acme-team/hand%ZZbook',
111
- 'https://github.com/acme-team/hand%20book',
112
- 'https://github.com/acme-team/.git',
113
- 'https://github.com/-acme/handbook',
114
- 'https://github.com/acme-team',
115
- 'https://github.com',
116
- 'https://github.com/',
117
- 'https://github.com/settings/profile',
118
- 'https://github.com/orgs/acme-team',
119
- 'https://github.com/topics/python',
120
- 'https://github.com/marketplace/actions',
121
- 'https://github.com/sponsors/someone',
122
- 'https://gist.github.com/someone/0123abcd',
123
- 'https://api.github.com/repos/acme-team/handbook',
124
- 'https://codeload.github.com/acme-team/handbook/zip/refs/heads/main',
125
- 'https://gist.githubusercontent.com/someone/0123abcd/raw/notes.md',
126
- 'https://objects.githubusercontent.com/github-production-release-asset/1',
127
- 'https://raw.githubusercontent.com/acme-team/handbook',
128
- 'https://raw.githubusercontent.com/acme-team/handbook/main',
129
- 'https://ghp_secret@github.com/acme-team/handbook',
130
- 'https://someone:secret@github.com/acme-team/handbook',
131
- 'https://git:secret@github.com/acme-team/handbook',
132
- 'someone@github.com:acme-team/handbook.git',
133
- 'git@gist.github.com:0123abcd.git',
134
- // Credentials before a GitHub host with no scheme, which a browser opens as an https address.
135
- 'x-access-token:ghs_secret@github.com/acme-team/handbook',
136
- 'someone:secret@github.com/acme-team/handbook/tree/main/docs',
137
- 'someone:secret@www.github.com:443/acme-team/handbook',
138
- 'someone:secret@raw.githubusercontent.com/acme-team/handbook/main/README.md',
139
- ];
140
- for (const form of forms)
141
- expect(parseGitHubLink(form), form).toEqual(REFUSED);
142
- });
143
- it('answers a GitHub host as a GitHub form or refused, never as another site, whatever the scheme, port, path or trailing dots', () => {
144
- const hosts = ['github.com', 'www.github.com', 'gist.github.com', 'api.github.com', 'codeload.github.com', 'raw.githubusercontent.com', 'gist.githubusercontent.com'];
145
- for (const host of hosts.flatMap((name) => [name, `${name}.`, `${name}..`])) {
146
- for (const scheme of ['https://', 'http://', '']) {
147
- for (const port of ['', ':8080']) {
148
- for (const path of ['/', '/x', '/a/b/c/d/e/f', '/a/b/unknown/x', '/a/b?x=1#y']) {
149
- const form = `${scheme}${host}${port}${path}`;
150
- expect(parseGitHubLink(form), form).not.toBeNull();
151
- }
152
- }
153
- }
154
- }
155
- });
156
- it("answers null for an address that is not GitHub's, and for text that is no address", () => {
157
- const forms = [
158
- 'https://example.com/acme-team/handbook',
159
- 'https://docs.github.com/en/rest/git/refs',
160
- 'https://acme-team.github.io/handbook/',
161
- 'https://github.blog/changelog/',
162
- 'https://notgithub.com/acme-team/handbook',
163
- 'https://evilgithub.com/acme-team/handbook',
164
- 'https://github.com.example.org/acme-team/handbook',
165
- 'https://githubusercontent.com.example.org/acme-team/handbook',
166
- 'https://drive.google.com/file/d/1AbC/view',
167
- 'git@gitlab.com:acme-team/handbook.git',
168
- 'mailto:someone@github.com',
169
- 'javascript:alert(1)',
170
- 'not a link',
171
- '',
172
- ' ',
173
- ];
174
- for (const form of forms)
175
- expect(parseGitHubLink(form), form).toBeNull();
176
- });
177
- it('refuses a value that is not text with a TypeError', () => {
178
- expect(() => parseGitHubLink(42)).toThrow(TypeError);
179
- expect(() => parseGitHubLink(null)).toThrow(TypeError);
180
- });
181
- });
182
- //# sourceMappingURL=links.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"links.test.js","sourceRoot":"","sources":["../../src/__tests__/links.test.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAmB,MAAM,uBAAuB,CAAC;AAEzE,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AACpC,MAAM,UAAU,GAAe,EAAE,IAAI,EAAE,mBAAmB,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;AACnG,MAAM,OAAO,GAAe,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;AAEhD,gDAAgD;AAChD,SAAS,MAAM,CAAC,UAAkB;IAChC,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC;AACrF,CAAC;AAED,2FAA2F;AAC3F,SAAS,IAAI,CAAC,UAAkB,EAAE,GAAG,GAAG,KAAK;IAC3C,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,GAAG,EAAE,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KAAK,MAAM,IAAI,IAAI,KAAK;YAAE,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC;IAC3E,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,mDAAmD,EAAE,GAAG,EAAE;QAC3D,MAAM,CAAC,GAAG,EAAE,CAAC,eAAe,CAAC,EAAuB,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QAC1E,MAAM,CAAC,GAAG,EAAE,CAAC,eAAe,CAAC,IAAyB,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAC9E,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,5 +0,0 @@
1
- /**
2
- * @fileoverview Tests for PR tools: diff, review, merge, comment list, comment create.
3
- */
4
- export {};
5
- //# sourceMappingURL=prTools.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"prTools.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/prTools.test.ts"],"names":[],"mappings":"AACA;;GAEG"}