@commandable/integration-data 0.0.5 → 0.0.6
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.
- package/dist/credentials-index.d.ts.map +1 -1
- package/dist/credentials-index.js +64 -0
- package/dist/credentials-index.js.map +1 -1
- package/integrations/github/__tests__/get_handlers.test.ts +202 -7
- package/integrations/github/__tests__/write_handlers.test.ts +171 -21
- package/integrations/github/handlers/create_commit.js +10 -2
- package/integrations/github/handlers/create_pull_request_review.js +10 -0
- package/integrations/github/handlers/create_release.js +14 -0
- package/integrations/github/handlers/delete_branch.js +8 -0
- package/integrations/github/handlers/delete_file.js +9 -0
- package/integrations/github/handlers/fork_repo.js +10 -0
- package/integrations/github/handlers/get_commit.js +8 -0
- package/integrations/github/handlers/get_file_contents.js +21 -0
- package/integrations/github/handlers/get_job_logs.js +6 -0
- package/integrations/github/handlers/get_latest_release.js +4 -0
- package/integrations/github/handlers/get_me.js +4 -0
- package/integrations/github/handlers/get_pull_request.js +4 -0
- package/integrations/github/handlers/get_pull_request_diff.js +8 -0
- package/integrations/github/handlers/get_repo_tree.js +12 -0
- package/integrations/github/handlers/get_workflow_run.js +4 -0
- package/integrations/github/handlers/list_branches.js +6 -1
- package/integrations/github/handlers/list_commits.js +5 -6
- package/integrations/github/handlers/list_issue_comments.js +8 -0
- package/integrations/github/handlers/list_issues.js +5 -6
- package/integrations/github/handlers/list_labels.js +8 -0
- package/integrations/github/handlers/list_pull_request_comments.js +8 -0
- package/integrations/github/handlers/list_pull_request_files.js +8 -0
- package/integrations/github/handlers/list_pull_requests.js +7 -2
- package/integrations/github/handlers/list_releases.js +8 -0
- package/integrations/github/handlers/list_tags.js +8 -0
- package/integrations/github/handlers/list_workflow_runs.js +11 -0
- package/integrations/github/handlers/request_pull_request_reviewers.js +10 -0
- package/integrations/github/handlers/search_code.js +8 -0
- package/integrations/github/handlers/search_issues.js +8 -0
- package/integrations/github/handlers/search_pull_requests.js +8 -0
- package/integrations/github/handlers/search_repos.js +10 -0
- package/integrations/github/handlers/update_pull_request.js +13 -0
- package/integrations/github/manifest.json +58 -20
- package/integrations/github/schemas/create_pull_request_review.json +17 -0
- package/integrations/github/schemas/create_release.json +16 -0
- package/integrations/github/schemas/delete_branch.json +10 -0
- package/integrations/github/schemas/delete_file.json +13 -0
- package/integrations/github/schemas/fork_repo.json +11 -0
- package/integrations/github/schemas/get_commit.json +12 -0
- package/integrations/github/schemas/get_file_contents.json +11 -0
- package/integrations/github/schemas/get_job_logs.json +10 -0
- package/integrations/github/schemas/get_pull_request.json +10 -0
- package/integrations/github/schemas/get_pull_request_diff.json +10 -0
- package/integrations/github/schemas/get_repo_tree.json +12 -0
- package/integrations/github/schemas/get_workflow_run.json +10 -0
- package/integrations/github/schemas/list_branches.json +12 -0
- package/integrations/github/schemas/list_commits.json +5 -3
- package/integrations/github/schemas/list_issue_comments.json +12 -0
- package/integrations/github/schemas/list_issues.json +4 -2
- package/integrations/github/schemas/list_labels.json +11 -0
- package/integrations/github/schemas/list_pull_request_comments.json +12 -0
- package/integrations/github/schemas/list_pull_request_files.json +12 -0
- package/integrations/github/schemas/list_pull_requests.json +7 -1
- package/integrations/github/schemas/list_releases.json +11 -0
- package/integrations/github/schemas/list_tags.json +11 -0
- package/integrations/github/schemas/list_workflow_runs.json +18 -0
- package/integrations/github/schemas/request_pull_request_reviewers.json +20 -0
- package/integrations/github/schemas/search_code.json +10 -0
- package/integrations/github/schemas/search_issues.json +10 -0
- package/integrations/github/schemas/search_pull_requests.json +10 -0
- package/integrations/github/schemas/search_repos.json +12 -0
- package/integrations/github/schemas/update_pull_request.json +15 -0
- package/integrations/google-calendar/__tests__/write_and_admin_handlers.test.ts +0 -13
- package/integrations/google-calendar/handlers/get_event.js +5 -1
- package/integrations/google-calendar/handlers/list_events.js +2 -0
- package/integrations/google-calendar/manifest.json +17 -18
- package/integrations/google-calendar/prompt.md +68 -0
- package/integrations/google-calendar/schemas/id_calendar_event.json +4 -2
- package/integrations/google-calendar/schemas/list_events.json +10 -8
- package/integrations/google-docs/__tests__/get_handlers.test.ts +4 -19
- package/integrations/google-docs/__tests__/write_handlers.test.ts +31 -48
- package/integrations/google-docs/handlers/read_document.js +189 -0
- package/integrations/google-docs/manifest.json +16 -31
- package/integrations/google-docs/prompt.md +49 -0
- package/integrations/google-docs/schemas/{get_document_text.json → read_document.json} +5 -2
- package/integrations/google-docs/todo.md +18 -0
- package/integrations/google-drive/__tests__/handlers.test.ts +43 -0
- package/integrations/google-drive/__tests__/usage_parity.test.ts +9 -0
- package/integrations/google-drive/handlers/get_file.js +2 -4
- package/integrations/google-drive/handlers/get_file_content.js +41 -0
- package/integrations/google-drive/handlers/list_files.js +15 -0
- package/integrations/google-drive/handlers/search_files.js +20 -0
- package/integrations/google-drive/handlers/share_file.js +20 -0
- package/integrations/google-drive/manifest.json +37 -10
- package/integrations/google-drive/prompt.md +59 -0
- package/integrations/google-drive/schemas/get_file.json +2 -2
- package/integrations/google-drive/schemas/get_file_content.json +11 -0
- package/integrations/google-drive/schemas/list_files.json +12 -0
- package/integrations/google-drive/schemas/search_files.json +14 -0
- package/integrations/google-drive/schemas/share_file.json +23 -0
- package/integrations/google-gmail/__tests__/get_handlers.test.ts +134 -0
- package/integrations/google-gmail/__tests__/usage_parity.test.ts +9 -0
- package/integrations/google-gmail/__tests__/write_and_admin_handlers.test.ts +211 -0
- package/integrations/google-gmail/credentials.json +57 -0
- package/integrations/google-gmail/credentials_hint_oauth_token.md +8 -0
- package/integrations/google-gmail/credentials_hint_service_account.md +10 -0
- package/integrations/google-gmail/handlers/create_draft_email.js +27 -0
- package/integrations/google-gmail/handlers/create_label.js +12 -0
- package/integrations/google-gmail/handlers/delete_draft.js +13 -0
- package/integrations/google-gmail/handlers/delete_label.js +13 -0
- package/integrations/google-gmail/handlers/delete_message.js +13 -0
- package/integrations/google-gmail/handlers/delete_thread.js +13 -0
- package/integrations/google-gmail/handlers/get_draft.js +6 -0
- package/integrations/google-gmail/handlers/get_label.js +6 -0
- package/integrations/google-gmail/handlers/get_message.js +14 -0
- package/integrations/google-gmail/handlers/get_profile.js +5 -0
- package/integrations/google-gmail/handlers/get_thread.js +14 -0
- package/integrations/google-gmail/handlers/list_drafts.js +15 -0
- package/integrations/google-gmail/handlers/list_labels.js +5 -0
- package/integrations/google-gmail/handlers/list_messages.js +19 -0
- package/integrations/google-gmail/handlers/list_threads.js +19 -0
- package/integrations/google-gmail/handlers/modify_message.js +11 -0
- package/integrations/google-gmail/handlers/modify_thread.js +11 -0
- package/integrations/google-gmail/handlers/read_email.js +56 -0
- package/integrations/google-gmail/handlers/send_draft.js +15 -0
- package/integrations/google-gmail/handlers/send_email.js +22 -0
- package/integrations/google-gmail/handlers/trash_message.js +6 -0
- package/integrations/google-gmail/handlers/trash_thread.js +6 -0
- package/integrations/google-gmail/handlers/untrash_message.js +6 -0
- package/integrations/google-gmail/handlers/untrash_thread.js +6 -0
- package/integrations/google-gmail/handlers/update_label.js +15 -0
- package/integrations/google-gmail/manifest.json +33 -0
- package/integrations/google-gmail/prompt.md +52 -0
- package/integrations/google-gmail/schemas/create_draft_email.json +16 -0
- package/integrations/google-gmail/schemas/create_label.json +26 -0
- package/integrations/google-gmail/schemas/get_message.json +20 -0
- package/integrations/{google-docs/schemas/get_document_structured.json → google-gmail/schemas/get_profile.json} +4 -2
- package/integrations/google-gmail/schemas/get_thread.json +20 -0
- package/integrations/google-gmail/schemas/id_draft.json +16 -0
- package/integrations/google-gmail/schemas/id_label.json +16 -0
- package/integrations/google-gmail/schemas/id_message.json +16 -0
- package/integrations/google-gmail/schemas/id_thread.json +16 -0
- package/integrations/google-gmail/schemas/list_drafts.json +30 -0
- package/integrations/{google-sheet/schemas/get_developer_metadata.json → google-gmail/schemas/list_labels.json} +4 -3
- package/integrations/google-gmail/schemas/list_messages.json +35 -0
- package/integrations/google-gmail/schemas/list_threads.json +35 -0
- package/integrations/google-gmail/schemas/modify_message.json +24 -0
- package/integrations/google-gmail/schemas/modify_thread.json +24 -0
- package/integrations/google-gmail/schemas/read_email.json +10 -0
- package/integrations/google-gmail/schemas/send_draft.json +29 -0
- package/integrations/google-gmail/schemas/send_email.json +17 -0
- package/integrations/google-gmail/schemas/update_label.json +33 -0
- package/integrations/google-sheet/__tests__/get_handlers.test.ts +6 -52
- package/integrations/google-sheet/__tests__/write_handlers.test.ts +0 -20
- package/integrations/google-sheet/handlers/get_spreadsheet.js +2 -0
- package/integrations/google-sheet/handlers/read_sheet.js +75 -0
- package/integrations/google-sheet/manifest.json +13 -62
- package/integrations/google-sheet/prompt.md +49 -0
- package/integrations/google-sheet/schemas/get_spreadsheet.json +5 -4
- package/integrations/google-sheet/schemas/read_sheet.json +21 -0
- package/integrations/google-slides/__tests__/get_handlers.test.ts +12 -9
- package/integrations/google-slides/handlers/read_presentation.js +51 -0
- package/integrations/google-slides/manifest.json +13 -13
- package/integrations/google-slides/prompt.md +56 -0
- package/integrations/new_integration_prompt.md +5 -1
- package/package.json +1 -1
- package/integrations/google-calendar/handlers/update_event.js +0 -5
- package/integrations/google-calendar/schemas/update_event.json +0 -10
- package/integrations/google-docs/handlers/get_document.js +0 -12
- package/integrations/google-docs/handlers/get_document_structured.js +0 -6
- package/integrations/google-docs/handlers/get_document_text.js +0 -17
- package/integrations/google-docs/schemas/get_document.json +0 -11
- package/integrations/google-sheet/handlers/batch_clear_values_by_data_filter.js +0 -6
- package/integrations/google-sheet/handlers/batch_get_values.js +0 -16
- package/integrations/google-sheet/handlers/batch_update_values_by_data_filter.js +0 -16
- package/integrations/google-sheet/handlers/get_developer_metadata.js +0 -6
- package/integrations/google-sheet/handlers/get_spreadsheet_by_data_filter.js +0 -10
- package/integrations/google-sheet/handlers/get_values.js +0 -14
- package/integrations/google-sheet/handlers/get_values_by_data_filter.js +0 -14
- package/integrations/google-sheet/handlers/search_developer_metadata.js +0 -7
- package/integrations/google-sheet/schemas/batch_clear_values_by_data_filter.json +0 -10
- package/integrations/google-sheet/schemas/batch_get_values.json +0 -13
- package/integrations/google-sheet/schemas/batch_update_values_by_data_filter.json +0 -25
- package/integrations/google-sheet/schemas/get_spreadsheet_by_data_filter.json +0 -11
- package/integrations/google-sheet/schemas/get_values.json +0 -13
- package/integrations/google-sheet/schemas/get_values_by_data_filter.json +0 -17
- package/integrations/google-sheet/schemas/search_developer_metadata.json +0 -14
- package/integrations/google-slides/handlers/get_presentation.js +0 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credentials-index.d.ts","sourceRoot":"","sources":["../src/credentials-index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA;AAEzD,YAAY,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA;AAElF,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,sBAAsB,CAAA;IAChC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAC9B;AAED,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,sBAAsB,
|
|
1
|
+
{"version":3,"file":"credentials-index.d.ts","sourceRoot":"","sources":["../src/credentials-index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA;AAEzD,YAAY,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA;AAElF,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,sBAAsB,CAAA;IAChC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAC9B;AAED,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,sBAAsB,CAsiBpE,CAAA"}
|
|
@@ -404,6 +404,70 @@ Note: OAuth access tokens expire (typically after 1 hour). Prefer Service Accoun
|
|
|
404
404
|
https://www.googleapis.com/auth/presentations
|
|
405
405
|
https://www.googleapis.com/auth/drive
|
|
406
406
|
|
|
407
|
+
Note: OAuth access tokens expire (typically after 1 hour). Prefer Service Account for long-running use.`,
|
|
408
|
+
},
|
|
409
|
+
},
|
|
410
|
+
'google-gmail': {
|
|
411
|
+
variants: {
|
|
412
|
+
variants: {
|
|
413
|
+
service_account: {
|
|
414
|
+
label: 'Service Account (recommended)',
|
|
415
|
+
schema: {
|
|
416
|
+
type: 'object',
|
|
417
|
+
properties: {
|
|
418
|
+
serviceAccountJson: {
|
|
419
|
+
type: 'string',
|
|
420
|
+
title: 'Service Account JSON',
|
|
421
|
+
description: 'Full service account key JSON (contents of the downloaded JSON file from Google Cloud).',
|
|
422
|
+
},
|
|
423
|
+
subject: {
|
|
424
|
+
type: 'string',
|
|
425
|
+
title: 'Subject / impersonated user (optional)',
|
|
426
|
+
description: 'User email to impersonate via Google Workspace domain-wide delegation. Usually required for mailbox access.',
|
|
427
|
+
},
|
|
428
|
+
scopes: {
|
|
429
|
+
type: 'array',
|
|
430
|
+
title: 'OAuth scopes (optional)',
|
|
431
|
+
description: 'Optional override for OAuth scopes. Defaults to full Gmail access.',
|
|
432
|
+
items: { type: 'string' },
|
|
433
|
+
},
|
|
434
|
+
},
|
|
435
|
+
required: ['serviceAccountJson'],
|
|
436
|
+
additionalProperties: false,
|
|
437
|
+
},
|
|
438
|
+
injection: { headers: { Authorization: 'Bearer {{token}}' } },
|
|
439
|
+
preprocess: 'google_service_account',
|
|
440
|
+
},
|
|
441
|
+
oauth_token: {
|
|
442
|
+
label: 'OAuth Access Token (short-lived)',
|
|
443
|
+
schema: {
|
|
444
|
+
type: 'object',
|
|
445
|
+
properties: {
|
|
446
|
+
token: {
|
|
447
|
+
type: 'string',
|
|
448
|
+
title: 'OAuth Access Token',
|
|
449
|
+
description: 'Short-lived Google OAuth access token with Gmail scopes.',
|
|
450
|
+
},
|
|
451
|
+
},
|
|
452
|
+
required: ['token'],
|
|
453
|
+
additionalProperties: false,
|
|
454
|
+
},
|
|
455
|
+
injection: { headers: { Authorization: 'Bearer {{token}}' } },
|
|
456
|
+
},
|
|
457
|
+
},
|
|
458
|
+
default: 'service_account',
|
|
459
|
+
},
|
|
460
|
+
hints: {
|
|
461
|
+
service_account: `Set up a Google Cloud Service Account:
|
|
462
|
+
|
|
463
|
+
1. Enable the Gmail API
|
|
464
|
+
2. Go to IAM & Admin -> Service Accounts and create a new service account
|
|
465
|
+
3. Download a JSON key and paste its full contents here
|
|
466
|
+
4. For Google Workspace mailboxes, configure domain-wide delegation and set \`subject\` to the target user's email`,
|
|
467
|
+
oauth_token: `Obtain a short-lived Google OAuth access token with scopes such as:
|
|
468
|
+
https://www.googleapis.com/auth/gmail.modify
|
|
469
|
+
https://www.googleapis.com/auth/gmail.send
|
|
470
|
+
|
|
407
471
|
Note: OAuth access tokens expire (typically after 1 hour). Prefer Service Account for long-running use.`,
|
|
408
472
|
},
|
|
409
473
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credentials-index.js","sourceRoot":"","sources":["../src/credentials-index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAWH,MAAM,CAAC,MAAM,iBAAiB,GAA2C;IACvE,QAAQ,EAAE;QACR,QAAQ,EAAE;YACR,QAAQ,EAAE;gBACR,qBAAqB,EAAE;oBACrB,KAAK,EAAE,uBAAuB;oBAC9B,MAAM,EAAE;wBACN,IAAI,EAAE,QAAQ;wBACd,UAAU,EAAE;4BACV,KAAK,EAAE;gCACL,IAAI,EAAE,QAAQ;gCACd,KAAK,EAAE,uBAAuB;gCAC9B,WAAW,EAAE,iCAAiC;6BAC/C;yBACF;wBACD,QAAQ,EAAE,CAAC,OAAO,CAAC;wBACnB,oBAAoB,EAAE,KAAK;qBAC5B;oBACD,SAAS,EAAE,EAAE,OAAO,EAAE,EAAE,aAAa,EAAE,kBAAkB,EAAE,EAAE;iBAC9D;aACF;YACD,OAAO,EAAE,uBAAuB;SACjC;QACD,KAAK,EAAE;YACL,qBAAqB,EAAE;;kGAEqE;SAC7F;KACF;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E,KAAK;qBAC5B;oBACD,SAAS,EAAE;wBACT,OAAO,EAAE;4BACP,aAAa,EAAE,kBAAkB;4BACjC,gBAAgB,EAAE,YAAY;yBAC/B;qBACF;iBACF;aACF;YACD,OAAO,EAAE,sBAAsB;SAChC;QACD,KAAK,EAAE;YACL,oBAAoB,EAAE;;;yEAG6C;SACpE;KACF;IAED,MAAM,EAAE;QACN,QAAQ,EAAE;YACR,QAAQ,EAAE;gBACR,aAAa,EAAE;oBACb,KAAK,EAAE,iBAAiB;oBACxB,MAAM,EAAE;wBACN,IAAI,EAAE,QAAQ;wBACd,UAAU,EAAE;4BACV,MAAM,EAAE;gCACN,IAAI,EAAE,QAAQ;gCACd,KAAK,EAAE,SAAS;gCAChB,WAAW,EAAE,6DAA6D;6BAC3E;4BACD,QAAQ,EAAE;gCACR,IAAI,EAAE,QAAQ;gCACd,KAAK,EAAE,WAAW;gCAClB,WAAW,EAAE,mFAAmF;6BACjG;yBACF;wBACD,QAAQ,EAAE,CAAC,QAAQ,EAAE,UAAU,CAAC;wBAChC,oBAAoB,EAAE,KAAK;qBAC5B;oBACD,SAAS,EAAE;wBACT,KAAK,EAAE;4BACL,GAAG,EAAE,YAAY;4BACjB,KAAK,EAAE,cAAc;yBACtB;qBACF;iBACF;aACF;YACD,OAAO,EAAE,eAAe;SACzB;QACD,KAAK,EAAE;YACL,aAAa,EAAE;;;mDAG8B;SAC9C;KACF;CACF,CAAA"}
|
|
1
|
+
{"version":3,"file":"credentials-index.js","sourceRoot":"","sources":["../src/credentials-index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAWH,MAAM,CAAC,MAAM,iBAAiB,GAA2C;IACvE,QAAQ,EAAE;QACR,QAAQ,EAAE;YACR,QAAQ,EAAE;gBACR,qBAAqB,EAAE;oBACrB,KAAK,EAAE,uBAAuB;oBAC9B,MAAM,EAAE;wBACN,IAAI,EAAE,QAAQ;wBACd,UAAU,EAAE;4BACV,KAAK,EAAE;gCACL,IAAI,EAAE,QAAQ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OrSkip('github read handlers (live)', () => {
|
|
|
27
27
|
owner?: string
|
|
28
28
|
repo?: string
|
|
29
29
|
issue_number?: number
|
|
30
|
+
pull_number?: number
|
|
31
|
+
commit_sha?: string
|
|
30
32
|
}
|
|
31
33
|
|
|
32
34
|
const ctx: Ctx = {}
|
|
@@ -49,9 +51,25 @@ suiteOrSkip('github read handlers (live)', () => {
|
|
|
49
51
|
const issues = await list_issues({ owner: ctx.owner, repo: ctx.repo, state: 'all' })
|
|
50
52
|
const firstIssue = Array.isArray(issues) ? issues.find((i: any) => typeof i.number === 'number') : undefined
|
|
51
53
|
ctx.issue_number = firstIssue?.number
|
|
54
|
+
|
|
55
|
+
const list_commits = toolbox.read('list_commits')
|
|
56
|
+
const commits = await list_commits({ owner: ctx.owner, repo: ctx.repo })
|
|
57
|
+
const firstCommit = Array.isArray(commits) ? commits[0] : undefined
|
|
58
|
+
ctx.commit_sha = firstCommit?.sha
|
|
59
|
+
|
|
60
|
+
const list_pull_requests = toolbox.read('list_pull_requests')
|
|
61
|
+
const prs = await list_pull_requests({ owner: ctx.owner, repo: ctx.repo, state: 'all' })
|
|
62
|
+
const firstPr = Array.isArray(prs) ? prs.find((p: any) => typeof p.number === 'number') : undefined
|
|
63
|
+
ctx.pull_number = firstPr?.number
|
|
52
64
|
}
|
|
53
65
|
}, 60000)
|
|
54
66
|
|
|
67
|
+
it('get_me returns authenticated user', async () => {
|
|
68
|
+
const handler = toolbox.read('get_me')
|
|
69
|
+
const result = await handler({})
|
|
70
|
+
expect(result?.login).toBeTruthy()
|
|
71
|
+
}, 30000)
|
|
72
|
+
|
|
55
73
|
it('list_repos returns repositories', async () => {
|
|
56
74
|
const handler = toolbox.read('list_repos')
|
|
57
75
|
const result = await handler({})
|
|
@@ -66,6 +84,75 @@ suiteOrSkip('github read handlers (live)', () => {
|
|
|
66
84
|
expect(result?.name?.toLowerCase?.()).toBe(ctx.repo?.toLowerCase?.())
|
|
67
85
|
}, 30000)
|
|
68
86
|
|
|
87
|
+
it('search_repos returns repositories', async () => {
|
|
88
|
+
const handler = toolbox.read('search_repos')
|
|
89
|
+
const result = await handler({ query: 'commandable-mcp language:typescript' })
|
|
90
|
+
expect(result?.items).toBeTruthy()
|
|
91
|
+
}, 30000)
|
|
92
|
+
|
|
93
|
+
it('get_repo_tree returns file tree', async () => {
|
|
94
|
+
if (!ctx.owner || !ctx.repo)
|
|
95
|
+
return expect(true).toBe(true)
|
|
96
|
+
const handler = toolbox.read('get_repo_tree')
|
|
97
|
+
const result = await handler({ owner: ctx.owner, repo: ctx.repo, recursive: true })
|
|
98
|
+
expect(result?.tree).toBeTruthy()
|
|
99
|
+
expect(Array.isArray(result.tree)).toBe(true)
|
|
100
|
+
}, 30000)
|
|
101
|
+
|
|
102
|
+
it('get_file_contents returns decoded file content', async () => {
|
|
103
|
+
if (!ctx.owner || !ctx.repo)
|
|
104
|
+
return expect(true).toBe(true)
|
|
105
|
+
// Find a known small text file (README is common)
|
|
106
|
+
const handler = toolbox.read('get_file_contents')
|
|
107
|
+
const result = await handler({ owner: ctx.owner, repo: ctx.repo, path: 'README.md' })
|
|
108
|
+
// It's OK if there's no README — just check for a usable response shape
|
|
109
|
+
if (result?.message === 'Not Found')
|
|
110
|
+
return expect(true).toBe(true)
|
|
111
|
+
expect(result?.path).toBe('README.md')
|
|
112
|
+
expect(result?.encoding).toBe('utf-8')
|
|
113
|
+
expect(typeof result?.content).toBe('string')
|
|
114
|
+
}, 30000)
|
|
115
|
+
|
|
116
|
+
it('search_code returns results', async () => {
|
|
117
|
+
if (!ctx.owner || !ctx.repo)
|
|
118
|
+
return expect(true).toBe(true)
|
|
119
|
+
const handler = toolbox.read('search_code')
|
|
120
|
+
const result = await handler({ query: `repo:${ctx.owner}/${ctx.repo}` })
|
|
121
|
+
expect(result?.items).toBeTruthy()
|
|
122
|
+
}, 30000)
|
|
123
|
+
|
|
124
|
+
it('list_branches returns branches with pagination', async () => {
|
|
125
|
+
if (!ctx.owner || !ctx.repo)
|
|
126
|
+
return expect(true).toBe(true)
|
|
127
|
+
const handler = toolbox.read('list_branches')
|
|
128
|
+
const result = await handler({ owner: ctx.owner, repo: ctx.repo, per_page: 10 })
|
|
129
|
+
expect(Array.isArray(result)).toBe(true)
|
|
130
|
+
}, 30000)
|
|
131
|
+
|
|
132
|
+
it('list_commits returns commits with pagination', async () => {
|
|
133
|
+
if (!ctx.owner || !ctx.repo)
|
|
134
|
+
return expect(true).toBe(true)
|
|
135
|
+
const handler = toolbox.read('list_commits')
|
|
136
|
+
const result = await handler({ owner: ctx.owner, repo: ctx.repo, per_page: 5 })
|
|
137
|
+
expect(Array.isArray(result)).toBe(true)
|
|
138
|
+
}, 30000)
|
|
139
|
+
|
|
140
|
+
it('get_commit returns commit details', async () => {
|
|
141
|
+
if (!ctx.owner || !ctx.repo || !ctx.commit_sha)
|
|
142
|
+
return expect(true).toBe(true)
|
|
143
|
+
const handler = toolbox.read('get_commit')
|
|
144
|
+
const result = await handler({ owner: ctx.owner, repo: ctx.repo, sha: ctx.commit_sha })
|
|
145
|
+
expect(result?.sha).toBe(ctx.commit_sha)
|
|
146
|
+
}, 30000)
|
|
147
|
+
|
|
148
|
+
it('list_tags returns tags', async () => {
|
|
149
|
+
if (!ctx.owner || !ctx.repo)
|
|
150
|
+
return expect(true).toBe(true)
|
|
151
|
+
const handler = toolbox.read('list_tags')
|
|
152
|
+
const result = await handler({ owner: ctx.owner, repo: ctx.repo })
|
|
153
|
+
expect(Array.isArray(result)).toBe(true)
|
|
154
|
+
}, 30000)
|
|
155
|
+
|
|
69
156
|
it('list_issues returns issues for repo', async () => {
|
|
70
157
|
if (!ctx.owner || !ctx.repo)
|
|
71
158
|
return expect(true).toBe(true)
|
|
@@ -82,28 +169,136 @@ suiteOrSkip('github read handlers (live)', () => {
|
|
|
82
169
|
expect(result?.number).toBe(ctx.issue_number)
|
|
83
170
|
}, 30000)
|
|
84
171
|
|
|
85
|
-
it('
|
|
172
|
+
it('list_issue_comments returns comments array', async () => {
|
|
173
|
+
if (!ctx.owner || !ctx.repo || !ctx.issue_number)
|
|
174
|
+
return expect(true).toBe(true)
|
|
175
|
+
const handler = toolbox.read('list_issue_comments')
|
|
176
|
+
const result = await handler({ owner: ctx.owner, repo: ctx.repo, issue_number: ctx.issue_number })
|
|
177
|
+
expect(Array.isArray(result)).toBe(true)
|
|
178
|
+
}, 30000)
|
|
179
|
+
|
|
180
|
+
it('search_issues returns results', async () => {
|
|
181
|
+
if (!ctx.owner || !ctx.repo)
|
|
182
|
+
return expect(true).toBe(true)
|
|
183
|
+
const handler = toolbox.read('search_issues')
|
|
184
|
+
const result = await handler({ query: `is:issue repo:${ctx.owner}/${ctx.repo}` })
|
|
185
|
+
expect(result?.items).toBeTruthy()
|
|
186
|
+
}, 30000)
|
|
187
|
+
|
|
188
|
+
it('list_labels returns labels array', async () => {
|
|
189
|
+
if (!ctx.owner || !ctx.repo)
|
|
190
|
+
return expect(true).toBe(true)
|
|
191
|
+
const handler = toolbox.read('list_labels')
|
|
192
|
+
const result = await handler({ owner: ctx.owner, repo: ctx.repo })
|
|
193
|
+
expect(Array.isArray(result)).toBe(true)
|
|
194
|
+
}, 30000)
|
|
195
|
+
|
|
196
|
+
it('list_pull_requests returns PRs with pagination', async () => {
|
|
86
197
|
if (!ctx.owner || !ctx.repo)
|
|
87
198
|
return expect(true).toBe(true)
|
|
88
199
|
const handler = toolbox.read('list_pull_requests')
|
|
89
|
-
const result = await handler({ owner: ctx.owner, repo: ctx.repo, state: 'all' })
|
|
200
|
+
const result = await handler({ owner: ctx.owner, repo: ctx.repo, state: 'all', per_page: 5 })
|
|
201
|
+
expect(Array.isArray(result)).toBe(true)
|
|
202
|
+
}, 30000)
|
|
203
|
+
|
|
204
|
+
it('get_pull_request returns PR details if available', async () => {
|
|
205
|
+
if (!ctx.owner || !ctx.repo || !ctx.pull_number)
|
|
206
|
+
return expect(true).toBe(true)
|
|
207
|
+
const handler = toolbox.read('get_pull_request')
|
|
208
|
+
const result = await handler({ owner: ctx.owner, repo: ctx.repo, pull_number: ctx.pull_number })
|
|
209
|
+
expect(result?.number).toBe(ctx.pull_number)
|
|
210
|
+
}, 30000)
|
|
211
|
+
|
|
212
|
+
it('get_pull_request_diff returns diff text if PR available', async () => {
|
|
213
|
+
if (!ctx.owner || !ctx.repo || !ctx.pull_number)
|
|
214
|
+
return expect(true).toBe(true)
|
|
215
|
+
const handler = toolbox.read('get_pull_request_diff')
|
|
216
|
+
const result = await handler({ owner: ctx.owner, repo: ctx.repo, pull_number: ctx.pull_number })
|
|
217
|
+
expect(typeof result?.diff).toBe('string')
|
|
218
|
+
}, 30000)
|
|
219
|
+
|
|
220
|
+
it('list_pull_request_files returns files if PR available', async () => {
|
|
221
|
+
if (!ctx.owner || !ctx.repo || !ctx.pull_number)
|
|
222
|
+
return expect(true).toBe(true)
|
|
223
|
+
const handler = toolbox.read('list_pull_request_files')
|
|
224
|
+
const result = await handler({ owner: ctx.owner, repo: ctx.repo, pull_number: ctx.pull_number })
|
|
225
|
+
expect(Array.isArray(result)).toBe(true)
|
|
226
|
+
}, 30000)
|
|
227
|
+
|
|
228
|
+
it('list_pull_request_comments returns comments if PR available', async () => {
|
|
229
|
+
if (!ctx.owner || !ctx.repo || !ctx.pull_number)
|
|
230
|
+
return expect(true).toBe(true)
|
|
231
|
+
const handler = toolbox.read('list_pull_request_comments')
|
|
232
|
+
const result = await handler({ owner: ctx.owner, repo: ctx.repo, pull_number: ctx.pull_number })
|
|
90
233
|
expect(Array.isArray(result)).toBe(true)
|
|
91
234
|
}, 30000)
|
|
92
235
|
|
|
93
|
-
it('
|
|
236
|
+
it('search_pull_requests returns results', async () => {
|
|
94
237
|
if (!ctx.owner || !ctx.repo)
|
|
95
238
|
return expect(true).toBe(true)
|
|
96
|
-
const handler = toolbox.read('
|
|
239
|
+
const handler = toolbox.read('search_pull_requests')
|
|
240
|
+
const result = await handler({ query: `is:pr repo:${ctx.owner}/${ctx.repo}` })
|
|
241
|
+
expect(result?.items).toBeTruthy()
|
|
242
|
+
}, 30000)
|
|
243
|
+
|
|
244
|
+
it('list_releases returns releases', async () => {
|
|
245
|
+
if (!ctx.owner || !ctx.repo)
|
|
246
|
+
return expect(true).toBe(true)
|
|
247
|
+
const handler = toolbox.read('list_releases')
|
|
97
248
|
const result = await handler({ owner: ctx.owner, repo: ctx.repo })
|
|
98
249
|
expect(Array.isArray(result)).toBe(true)
|
|
99
250
|
}, 30000)
|
|
100
251
|
|
|
101
|
-
it('
|
|
252
|
+
it('get_latest_release returns latest release or not found', async () => {
|
|
102
253
|
if (!ctx.owner || !ctx.repo)
|
|
103
254
|
return expect(true).toBe(true)
|
|
104
|
-
const handler = toolbox.read('
|
|
255
|
+
const handler = toolbox.read('get_latest_release')
|
|
105
256
|
const result = await handler({ owner: ctx.owner, repo: ctx.repo })
|
|
106
|
-
|
|
257
|
+
// Repo might have no releases — 404 is acceptable
|
|
258
|
+
expect(result).toBeTruthy()
|
|
259
|
+
}, 30000)
|
|
260
|
+
|
|
261
|
+
it('list_workflow_runs returns workflow runs', async () => {
|
|
262
|
+
if (!ctx.owner || !ctx.repo)
|
|
263
|
+
return expect(true).toBe(true)
|
|
264
|
+
const handler = toolbox.read('list_workflow_runs')
|
|
265
|
+
const result = await handler({ owner: ctx.owner, repo: ctx.repo })
|
|
266
|
+
expect(result?.workflow_runs).toBeTruthy()
|
|
267
|
+
}, 30000)
|
|
268
|
+
|
|
269
|
+
it('get_workflow_run returns run details if any runs exist', async () => {
|
|
270
|
+
if (!ctx.owner || !ctx.repo)
|
|
271
|
+
return expect(true).toBe(true)
|
|
272
|
+
const list_runs = toolbox.read('list_workflow_runs')
|
|
273
|
+
const runs = await list_runs({ owner: ctx.owner, repo: ctx.repo, per_page: 1 })
|
|
274
|
+
const firstRun = Array.isArray(runs?.workflow_runs) ? runs.workflow_runs[0] : undefined
|
|
275
|
+
if (!firstRun)
|
|
276
|
+
return expect(true).toBe(true)
|
|
277
|
+
const handler = toolbox.read('get_workflow_run')
|
|
278
|
+
const result = await handler({ owner: ctx.owner, repo: ctx.repo, run_id: firstRun.id })
|
|
279
|
+
expect(result?.id).toBe(firstRun.id)
|
|
280
|
+
}, 30000)
|
|
281
|
+
|
|
282
|
+
it('get_job_logs returns log text if any completed runs exist', async () => {
|
|
283
|
+
if (!ctx.owner || !ctx.repo)
|
|
284
|
+
return expect(true).toBe(true)
|
|
285
|
+
const list_runs = toolbox.read('list_workflow_runs')
|
|
286
|
+
const runs = await list_runs({ owner: ctx.owner, repo: ctx.repo, status: 'completed', per_page: 1 })
|
|
287
|
+
const firstRun = Array.isArray(runs?.workflow_runs) ? runs.workflow_runs[0] : undefined
|
|
288
|
+
if (!firstRun)
|
|
289
|
+
return expect(true).toBe(true)
|
|
290
|
+
// Use native fetch to retrieve job list for this run
|
|
291
|
+
const jobsResp = await fetch(
|
|
292
|
+
`https://api.github.com/repos/${ctx.owner}/${ctx.repo}/actions/runs/${firstRun.id}/jobs`,
|
|
293
|
+
{ headers: { 'Authorization': `Bearer ${variant.token}`, 'Accept': 'application/vnd.github.v3+json' } },
|
|
294
|
+
)
|
|
295
|
+
const jobsData = await jobsResp.json()
|
|
296
|
+
const firstJob = Array.isArray(jobsData?.jobs) ? jobsData.jobs[0] : undefined
|
|
297
|
+
if (!firstJob)
|
|
298
|
+
return expect(true).toBe(true)
|
|
299
|
+
const handler = toolbox.read('get_job_logs')
|
|
300
|
+
const result = await handler({ owner: ctx.owner, repo: ctx.repo, job_id: firstJob.id })
|
|
301
|
+
expect(result).toBeTruthy()
|
|
107
302
|
}, 30000)
|
|
108
303
|
})
|
|
109
304
|
}
|
|
@@ -24,6 +24,27 @@ const variants: VariantConfig[] = [
|
|
|
24
24
|
const hasWriteEnv = hasEnv('GITHUB_TEST_OWNER', 'GITHUB_TEST_REPO')
|
|
25
25
|
const suiteOrSkip = (variants.length > 0 && hasWriteEnv) ? describe : describe.skip
|
|
26
26
|
|
|
27
|
+
async function withRetry<T>(
|
|
28
|
+
fn: () => Promise<T>,
|
|
29
|
+
{ maxAttempts = 3, delayMs = 2000, retryIf = (_e: unknown): boolean => true } = {},
|
|
30
|
+
): Promise<T> {
|
|
31
|
+
let lastError: unknown
|
|
32
|
+
for (let attempt = 1; attempt <= maxAttempts; attempt++) {
|
|
33
|
+
try {
|
|
34
|
+
return await fn()
|
|
35
|
+
}
|
|
36
|
+
catch (error) {
|
|
37
|
+
lastError = error
|
|
38
|
+
if (attempt < maxAttempts && retryIf(error)) {
|
|
39
|
+
await new Promise(resolve => setTimeout(resolve, delayMs * attempt))
|
|
40
|
+
continue
|
|
41
|
+
}
|
|
42
|
+
break
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
throw lastError
|
|
46
|
+
}
|
|
47
|
+
|
|
27
48
|
suiteOrSkip('github write handlers (live)', () => {
|
|
28
49
|
for (const variant of variants) {
|
|
29
50
|
describe(`variant: ${variant.key}`, () => {
|
|
@@ -40,7 +61,7 @@ suiteOrSkip('github write handlers (live)', () => {
|
|
|
40
61
|
toolbox = createToolbox('github', proxy, node, variant.key)
|
|
41
62
|
}, 30000)
|
|
42
63
|
|
|
43
|
-
it('create_issue -> update_issue -> comment_on_issue -> close_issue roundtrip', async () => {
|
|
64
|
+
it('create_issue -> update_issue -> comment_on_issue -> list_issue_comments -> close_issue roundtrip', async () => {
|
|
44
65
|
if (!ctx.owner || !ctx.repo)
|
|
45
66
|
return expect(true).toBe(true)
|
|
46
67
|
|
|
@@ -59,11 +80,56 @@ suiteOrSkip('github write handlers (live)', () => {
|
|
|
59
80
|
const comment = await comment_on_issue({ owner: ctx.owner, repo: ctx.repo, issue_number, body: 'A comment from test.' })
|
|
60
81
|
expect(comment?.id).toBeTruthy()
|
|
61
82
|
|
|
83
|
+
const list_issue_comments = toolbox.read('list_issue_comments')
|
|
84
|
+
const comments = await list_issue_comments({ owner: ctx.owner, repo: ctx.repo, issue_number })
|
|
85
|
+
expect(Array.isArray(comments)).toBe(true)
|
|
86
|
+
expect(comments.length).toBeGreaterThan(0)
|
|
87
|
+
|
|
62
88
|
const close_issue = toolbox.write('close_issue')
|
|
63
89
|
const closed = await close_issue({ owner: ctx.owner, repo: ctx.repo, issue_number })
|
|
64
90
|
expect(closed?.state).toBe('closed')
|
|
65
91
|
}, 90000)
|
|
66
92
|
|
|
93
|
+
it('fork_repo forks a public repo (best effort)', async () => {
|
|
94
|
+
if (!ctx.owner || !ctx.repo)
|
|
95
|
+
return expect(true).toBe(true)
|
|
96
|
+
const fork_repo = toolbox.write('fork_repo')
|
|
97
|
+
try {
|
|
98
|
+
const result = await fork_repo({ owner: ctx.owner, repo: ctx.repo })
|
|
99
|
+
// Fork returns the forked repo details
|
|
100
|
+
expect(result).toBeTruthy()
|
|
101
|
+
}
|
|
102
|
+
catch {
|
|
103
|
+
// May fail if repo is private or fork already exists -- that's ok
|
|
104
|
+
expect(true).toBe(true)
|
|
105
|
+
}
|
|
106
|
+
}, 30000)
|
|
107
|
+
|
|
108
|
+
it('create_release creates a draft release (classic_pat only)', async () => {
|
|
109
|
+
if (!toolbox.hasTool('write', 'create_repo'))
|
|
110
|
+
return expect(true).toBe(true)
|
|
111
|
+
if (!ctx.owner || !ctx.repo)
|
|
112
|
+
return expect(true).toBe(true)
|
|
113
|
+
const create_release = toolbox.write('create_release')
|
|
114
|
+
const tagName = `v0.0.0-test-${Date.now()}`
|
|
115
|
+
try {
|
|
116
|
+
const result = await create_release({
|
|
117
|
+
owner: ctx.owner,
|
|
118
|
+
repo: ctx.repo,
|
|
119
|
+
tag_name: tagName,
|
|
120
|
+
name: `Test Release ${tagName}`,
|
|
121
|
+
body: 'Draft release created by integration tests.',
|
|
122
|
+
draft: true,
|
|
123
|
+
})
|
|
124
|
+
expect(result?.tag_name).toBe(tagName)
|
|
125
|
+
expect(result?.draft).toBe(true)
|
|
126
|
+
}
|
|
127
|
+
catch {
|
|
128
|
+
// May fail if insufficient permissions -- that's ok
|
|
129
|
+
expect(true).toBe(true)
|
|
130
|
+
}
|
|
131
|
+
}, 30000)
|
|
132
|
+
|
|
67
133
|
it('create_repo -> delete_repo lifecycle (classic_pat only)', async () => {
|
|
68
134
|
if (!toolbox.hasTool('write', 'create_repo')) {
|
|
69
135
|
return expect(true).toBe(true)
|
|
@@ -80,12 +146,10 @@ suiteOrSkip('github write handlers (live)', () => {
|
|
|
80
146
|
})
|
|
81
147
|
expect(created?.name).toBe(repoName)
|
|
82
148
|
|
|
83
|
-
// /user/repos creates under the authenticated user, not necessarily ctx.owner
|
|
84
149
|
const createdOwner = created?.owner?.login
|
|
85
150
|
expect(createdOwner).toBeTruthy()
|
|
86
151
|
expect(created?.full_name).toBe(`${createdOwner}/${repoName}`)
|
|
87
152
|
|
|
88
|
-
// GitHub needs a moment to finish provisioning the repo before it can be deleted
|
|
89
153
|
await new Promise(resolve => setTimeout(resolve, 3000))
|
|
90
154
|
|
|
91
155
|
const delete_repo = toolbox.write('delete_repo')
|
|
@@ -117,17 +181,34 @@ suiteOrSkip('github write handlers (live)', () => {
|
|
|
117
181
|
expect(file?.commit?.message).toBe(`Add single test file ${timestamp}`)
|
|
118
182
|
expect(file?.content?.path).toBe(`test-single-${timestamp}.txt`)
|
|
119
183
|
|
|
120
|
-
|
|
184
|
+
// get_file_contents and delete_file roundtrip
|
|
185
|
+
const get_file_contents = toolbox.read('get_file_contents')
|
|
186
|
+
const contents = await get_file_contents({
|
|
187
|
+
owner: ctx.owner,
|
|
188
|
+
repo: ctx.repo,
|
|
189
|
+
path: `test-single-${timestamp}.txt`,
|
|
190
|
+
ref: branchName,
|
|
191
|
+
})
|
|
192
|
+
expect(contents?.encoding).toBe('utf-8')
|
|
193
|
+
expect(contents?.content).toContain('Hello')
|
|
194
|
+
const fileSha = contents?.sha
|
|
195
|
+
|
|
196
|
+
const delete_file = toolbox.write('delete_file')
|
|
197
|
+
const deleted = await delete_file({
|
|
121
198
|
owner: ctx.owner,
|
|
122
199
|
repo: ctx.repo,
|
|
123
200
|
path: `test-single-${timestamp}.txt`,
|
|
124
|
-
message: `
|
|
125
|
-
|
|
201
|
+
message: `Delete test file ${timestamp}`,
|
|
202
|
+
sha: fileSha,
|
|
126
203
|
branch: branchName,
|
|
127
|
-
sha: file.content.sha,
|
|
128
204
|
})
|
|
129
|
-
expect(
|
|
130
|
-
|
|
205
|
+
expect(deleted?.commit?.message).toBe(`Delete test file ${timestamp}`)
|
|
206
|
+
|
|
207
|
+
// delete_branch cleanup
|
|
208
|
+
const delete_branch = toolbox.write('delete_branch')
|
|
209
|
+
const deletedBranch = await delete_branch({ owner: ctx.owner, repo: ctx.repo, branch: branchName })
|
|
210
|
+
expect(deletedBranch?.success).toBe(true)
|
|
211
|
+
}, 120000)
|
|
131
212
|
|
|
132
213
|
it('create_commit: multiple files in one commit', async () => {
|
|
133
214
|
if (!ctx.owner || !ctx.repo)
|
|
@@ -156,22 +237,36 @@ suiteOrSkip('github write handlers (live)', () => {
|
|
|
156
237
|
expect(commit?.commit?.message).toBe(`Add multiple files ${timestamp}`)
|
|
157
238
|
expect(commit?.files?.length).toBe(3)
|
|
158
239
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
240
|
+
// Retry second commit: GitHub's backend sometimes needs a moment to settle
|
|
241
|
+
// after the first commit before accepting a follow-up on the same branch.
|
|
242
|
+
const commit2 = await withRetry(
|
|
243
|
+
() => create_commit({
|
|
244
|
+
owner: ctx.owner,
|
|
245
|
+
repo: ctx.repo,
|
|
246
|
+
branch: branchName,
|
|
247
|
+
message: `Update and delete files ${timestamp}`,
|
|
248
|
+
files: [
|
|
249
|
+
{ path: `multi-test/file1-${timestamp}.txt`, content: 'Updated content of file 1' },
|
|
250
|
+
{ path: `multi-test/file2-${timestamp}.txt` },
|
|
251
|
+
{ path: `multi-test/file4-${timestamp}.txt`, content: 'New file 4' },
|
|
252
|
+
],
|
|
253
|
+
}),
|
|
254
|
+
{
|
|
255
|
+
maxAttempts: 3,
|
|
256
|
+
delayMs: 2000,
|
|
257
|
+
retryIf: (e: unknown) => String((e as { message?: string })?.message || '').includes('GitRPC::BadObjectState'),
|
|
258
|
+
},
|
|
259
|
+
)
|
|
170
260
|
expect(commit2?.commit?.sha).toBeTruthy()
|
|
171
261
|
expect(commit2?.commit?.message).toBe(`Update and delete files ${timestamp}`)
|
|
262
|
+
|
|
263
|
+
// get_commit verifies the commit details
|
|
264
|
+
const get_commit = toolbox.read('get_commit')
|
|
265
|
+
const commitDetails = await get_commit({ owner: ctx.owner, repo: ctx.repo, sha: commit2.commit.sha })
|
|
266
|
+
expect(commitDetails?.sha).toBe(commit2.commit.sha)
|
|
172
267
|
}, 120000)
|
|
173
268
|
|
|
174
|
-
it('full PR workflow: create_branch -> create_commit -> create_pull_request -> merge_pull_request', async () => {
|
|
269
|
+
it('full PR workflow: create_branch -> create_commit -> create_pull_request -> update_pull_request -> create_pull_request_review -> merge_pull_request -> delete_branch', async () => {
|
|
175
270
|
if (!ctx.owner || !ctx.repo)
|
|
176
271
|
return expect(true).toBe(true)
|
|
177
272
|
|
|
@@ -211,6 +306,27 @@ suiteOrSkip('github write handlers (live)', () => {
|
|
|
211
306
|
expect(pr?.number).toBeTruthy()
|
|
212
307
|
const prNumber = pr.number
|
|
213
308
|
|
|
309
|
+
// update_pull_request
|
|
310
|
+
const update_pull_request = toolbox.write('update_pull_request')
|
|
311
|
+
const updated = await update_pull_request({
|
|
312
|
+
owner: ctx.owner,
|
|
313
|
+
repo: ctx.repo,
|
|
314
|
+
pull_number: prNumber,
|
|
315
|
+
body: 'Updated description by integration test.',
|
|
316
|
+
})
|
|
317
|
+
expect(updated?.number).toBe(prNumber)
|
|
318
|
+
|
|
319
|
+
// get_pull_request verifies state
|
|
320
|
+
const get_pull_request = toolbox.read('get_pull_request')
|
|
321
|
+
const prDetails = await get_pull_request({ owner: ctx.owner, repo: ctx.repo, pull_number: prNumber })
|
|
322
|
+
expect(prDetails?.number).toBe(prNumber)
|
|
323
|
+
|
|
324
|
+
// list_pull_request_files
|
|
325
|
+
const list_pull_request_files = toolbox.read('list_pull_request_files')
|
|
326
|
+
const files = await list_pull_request_files({ owner: ctx.owner, repo: ctx.repo, pull_number: prNumber })
|
|
327
|
+
expect(Array.isArray(files)).toBe(true)
|
|
328
|
+
|
|
329
|
+
// add_labels_to_issue (labels on PR)
|
|
214
330
|
const add_labels_to_issue = toolbox.write('add_labels_to_issue')
|
|
215
331
|
try {
|
|
216
332
|
await add_labels_to_issue({ owner: ctx.owner, repo: ctx.repo, issue_number: prNumber, labels: ['test'] })
|
|
@@ -219,9 +335,43 @@ suiteOrSkip('github write handlers (live)', () => {
|
|
|
219
335
|
// Label might not exist -- that's ok for this test
|
|
220
336
|
}
|
|
221
337
|
|
|
338
|
+
// request_pull_request_reviewers (may fail if requesting from self)
|
|
339
|
+
const request_pull_request_reviewers = toolbox.write('request_pull_request_reviewers')
|
|
340
|
+
try {
|
|
341
|
+
await request_pull_request_reviewers({
|
|
342
|
+
owner: ctx.owner,
|
|
343
|
+
repo: ctx.repo,
|
|
344
|
+
pull_number: prNumber,
|
|
345
|
+
reviewers: [],
|
|
346
|
+
})
|
|
347
|
+
}
|
|
348
|
+
catch {
|
|
349
|
+
// May fail if requesting from self or insufficient permissions -- that's ok
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
// create_pull_request_review (comment only -- can't APPROVE own PRs typically)
|
|
353
|
+
const create_pull_request_review = toolbox.write('create_pull_request_review')
|
|
354
|
+
try {
|
|
355
|
+
await create_pull_request_review({
|
|
356
|
+
owner: ctx.owner,
|
|
357
|
+
repo: ctx.repo,
|
|
358
|
+
pull_number: prNumber,
|
|
359
|
+
event: 'COMMENT',
|
|
360
|
+
body: 'LGTM from integration test',
|
|
361
|
+
})
|
|
362
|
+
}
|
|
363
|
+
catch {
|
|
364
|
+
// May fail if author is same as reviewer in some repo configs -- that's ok
|
|
365
|
+
}
|
|
366
|
+
|
|
222
367
|
const merge_pull_request = toolbox.write('merge_pull_request')
|
|
223
368
|
const merged = await merge_pull_request({ owner: ctx.owner, repo: ctx.repo, pull_number: prNumber, merge_method: 'squash' })
|
|
224
369
|
expect(merged?.merged).toBe(true)
|
|
370
|
+
|
|
371
|
+
// delete_branch after merge
|
|
372
|
+
const delete_branch = toolbox.write('delete_branch')
|
|
373
|
+
const deletedBranch = await delete_branch({ owner: ctx.owner, repo: ctx.repo, branch: branchName })
|
|
374
|
+
expect(deletedBranch?.success).toBe(true)
|
|
225
375
|
}, 150000)
|
|
226
376
|
})
|
|
227
377
|
}
|
|
@@ -11,17 +11,25 @@ async (input) => {
|
|
|
11
11
|
const commitData = await commitRes.json()
|
|
12
12
|
const currentTreeSha = commitData.tree.sha
|
|
13
13
|
|
|
14
|
-
// 3. Build tree entries
|
|
14
|
+
// 3. Build tree entries.
|
|
15
|
+
// Always create blobs explicitly rather than using inline tree content, because mixing inline
|
|
16
|
+
// content with sha:null deletion entries in the same tree request causes GitRPC::BadObjectState.
|
|
15
17
|
const tree = []
|
|
16
18
|
for (const file of files) {
|
|
17
19
|
if (file.content !== undefined && file.content !== null) {
|
|
20
|
+
const blobRes = await integration.fetch(`/repos/${owner}/${repo}/git/blobs`, {
|
|
21
|
+
method: 'POST',
|
|
22
|
+
body: { content: file.content, encoding: 'utf-8' },
|
|
23
|
+
})
|
|
24
|
+
const blobData = await blobRes.json()
|
|
18
25
|
tree.push({
|
|
19
26
|
path: file.path,
|
|
20
27
|
mode: file.mode || '100644',
|
|
21
28
|
type: 'blob',
|
|
22
|
-
|
|
29
|
+
sha: blobData.sha,
|
|
23
30
|
})
|
|
24
31
|
} else {
|
|
32
|
+
// sha: null removes the file from the tree
|
|
25
33
|
tree.push({
|
|
26
34
|
path: file.path,
|
|
27
35
|
mode: '100644',
|