@framers/agentos-ext-github 0.9.0 → 0.10.1

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 (67) hide show
  1. package/README.md +6 -6
  2. package/dist/documents/GitHubDocumentsConnector.d.ts +37 -11
  3. package/dist/documents/GitHubDocumentsConnector.d.ts.map +1 -1
  4. package/dist/documents/GitHubDocumentsConnector.js +67 -22
  5. package/dist/documents/GitHubDocumentsConnector.js.map +1 -1
  6. package/dist/documents/links.d.ts +19 -13
  7. package/dist/documents/links.d.ts.map +1 -1
  8. package/dist/documents/links.js +43 -24
  9. package/dist/documents/links.js.map +1 -1
  10. package/dist/documents/tree.d.ts +29 -10
  11. package/dist/documents/tree.d.ts.map +1 -1
  12. package/dist/documents/tree.js +70 -11
  13. package/dist/documents/tree.js.map +1 -1
  14. package/manifest.json +1 -1
  15. package/package.json +7 -5
  16. package/dist/__tests__/app.test.d.ts +0 -7
  17. package/dist/__tests__/app.test.d.ts.map +0 -1
  18. package/dist/__tests__/app.test.js +0 -1219
  19. package/dist/__tests__/app.test.js.map +0 -1
  20. package/dist/__tests__/documents.test.d.ts +0 -9
  21. package/dist/__tests__/documents.test.d.ts.map +0 -1
  22. package/dist/__tests__/documents.test.js +0 -644
  23. package/dist/__tests__/documents.test.js.map +0 -1
  24. package/dist/__tests__/entry.test.d.ts +0 -7
  25. package/dist/__tests__/entry.test.d.ts.map +0 -1
  26. package/dist/__tests__/entry.test.js +0 -34
  27. package/dist/__tests__/entry.test.js.map +0 -1
  28. package/dist/__tests__/events.test.d.ts +0 -8
  29. package/dist/__tests__/events.test.d.ts.map +0 -1
  30. package/dist/__tests__/events.test.js +0 -321
  31. package/dist/__tests__/events.test.js.map +0 -1
  32. package/dist/__tests__/fileAndBranchTools.test.d.ts +0 -6
  33. package/dist/__tests__/fileAndBranchTools.test.d.ts.map +0 -1
  34. package/dist/__tests__/fileAndBranchTools.test.js +0 -310
  35. package/dist/__tests__/fileAndBranchTools.test.js.map +0 -1
  36. package/dist/__tests__/indexer.test.d.ts +0 -6
  37. package/dist/__tests__/indexer.test.d.ts.map +0 -1
  38. package/dist/__tests__/indexer.test.js +0 -253
  39. package/dist/__tests__/indexer.test.js.map +0 -1
  40. package/dist/__tests__/issueTools.test.d.ts +0 -5
  41. package/dist/__tests__/issueTools.test.d.ts.map +0 -1
  42. package/dist/__tests__/issueTools.test.js +0 -183
  43. package/dist/__tests__/issueTools.test.js.map +0 -1
  44. package/dist/__tests__/links.test.d.ts +0 -10
  45. package/dist/__tests__/links.test.d.ts.map +0 -1
  46. package/dist/__tests__/links.test.js +0 -255
  47. package/dist/__tests__/links.test.js.map +0 -1
  48. package/dist/__tests__/prTools.test.d.ts +0 -5
  49. package/dist/__tests__/prTools.test.d.ts.map +0 -1
  50. package/dist/__tests__/prTools.test.js +0 -318
  51. package/dist/__tests__/prTools.test.js.map +0 -1
  52. package/dist/__tests__/refs.test.d.ts +0 -8
  53. package/dist/__tests__/refs.test.d.ts.map +0 -1
  54. package/dist/__tests__/refs.test.js +0 -702
  55. package/dist/__tests__/refs.test.js.map +0 -1
  56. package/dist/__tests__/releaseAndActionsTools.test.d.ts +0 -6
  57. package/dist/__tests__/releaseAndActionsTools.test.d.ts.map +0 -1
  58. package/dist/__tests__/releaseAndActionsTools.test.js +0 -315
  59. package/dist/__tests__/releaseAndActionsTools.test.js.map +0 -1
  60. package/dist/__tests__/repoTools.test.d.ts +0 -6
  61. package/dist/__tests__/repoTools.test.d.ts.map +0 -1
  62. package/dist/__tests__/repoTools.test.js +0 -308
  63. package/dist/__tests__/repoTools.test.js.map +0 -1
  64. package/dist/__tests__/service.test.d.ts +0 -6
  65. package/dist/__tests__/service.test.d.ts.map +0 -1
  66. package/dist/__tests__/service.test.js +0 -173
  67. 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;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAC9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AAI,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,10 +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, without a scheme, and as the URL standard reads a special scheme without its two slashes, with
5
- * backslashes or with controls around it; the GitHub addresses the pack does not read, GitHub Enterprise Cloud's
6
- * ghe.com hosts among them, each refused and never answered as another site's; and the addresses of other hosts,
7
- * which are not GitHub's.
8
- */
9
- export {};
10
- //# 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;;;;;;;GAOG"}
@@ -1,255 +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, without a scheme, and as the URL standard reads a special scheme without its two slashes, with
5
- * backslashes or with controls around it; the GitHub addresses the pack does not read, GitHub Enterprise Cloud's
6
- * ghe.com hosts among them, each refused and never answered as another site's; and the addresses of other hosts,
7
- * which are not GitHub's.
8
- */
9
- import { describe, expect, it } from 'vitest';
10
- import { parseGitHubLink } from '../documents/index.js';
11
- const COMMIT = '9f2c4e6a'.repeat(5);
12
- const REPOSITORY = { kind: 'github_repository', owner: 'acme-team', repo: 'handbook' };
13
- const REFUSED = { kind: 'refused' };
14
- /** A folder of the handbook at `refAndPath`. */
15
- function folder(refAndPath) {
16
- return { kind: 'github_folder', owner: 'acme-team', repo: 'handbook', refAndPath };
17
- }
18
- /** A file of the handbook at `refAndPath`, raw when the address served its bytes alone. */
19
- function file(refAndPath, raw = false) {
20
- return { kind: 'github_file', owner: 'acme-team', repo: 'handbook', refAndPath, raw };
21
- }
22
- describe('parseGitHubLink', () => {
23
- it('reads a repository whatever its scheme, port, .git, trailing slash, query or fragment', () => {
24
- const forms = [
25
- 'https://github.com/acme-team/handbook',
26
- 'https://github.com/acme-team/handbook/',
27
- 'https://github.com/acme-team/handbook.git',
28
- 'https://github.com/acme-team/handbook.git/',
29
- 'https://github.com/acme-team/handbook#readme',
30
- 'https://github.com/acme-team/handbook?tab=readme-ov-file',
31
- 'http://github.com/acme-team/handbook',
32
- 'https://github.com:8443/acme-team/handbook',
33
- 'https://www.github.com/acme-team/handbook',
34
- 'HTTPS://GitHub.COM/acme-team/handbook',
35
- ' https://github.com/acme-team/handbook\n',
36
- 'github.com/acme-team/handbook',
37
- 'github.com:8443/acme-team/handbook/',
38
- '//github.com/acme-team/handbook',
39
- 'git://github.com/acme-team/handbook.git',
40
- 'ssh://git@github.com/acme-team/handbook.git',
41
- 'git@github.com:acme-team/handbook.git',
42
- 'https://github.com./acme-team/handbook',
43
- // An address's host may end in more than one dot (https://url.spec.whatwg.org/#host-parsing keeps them all).
44
- 'https://github.com../acme-team/handbook',
45
- 'github.com...:8443/acme-team/handbook',
46
- ];
47
- for (const form of forms)
48
- expect(parseGitHubLink(form), form).toEqual(REPOSITORY);
49
- });
50
- it("reads a folder's ref and path as one text, a branch's own slashes included, for the connector to settle", () => {
51
- const forms = [
52
- ['https://github.com/acme-team/handbook/tree/release/1.0/docs', folder('release/1.0/docs')],
53
- ['https://github.com/acme-team/handbook/tree/release/1.0/docs/', folder('release/1.0/docs')],
54
- ['https://github.com/acme-team/handbook/tree/release/1.0/docs#top', folder('release/1.0/docs')],
55
- ['https://github.com/acme-team/handbook/tree/release/1.0/docs?plain=1', folder('release/1.0/docs')],
56
- ['http://github.com:80/acme-team/handbook/tree/main/docs', folder('main/docs')],
57
- ['github.com/acme-team/handbook/tree/main/docs', folder('main/docs')],
58
- ['https://github.com/acme-team/handbook.git/tree/main/docs', folder('main/docs')],
59
- ['https://github.com/acme-team/handbook/tree/main', folder('main')],
60
- // GitHub's own form of a branch by its full name, read as the branch.
61
- ['https://github.com/acme-team/handbook/tree/refs/heads/release/1.0/docs', folder('release/1.0/docs')],
62
- // Each segment decoded: a branch holding a "#", a folder holding a space.
63
- ['https://github.com/acme-team/handbook/tree/docs%231/guide%20one', folder('docs#1/guide one')],
64
- [`https://github.com/acme-team/handbook/tree/${COMMIT}/docs`, folder(`${COMMIT}/docs`)],
65
- // GitHub shows the folder for a blob address that names no path.
66
- ['https://github.com/acme-team/handbook/blob/main', folder('main')],
67
- ];
68
- for (const [form, link] of forms)
69
- expect(parseGitHubLink(form), form).toEqual(link);
70
- });
71
- it("reads a file on github.com and on raw.githubusercontent.com, GitHub's raw addresses marked raw", () => {
72
- const forms = [
73
- ['https://github.com/acme-team/handbook/blob/main/docs/agenda.md', file('main/docs/agenda.md')],
74
- ['https://github.com/acme-team/handbook/blob/main/docs/agenda.md#L3-L4', file('main/docs/agenda.md')],
75
- ['https://github.com/acme-team/handbook/blob/main/docs/agenda.md?plain=1', file('main/docs/agenda.md')],
76
- ['http://www.github.com/acme-team/handbook/blob/main/docs/agenda.md', file('main/docs/agenda.md')],
77
- [`https://github.com/acme-team/handbook/blob/${COMMIT}/docs/agenda.md`, file(`${COMMIT}/docs/agenda.md`)],
78
- ['https://github.com/acme-team/handbook/blob/refs/heads/main/docs/agenda.md', file('main/docs/agenda.md')],
79
- ['https://github.com/acme-team/handbook/raw/main/docs/agenda.md', file('main/docs/agenda.md', true)],
80
- ['https://github.com/acme-team/handbook/raw/refs/heads/main/docs/agenda.md', file('main/docs/agenda.md', true)],
81
- ['https://raw.githubusercontent.com/acme-team/handbook/main/docs/agenda.md', file('main/docs/agenda.md', true)],
82
- ['https://raw.githubusercontent.com/acme-team/handbook/refs/heads/main/docs/agenda.md', file('main/docs/agenda.md', true)],
83
- ['http://raw.githubusercontent.com:8443/acme-team/handbook/main/README.md', file('main/README.md', true)],
84
- ['raw.githubusercontent.com/acme-team/handbook/main/README.md', file('main/README.md', true)],
85
- // The text may be a branch alone (release/1.0): resolveRef settles it, answering an empty path for a ref alone.
86
- ['https://github.com/acme-team/handbook/blob/release/1.0', file('release/1.0')],
87
- ];
88
- for (const [form, link] of forms)
89
- expect(parseGitHubLink(form), form).toEqual(link);
90
- });
91
- it('reads an address as the URL standard does: a special scheme without its two slashes or with backslashes, the controls and spaces around it, and tabs and newlines in it', () => {
92
- // After http, https, ws, wss and ftp the standard takes any run of / and \, none included, before the host
93
- // (https://url.spec.whatwg.org/#special-authority-slashes-state), and after file two of them; it drops the C0
94
- // controls and spaces around an address and every tab and newline in it
95
- // (https://url.spec.whatwg.org/#concept-basic-url-parser). A browser reads each of these as the GitHub address.
96
- const repositories = [
97
- 'https:github.com/acme-team/handbook',
98
- 'https:/github.com/acme-team/handbook',
99
- 'http:github.com/acme-team/handbook',
100
- 'HTTPS:///github.com/acme-team/handbook',
101
- 'https:\\\\github.com\\acme-team\\handbook',
102
- 'https:\\/github.com/acme-team/handbook',
103
- 'https://github.com\\acme-team\\handbook',
104
- 'wss:github.com/acme-team/handbook',
105
- 'ftp:/github.com:8443/acme-team/handbook',
106
- 'file:\\\\github.com\\acme-team\\handbook',
107
- '\u0001https://github.com/acme-team/handbook',
108
- 'https://github.com/acme-team/handbook\u0000',
109
- '\u001f\u0000 https:github.com/acme-team/handbook \u0007',
110
- 'ht\ttps://github.com/acme-team/handbook',
111
- 'ht\ntps:git\r\nhub.com/acme-team/hand\tbook',
112
- ];
113
- for (const form of repositories)
114
- expect(parseGitHubLink(form), JSON.stringify(form)).toEqual(REPOSITORY);
115
- const forms = [
116
- ['https:github.com/acme-team/handbook/tree/main/docs', folder('main/docs')],
117
- ['https:\\\\github.com\\acme-team\\handbook\\blob\\main\\docs\\agenda.md', file('main/docs/agenda.md')],
118
- ['\u0002http:/raw.githubusercontent.com/acme-team/handbook/main/README.md', file('main/README.md', true)],
119
- ];
120
- for (const [form, link] of forms)
121
- expect(parseGitHubLink(form), JSON.stringify(form)).toEqual(link);
122
- const credentials = [
123
- 'https:someone:secret@github.com/acme-team/handbook',
124
- 'http:ghp_secret@github.com/acme-team/handbook',
125
- 'https:\\\\x-access-token:ghs_secret@github.com\\acme-team\\handbook',
126
- ];
127
- for (const form of credentials)
128
- expect(parseGitHubLink(form), form).toEqual(REFUSED);
129
- // A scheme the standard does not treat as special names a host only after "//"; another host is not GitHub's.
130
- for (const form of ['git:github.com/acme-team/handbook', 'https:example.com/acme-team/handbook', '\u0001mailto:someone@github.com']) {
131
- expect(parseGitHubLink(form), JSON.stringify(form)).toBeNull();
132
- }
133
- // After file and its two slashes, a third slash or backslash leaves the host empty
134
- // (https://url.spec.whatwg.org/#file-host-state): the address is a path on no host, and GitHub's name its first segment.
135
- for (const form of ['file:///github.com/acme-team/handbook', 'file:\\\\\\github.com\\acme-team\\handbook', 'FILE:\\//github.com/acme-team/handbook']) {
136
- expect(parseGitHubLink(form), JSON.stringify(form)).toBeNull();
137
- }
138
- });
139
- it('refuses a GitHub address that names no repository, folder or file the pack reads', () => {
140
- const forms = [
141
- 'https://github.com/acme-team/handbook/issues/12',
142
- 'https://github.com/acme-team/handbook/pull/3',
143
- 'https://github.com/acme-team/handbook/pulls',
144
- 'https://github.com/acme-team/handbook/wiki',
145
- 'https://github.com/acme-team/handbook/wiki/Home',
146
- 'https://github.com/acme-team/handbook/releases',
147
- 'https://github.com/acme-team/handbook/releases/tag/v1.0',
148
- 'https://github.com/acme-team/handbook/actions',
149
- `https://github.com/acme-team/handbook/commit/${COMMIT}`,
150
- 'https://github.com/acme-team/handbook/compare/main...release',
151
- 'https://github.com/acme-team/handbook/discussions/4',
152
- 'https://github.com/acme-team/handbook/tree',
153
- 'https://github.com/acme-team/handbook/blob',
154
- 'https://github.com/acme-team/handbook/raw/main',
155
- 'https://github.com/acme-team/handbook/tree/refs/tags/v1.0/docs',
156
- 'https://github.com/acme-team/handbook/tree/refs/pull/3/head',
157
- 'https://github.com/acme-team/handbook/tree/main//docs',
158
- 'https://github.com/acme-team/handbook/tree/main/%2E%2E%2Fsecret',
159
- 'https://github.com/acme-team/handbook/tree/main/a%00b',
160
- 'https://github.com/acme-team/hand%ZZbook',
161
- 'https://github.com/acme-team/hand%20book',
162
- 'https://github.com/acme-team/.git',
163
- 'https://github.com/-acme/handbook',
164
- 'https://github.com/acme-team',
165
- 'https://github.com',
166
- 'https://github.com/',
167
- 'https://github.com/settings/profile',
168
- 'https://github.com/orgs/acme-team',
169
- 'https://github.com/topics/python',
170
- 'https://github.com/marketplace/actions',
171
- 'https://github.com/sponsors/someone',
172
- 'https://gist.github.com/someone/0123abcd',
173
- 'https://api.github.com/repos/acme-team/handbook',
174
- 'https://codeload.github.com/acme-team/handbook/zip/refs/heads/main',
175
- 'https://gist.githubusercontent.com/someone/0123abcd/raw/notes.md',
176
- 'https://objects.githubusercontent.com/github-production-release-asset/1',
177
- 'https://raw.githubusercontent.com/acme-team/handbook',
178
- 'https://raw.githubusercontent.com/acme-team/handbook/main',
179
- 'https://ghp_secret@github.com/acme-team/handbook',
180
- 'https://someone:secret@github.com/acme-team/handbook',
181
- 'https://git:secret@github.com/acme-team/handbook',
182
- 'someone@github.com:acme-team/handbook.git',
183
- 'git@gist.github.com:0123abcd.git',
184
- // Credentials before a GitHub host with no scheme, which a browser opens as an https address.
185
- 'x-access-token:ghs_secret@github.com/acme-team/handbook',
186
- 'someone:secret@github.com/acme-team/handbook/tree/main/docs',
187
- 'someone:secret@www.github.com:443/acme-team/handbook',
188
- 'someone:secret@raw.githubusercontent.com/acme-team/handbook/main/README.md',
189
- // GitHub Enterprise Cloud with data residency: an enterprise on a subdomain of ghe.com, its API on
190
- // api.<subdomain>.ghe.com (https://docs.github.com/en/enterprise-cloud@latest/admin/data-residency/about-github-enterprise-cloud-with-data-residency).
191
- 'https://octocorp.ghe.com/acme-team/handbook',
192
- 'https://octocorp.ghe.com/acme-team/handbook/tree/main/docs',
193
- 'https://api.octocorp.ghe.com/repos/acme-team/handbook',
194
- 'octocorp.ghe.com./acme-team/handbook',
195
- 'https://ghe.com',
196
- ];
197
- for (const form of forms)
198
- expect(parseGitHubLink(form), form).toEqual(REFUSED);
199
- });
200
- it('answers a GitHub host as a GitHub form or refused, never as another site, whatever the scheme, its slashes, port, path, trailing dots or controls around it', () => {
201
- const hosts = [
202
- 'github.com',
203
- 'www.github.com',
204
- 'gist.github.com',
205
- 'api.github.com',
206
- 'codeload.github.com',
207
- 'raw.githubusercontent.com',
208
- 'gist.githubusercontent.com',
209
- 'ghe.com',
210
- 'octocorp.ghe.com',
211
- 'api.octocorp.ghe.com',
212
- ];
213
- const schemes = ['https://', 'http://', '', 'https:', 'http:/', 'https:\\\\', 'WSS:\\/', '\u0001https://', ' \u0000'];
214
- for (const host of hosts.flatMap((name) => [name, `${name}.`, `${name}..`])) {
215
- for (const scheme of schemes) {
216
- for (const port of ['', ':8080']) {
217
- for (const path of ['/', '/x', '/a/b/c/d/e/f', '/a/b/unknown/x', '/a/b?x=1#y']) {
218
- for (const tail of ['', '\u0000', ' \u001f']) {
219
- const form = `${scheme}${host}${port}${path}${tail}`;
220
- expect(parseGitHubLink(form), JSON.stringify(form)).not.toBeNull();
221
- }
222
- }
223
- }
224
- }
225
- }
226
- });
227
- it("answers null for an address that is not GitHub's, and for text that is no address", () => {
228
- const forms = [
229
- 'https://example.com/acme-team/handbook',
230
- 'https://docs.github.com/en/rest/git/refs',
231
- 'https://acme-team.github.io/handbook/',
232
- 'https://github.blog/changelog/',
233
- 'https://notgithub.com/acme-team/handbook',
234
- 'https://evilgithub.com/acme-team/handbook',
235
- 'https://github.com.example.org/acme-team/handbook',
236
- 'https://githubusercontent.com.example.org/acme-team/handbook',
237
- 'https://ghe.com.example.org/acme-team/handbook',
238
- 'https://notghe.com/acme-team/handbook',
239
- 'https://drive.google.com/file/d/1AbC/view',
240
- 'git@gitlab.com:acme-team/handbook.git',
241
- 'mailto:someone@github.com',
242
- 'javascript:alert(1)',
243
- 'not a link',
244
- '',
245
- ' ',
246
- ];
247
- for (const form of forms)
248
- expect(parseGitHubLink(form), form).toBeNull();
249
- });
250
- it('refuses a value that is not text with a TypeError', () => {
251
- expect(() => parseGitHubLink(42)).toThrow(TypeError);
252
- expect(() => parseGitHubLink(null)).toThrow(TypeError);
253
- });
254
- });
255
- //# 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;;;;;;;GAOG;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,CAAC;AACxF,CAAC;AAED,QAAQ,CAAC,iBAAiB,EAAE,GAAG,EAAE;IAC/B,EAAE,CAAC,uFAAuF,EAAE,GAAG,EAAE;QAC/F,MAAM,KAAK,GAAG;YACZ,uCAAuC;YACvC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//# 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"}