@dxos/plugin-github 0.7.4 → 0.14.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.
- package/LICENSE +102 -5
- package/PLUGIN.mdl +784 -0
- package/dist/lib/GitHubCapabilities.mjs +10 -0
- package/dist/lib/GitHubCapabilities.mjs.map +1 -0
- package/dist/lib/GitHubEvents.mjs +15 -0
- package/dist/lib/GitHubEvents.mjs.map +1 -0
- package/dist/lib/GitHubOperation.mjs +384 -0
- package/dist/lib/GitHubOperation.mjs.map +1 -0
- package/dist/lib/GitHubPlugin.mjs +16 -0
- package/dist/lib/GitHubPlugin.mjs.map +1 -0
- package/dist/lib/Walkthrough.mjs +59 -0
- package/dist/lib/Walkthrough.mjs.map +1 -0
- package/dist/lib/capabilities.browser.mjs +54 -0
- package/dist/lib/capabilities.browser.mjs.map +1 -0
- package/dist/lib/capabilities.mjs +54 -0
- package/dist/lib/capabilities.mjs.map +1 -0
- package/dist/lib/capabilities.node.mjs +30 -0
- package/dist/lib/capabilities.node.mjs.map +1 -0
- package/dist/lib/capabilities.tauri.mjs +54 -0
- package/dist/lib/capabilities.tauri.mjs.map +1 -0
- package/dist/lib/capabilities.workerd.mjs +30 -0
- package/dist/lib/capabilities.workerd.mjs.map +1 -0
- package/dist/lib/chunk-ImportPullRequestDialog.mjs +116 -0
- package/dist/lib/chunk-ImportPullRequestDialog.mjs.map +1 -0
- package/dist/lib/chunk-PLUGIN.mjs +6 -0
- package/dist/lib/chunk-PLUGIN.mjs.map +1 -0
- package/dist/lib/chunk-PullRequestArticle.mjs +1506 -0
- package/dist/lib/chunk-PullRequestArticle.mjs.map +1 -0
- package/dist/lib/chunk-PullRequestArticle2.mjs +2 -0
- package/dist/lib/chunk-PullRequestCardMenu.mjs +123 -0
- package/dist/lib/chunk-PullRequestCardMenu.mjs.map +1 -0
- package/dist/lib/chunk-PullRequestsArticle.mjs +594 -0
- package/dist/lib/chunk-PullRequestsArticle.mjs.map +1 -0
- package/dist/lib/chunk-WalkthroughArticle.mjs +26 -0
- package/dist/lib/chunk-WalkthroughArticle.mjs.map +1 -0
- package/dist/lib/chunk-add-pull-request-comment.mjs +19 -0
- package/dist/lib/chunk-add-pull-request-comment.mjs.map +1 -0
- package/dist/lib/chunk-add-pull-request-review-comment.mjs +25 -0
- package/dist/lib/chunk-add-pull-request-review-comment.mjs.map +1 -0
- package/dist/lib/chunk-app-graph-builder.mjs +39 -0
- package/dist/lib/chunk-app-graph-builder.mjs.map +1 -0
- package/dist/lib/chunk-connector.mjs +70 -0
- package/dist/lib/chunk-connector.mjs.map +1 -0
- package/dist/lib/chunk-constants.mjs +11 -0
- package/dist/lib/chunk-constants.mjs.map +1 -0
- package/dist/lib/chunk-errors.mjs +29 -0
- package/dist/lib/chunk-errors.mjs.map +1 -0
- package/dist/lib/chunk-generate-walkthrough.mjs +86 -0
- package/dist/lib/chunk-generate-walkthrough.mjs.map +1 -0
- package/dist/lib/chunk-generate.mjs +719 -0
- package/dist/lib/chunk-generate.mjs.map +1 -0
- package/dist/lib/chunk-get-pull-request-diff.mjs +25 -0
- package/dist/lib/chunk-get-pull-request-diff.mjs.map +1 -0
- package/dist/lib/chunk-get-pull-request-status.mjs +29 -0
- package/dist/lib/chunk-get-pull-request-status.mjs.map +1 -0
- package/dist/lib/chunk-get-repositories.mjs +32 -0
- package/dist/lib/chunk-get-repositories.mjs.map +1 -0
- package/dist/lib/chunk-github-api.mjs +375 -0
- package/dist/lib/chunk-github-api.mjs.map +1 -0
- package/dist/lib/chunk-github-link.mjs +59 -0
- package/dist/lib/chunk-github-link.mjs.map +1 -0
- package/dist/lib/chunk-import-pull-request-from-snapshot.mjs +25 -0
- package/dist/lib/chunk-import-pull-request-from-snapshot.mjs.map +1 -0
- package/dist/lib/chunk-import-pull-request.mjs +171 -0
- package/dist/lib/chunk-import-pull-request.mjs.map +1 -0
- package/dist/lib/chunk-link-resolver.mjs +109 -0
- package/dist/lib/chunk-link-resolver.mjs.map +1 -0
- package/dist/lib/chunk-markdown-extension.mjs +92 -0
- package/dist/lib/chunk-markdown-extension.mjs.map +1 -0
- package/dist/lib/chunk-materialize-target.mjs +36 -0
- package/dist/lib/chunk-materialize-target.mjs.map +1 -0
- package/dist/lib/chunk-operation-handler.mjs +12 -0
- package/dist/lib/chunk-operation-handler.mjs.map +1 -0
- package/dist/lib/chunk-page-action.mjs +22 -0
- package/dist/lib/chunk-page-action.mjs.map +1 -0
- package/dist/lib/chunk-pull-request.mjs +58 -0
- package/dist/lib/chunk-pull-request.mjs.map +1 -0
- package/dist/lib/chunk-pull-request2.mjs +110 -0
- package/dist/lib/chunk-pull-request2.mjs.map +1 -0
- package/dist/lib/chunk-react-surface.mjs +233 -0
- package/dist/lib/chunk-react-surface.mjs.map +1 -0
- package/dist/lib/chunk-refresh-pull-requests.mjs +49 -0
- package/dist/lib/chunk-refresh-pull-requests.mjs.map +1 -0
- package/dist/lib/chunk-rolldown-runtime.mjs +13 -0
- package/dist/lib/chunk-schema.mjs +15 -0
- package/dist/lib/chunk-schema.mjs.map +1 -0
- package/dist/lib/chunk-skill-definition.mjs +10 -0
- package/dist/lib/chunk-skill-definition.mjs.map +1 -0
- package/dist/lib/chunk-submit-pull-request-approval.mjs +56 -0
- package/dist/lib/chunk-submit-pull-request-approval.mjs.map +1 -0
- package/dist/lib/chunk-sync-pull-request.mjs +26 -0
- package/dist/lib/chunk-sync-pull-request.mjs.map +1 -0
- package/dist/lib/chunk-sync.mjs +481 -0
- package/dist/lib/chunk-sync.mjs.map +1 -0
- package/dist/lib/chunk-useOpenObject.mjs +43 -0
- package/dist/lib/chunk-useOpenObject.mjs.map +1 -0
- package/dist/lib/extensions.mjs +132 -0
- package/dist/lib/extensions.mjs.map +1 -0
- package/dist/lib/index.mjs +4 -0
- package/dist/lib/meta.mjs +47 -0
- package/dist/lib/meta.mjs.map +1 -0
- package/dist/lib/ns/Extensions.mjs +18 -0
- package/dist/lib/ns/Extensions.mjs.map +1 -0
- package/dist/lib/operations.mjs +23 -0
- package/dist/lib/operations.mjs.map +1 -0
- package/dist/lib/plugin.mjs +9 -0
- package/dist/lib/plugin.mjs.map +1 -0
- package/dist/lib/skills.mjs +44 -0
- package/dist/lib/skills.mjs.map +1 -0
- package/dist/lib/testing.mjs +189 -0
- package/dist/lib/testing.mjs.map +1 -0
- package/dist/lib/translations.mjs +136 -0
- package/dist/lib/translations.mjs.map +1 -0
- package/dist/lib/types.mjs +5 -0
- package/dist/types/dx.config.d.ts +28 -0
- package/dist/types/dx.config.d.ts.map +1 -0
- package/dist/types/src/Extensions.d.ts +2 -0
- package/dist/types/src/Extensions.d.ts.map +1 -0
- package/dist/types/src/GitHubPlugin.d.ts +37 -0
- package/dist/types/src/GitHubPlugin.d.ts.map +1 -0
- package/dist/types/src/GitHubPlugin.workerd.test.d.ts +2 -0
- package/dist/types/src/GitHubPlugin.workerd.test.d.ts.map +1 -0
- package/dist/types/src/approval.d.ts +21 -0
- package/dist/types/src/approval.d.ts.map +1 -0
- package/dist/types/src/approval.test.d.ts +2 -0
- package/dist/types/src/approval.test.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts +9 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/connector.d.ts +17 -0
- package/dist/types/src/capabilities/connector.d.ts.map +1 -0
- package/dist/types/src/capabilities/gen/browser.d.ts +13 -0
- package/dist/types/src/capabilities/gen/browser.d.ts.map +1 -0
- package/dist/types/src/capabilities/gen/node.d.ts +13 -0
- package/dist/types/src/capabilities/gen/node.d.ts.map +1 -0
- package/dist/types/src/capabilities/gen/tauri.d.ts +13 -0
- package/dist/types/src/capabilities/gen/tauri.d.ts.map +1 -0
- package/dist/types/src/capabilities/gen/workerd.d.ts +13 -0
- package/dist/types/src/capabilities/gen/workerd.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +13 -0
- package/dist/types/src/capabilities/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/link-resolver.d.ts +10 -0
- package/dist/types/src/capabilities/link-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/markdown-extension.d.ts +14 -0
- package/dist/types/src/capabilities/markdown-extension.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-handler.d.ts +5 -0
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/page-action.d.ts +5 -0
- package/dist/types/src/capabilities/page-action.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts +5 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/schema.d.ts +12 -0
- package/dist/types/src/capabilities/schema.d.ts.map +1 -0
- package/dist/types/src/capabilities/skill-definition.d.ts +5 -0
- package/dist/types/src/capabilities/skill-definition.d.ts.map +1 -0
- package/dist/types/src/cards/GitHubCard.d.ts +11 -0
- package/dist/types/src/cards/GitHubCard.d.ts.map +1 -0
- package/dist/types/src/cards/GitHubCard.stories.d.ts +45 -0
- package/dist/types/src/cards/GitHubCard.stories.d.ts.map +1 -0
- package/dist/types/src/cards/PullRequestCard.d.ts +9 -0
- package/dist/types/src/cards/PullRequestCard.d.ts.map +1 -0
- package/dist/types/src/cards/index.d.ts +3 -0
- package/dist/types/src/cards/index.d.ts.map +1 -0
- package/dist/types/src/components/CommentComposer/CommentComposer.d.ts +30 -0
- package/dist/types/src/components/CommentComposer/CommentComposer.d.ts.map +1 -0
- package/dist/types/src/components/CommentComposer/index.d.ts +2 -0
- package/dist/types/src/components/CommentComposer/index.d.ts.map +1 -0
- package/dist/types/src/components/PullRequestFiles/DiffStat.d.ts +8 -0
- package/dist/types/src/components/PullRequestFiles/DiffStat.d.ts.map +1 -0
- package/dist/types/src/components/PullRequestFiles/FileTree.d.ts +17 -0
- package/dist/types/src/components/PullRequestFiles/FileTree.d.ts.map +1 -0
- package/dist/types/src/components/PullRequestFiles/PullRequestFiles.d.ts +23 -0
- package/dist/types/src/components/PullRequestFiles/PullRequestFiles.d.ts.map +1 -0
- package/dist/types/src/components/PullRequestFiles/files.d.ts +39 -0
- package/dist/types/src/components/PullRequestFiles/files.d.ts.map +1 -0
- package/dist/types/src/components/PullRequestFiles/files.test.d.ts +2 -0
- package/dist/types/src/components/PullRequestFiles/files.test.d.ts.map +1 -0
- package/dist/types/src/components/PullRequestFiles/index.d.ts +5 -0
- package/dist/types/src/components/PullRequestFiles/index.d.ts.map +1 -0
- package/dist/types/src/components/PullRequestOverview/ArtifactPill.d.ts +21 -0
- package/dist/types/src/components/PullRequestOverview/ArtifactPill.d.ts.map +1 -0
- package/dist/types/src/components/PullRequestOverview/CheckRunList.d.ts +18 -0
- package/dist/types/src/components/PullRequestOverview/CheckRunList.d.ts.map +1 -0
- package/dist/types/src/components/PullRequestOverview/CheckRunList.test.d.ts +2 -0
- package/dist/types/src/components/PullRequestOverview/CheckRunList.test.d.ts.map +1 -0
- package/dist/types/src/components/PullRequestOverview/PullRequestDetails.d.ts +10 -0
- package/dist/types/src/components/PullRequestOverview/PullRequestDetails.d.ts.map +1 -0
- package/dist/types/src/components/PullRequestOverview/PullRequestOverview.d.ts +16 -0
- package/dist/types/src/components/PullRequestOverview/PullRequestOverview.d.ts.map +1 -0
- package/dist/types/src/components/PullRequestOverview/RelatedCards.d.ts +28 -0
- package/dist/types/src/components/PullRequestOverview/RelatedCards.d.ts.map +1 -0
- package/dist/types/src/components/PullRequestOverview/index.d.ts +6 -0
- package/dist/types/src/components/PullRequestOverview/index.d.ts.map +1 -0
- package/dist/types/src/components/PullRequestStatus/PullRequestStatus.d.ts +20 -0
- package/dist/types/src/components/PullRequestStatus/PullRequestStatus.d.ts.map +1 -0
- package/dist/types/src/components/PullRequestStatus/index.d.ts +2 -0
- package/dist/types/src/components/PullRequestStatus/index.d.ts.map +1 -0
- package/dist/types/src/components/WalkthroughView/WalkthroughView.d.ts +18 -0
- package/dist/types/src/components/WalkthroughView/WalkthroughView.d.ts.map +1 -0
- package/dist/types/src/components/WalkthroughView/extensions.d.ts +16 -0
- package/dist/types/src/components/WalkthroughView/extensions.d.ts.map +1 -0
- package/dist/types/src/components/WalkthroughView/index.d.ts +3 -0
- package/dist/types/src/components/WalkthroughView/index.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +5 -8
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/constants.d.ts +7 -0
- package/dist/types/src/constants.d.ts.map +1 -0
- package/dist/types/src/containers/ImportPullRequestDialog/ImportPullRequestDialog.d.ts +6 -0
- package/dist/types/src/containers/ImportPullRequestDialog/ImportPullRequestDialog.d.ts.map +1 -0
- package/dist/types/src/containers/ImportPullRequestDialog/index.d.ts +3 -0
- package/dist/types/src/containers/ImportPullRequestDialog/index.d.ts.map +1 -0
- package/dist/types/src/containers/PullRequestArticle/PullRequestArticle.d.ts +15 -0
- package/dist/types/src/containers/PullRequestArticle/PullRequestArticle.d.ts.map +1 -0
- package/dist/types/src/containers/PullRequestArticle/failure.d.ts +10 -0
- package/dist/types/src/containers/PullRequestArticle/failure.d.ts.map +1 -0
- package/dist/types/src/containers/PullRequestArticle/failure.test.d.ts +2 -0
- package/dist/types/src/containers/PullRequestArticle/failure.test.d.ts.map +1 -0
- package/dist/types/src/containers/PullRequestArticle/index.d.ts +2 -0
- package/dist/types/src/containers/PullRequestArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/PullRequestCardMenu/PullRequestCardMenu.d.ts +14 -0
- package/dist/types/src/containers/PullRequestCardMenu/PullRequestCardMenu.d.ts.map +1 -0
- package/dist/types/src/containers/PullRequestCardMenu/index.d.ts +2 -0
- package/dist/types/src/containers/PullRequestCardMenu/index.d.ts.map +1 -0
- package/dist/types/src/containers/PullRequestsArticle/PullRequestsArticle.d.ts +13 -0
- package/dist/types/src/containers/PullRequestsArticle/PullRequestsArticle.d.ts.map +1 -0
- package/dist/types/src/containers/PullRequestsArticle/arrange.d.ts +44 -0
- package/dist/types/src/containers/PullRequestsArticle/arrange.d.ts.map +1 -0
- package/dist/types/src/containers/PullRequestsArticle/arrange.test.d.ts +2 -0
- package/dist/types/src/containers/PullRequestsArticle/arrange.test.d.ts.map +1 -0
- package/dist/types/src/containers/PullRequestsArticle/format.d.ts +3 -0
- package/dist/types/src/containers/PullRequestsArticle/format.d.ts.map +1 -0
- package/dist/types/src/containers/PullRequestsArticle/index.d.ts +2 -0
- package/dist/types/src/containers/PullRequestsArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/WalkthroughArticle/WalkthroughArticle.d.ts +13 -0
- package/dist/types/src/containers/WalkthroughArticle/WalkthroughArticle.d.ts.map +1 -0
- package/dist/types/src/containers/WalkthroughArticle/index.d.ts +2 -0
- package/dist/types/src/containers/WalkthroughArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +7 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/errors.d.ts +157 -0
- package/dist/types/src/errors.d.ts.map +1 -0
- package/dist/types/src/extensions/index.d.ts +3 -0
- package/dist/types/src/extensions/index.d.ts.map +1 -0
- package/dist/types/src/extensions/links.d.ts +21 -0
- package/dist/types/src/extensions/links.d.ts.map +1 -0
- package/dist/types/src/extensions/links.test.d.ts +2 -0
- package/dist/types/src/extensions/links.test.d.ts.map +1 -0
- package/dist/types/src/extensions/references.d.ts +23 -0
- package/dist/types/src/extensions/references.d.ts.map +1 -0
- package/dist/types/src/extensions/references.test.d.ts +2 -0
- package/dist/types/src/extensions/references.test.d.ts.map +1 -0
- package/dist/types/src/github-link.d.ts +29 -0
- package/dist/types/src/github-link.d.ts.map +1 -0
- package/dist/types/src/hooks/index.d.ts +5 -2
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useOpenObject.d.ts +9 -0
- package/dist/types/src/hooks/useOpenObject.d.ts.map +1 -0
- package/dist/types/src/hooks/usePullRequestChecks.d.ts +10 -0
- package/dist/types/src/hooks/usePullRequestChecks.d.ts.map +1 -0
- package/dist/types/src/hooks/usePullRequestDiff.d.ts +12 -0
- package/dist/types/src/hooks/usePullRequestDiff.d.ts.map +1 -0
- package/dist/types/src/hooks/usePullRequestFiles.d.ts +22 -0
- package/dist/types/src/hooks/usePullRequestFiles.d.ts.map +1 -0
- package/dist/types/src/hooks/useSyncPullRequest.d.ts +10 -0
- package/dist/types/src/hooks/useSyncPullRequest.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +3 -3
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +34 -11
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/add-pull-request-comment.d.ts +5 -0
- package/dist/types/src/operations/add-pull-request-comment.d.ts.map +1 -0
- package/dist/types/src/operations/add-pull-request-review-comment.d.ts +5 -0
- package/dist/types/src/operations/add-pull-request-review-comment.d.ts.map +1 -0
- package/dist/types/src/operations/generate-walkthrough.d.ts +11 -0
- package/dist/types/src/operations/generate-walkthrough.d.ts.map +1 -0
- package/dist/types/src/operations/get-pull-request-diff.d.ts +5 -0
- package/dist/types/src/operations/get-pull-request-diff.d.ts.map +1 -0
- package/dist/types/src/operations/get-pull-request-status.d.ts +5 -0
- package/dist/types/src/operations/get-pull-request-status.d.ts.map +1 -0
- package/dist/types/src/operations/get-repositories.d.ts +13 -0
- package/dist/types/src/operations/get-repositories.d.ts.map +1 -0
- package/dist/types/src/operations/import-pull-request-from-snapshot.d.ts +12 -0
- package/dist/types/src/operations/import-pull-request-from-snapshot.d.ts.map +1 -0
- package/dist/types/src/operations/import-pull-request.d.ts +63 -0
- package/dist/types/src/operations/import-pull-request.d.ts.map +1 -0
- package/dist/types/src/operations/import-pull-request.test.d.ts +2 -0
- package/dist/types/src/operations/import-pull-request.test.d.ts.map +1 -0
- package/dist/types/src/operations/index.d.ts +3 -0
- package/dist/types/src/operations/index.d.ts.map +1 -0
- package/dist/types/src/operations/materialize-target.d.ts +12 -0
- package/dist/types/src/operations/materialize-target.d.ts.map +1 -0
- package/dist/types/src/operations/pull-request.d.ts +48 -0
- package/dist/types/src/operations/pull-request.d.ts.map +1 -0
- package/dist/types/src/operations/pull-request.test.d.ts +2 -0
- package/dist/types/src/operations/pull-request.test.d.ts.map +1 -0
- package/dist/types/src/operations/refresh-pull-requests.d.ts +5 -0
- package/dist/types/src/operations/refresh-pull-requests.d.ts.map +1 -0
- package/dist/types/src/operations/refresh.d.ts +37 -0
- package/dist/types/src/operations/refresh.d.ts.map +1 -0
- package/dist/types/src/operations/refresh.test.d.ts +2 -0
- package/dist/types/src/operations/refresh.test.d.ts.map +1 -0
- package/dist/types/src/operations/submit-pull-request-approval.d.ts +5 -0
- package/dist/types/src/operations/submit-pull-request-approval.d.ts.map +1 -0
- package/dist/types/src/operations/sync-pull-request.d.ts +5 -0
- package/dist/types/src/operations/sync-pull-request.d.ts.map +1 -0
- package/dist/types/src/operations/sync.d.ts +123 -0
- package/dist/types/src/operations/sync.d.ts.map +1 -0
- package/dist/types/src/operations/sync.test.d.ts +2 -0
- package/dist/types/src/operations/sync.test.d.ts.map +1 -0
- package/dist/types/src/plugin.d.ts +4 -0
- package/dist/types/src/plugin.d.ts.map +1 -0
- package/dist/types/src/plugin.test.d.ts +2 -0
- package/dist/types/src/plugin.test.d.ts.map +1 -0
- package/dist/types/src/pull-request-body.d.ts +37 -0
- package/dist/types/src/pull-request-body.d.ts.map +1 -0
- package/dist/types/src/pull-request-body.test.d.ts +2 -0
- package/dist/types/src/pull-request-body.test.d.ts.map +1 -0
- package/dist/types/src/pull-request.d.ts +28 -0
- package/dist/types/src/pull-request.d.ts.map +1 -0
- package/dist/types/src/pull-request.test.d.ts +2 -0
- package/dist/types/src/pull-request.test.d.ts.map +1 -0
- package/dist/types/src/services/github-api.d.ts +332 -0
- package/dist/types/src/services/github-api.d.ts.map +1 -0
- package/dist/types/src/services/index.d.ts +2 -0
- package/dist/types/src/services/index.d.ts.map +1 -0
- package/dist/types/src/skills/GitHubSkill.d.ts +12 -0
- package/dist/types/src/skills/GitHubSkill.d.ts.map +1 -0
- package/dist/types/src/skills/index.d.ts +2 -0
- package/dist/types/src/skills/index.d.ts.map +1 -0
- package/dist/types/src/stories/Generate.stories.d.ts +27 -0
- package/dist/types/src/stories/Generate.stories.d.ts.map +1 -0
- package/dist/types/src/stories/Links.stories.d.ts +23 -0
- package/dist/types/src/stories/Links.stories.d.ts.map +1 -0
- package/dist/types/src/stories/PullRequestArticle.stories.d.ts +359 -0
- package/dist/types/src/stories/PullRequestArticle.stories.d.ts.map +1 -0
- package/dist/types/src/stories/PullRequestFiles.stories.d.ts +365 -0
- package/dist/types/src/stories/PullRequestFiles.stories.d.ts.map +1 -0
- package/dist/types/src/stories/PullRequestOverview.stories.d.ts +367 -0
- package/dist/types/src/stories/PullRequestOverview.stories.d.ts.map +1 -0
- package/dist/types/src/stories/PullRequestsArticle.stories.d.ts +357 -0
- package/dist/types/src/stories/PullRequestsArticle.stories.d.ts.map +1 -0
- package/dist/types/src/stories/Walkthrough.stories.d.ts +380 -0
- package/dist/types/src/stories/Walkthrough.stories.d.ts.map +1 -0
- package/dist/types/src/stories/github.d.ts +23 -0
- package/dist/types/src/stories/github.d.ts.map +1 -0
- package/dist/types/src/stories/github.test.d.ts +2 -0
- package/dist/types/src/stories/github.test.d.ts.map +1 -0
- package/dist/types/src/stories/walkthrough-fixture.d.ts +8 -0
- package/dist/types/src/stories/walkthrough-fixture.d.ts.map +1 -0
- package/dist/types/src/testing/fixtures.d.ts +14 -0
- package/dist/types/src/testing/fixtures.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +4 -0
- package/dist/types/src/testing/index.d.ts.map +1 -0
- package/dist/types/src/testing/plugin.d.ts +4 -0
- package/dist/types/src/testing/plugin.d.ts.map +1 -0
- package/dist/types/src/testing/pull-request-13348.d.ts +6 -0
- package/dist/types/src/testing/pull-request-13348.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +339 -53
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/GitHubCapabilities.d.ts +13 -0
- package/dist/types/src/types/GitHubCapabilities.d.ts.map +1 -0
- package/dist/types/src/types/GitHubEvents.d.ts +8 -0
- package/dist/types/src/types/GitHubEvents.d.ts.map +1 -0
- package/dist/types/src/types/GitHubOperation.d.ts +281 -0
- package/dist/types/src/types/GitHubOperation.d.ts.map +1 -0
- package/dist/types/src/types/PullRequestsView.d.ts +35 -0
- package/dist/types/src/types/PullRequestsView.d.ts.map +1 -0
- package/dist/types/src/types/Walkthrough.d.ts +31 -0
- package/dist/types/src/types/Walkthrough.d.ts.map +1 -0
- package/dist/types/src/types/Walkthrough.test.d.ts +2 -0
- package/dist/types/src/types/Walkthrough.test.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +5 -0
- package/dist/types/src/types/index.d.ts.map +1 -0
- package/dist/types/src/walkthrough/fill.d.ts +28 -0
- package/dist/types/src/walkthrough/fill.d.ts.map +1 -0
- package/dist/types/src/walkthrough/fill.test.d.ts +2 -0
- package/dist/types/src/walkthrough/fill.test.d.ts.map +1 -0
- package/dist/types/src/walkthrough/generate.d.ts +67 -0
- package/dist/types/src/walkthrough/generate.d.ts.map +1 -0
- package/dist/types/src/walkthrough/generate.test.d.ts +2 -0
- package/dist/types/src/walkthrough/generate.test.d.ts.map +1 -0
- package/dist/types/src/walkthrough/generated.d.ts +20 -0
- package/dist/types/src/walkthrough/generated.d.ts.map +1 -0
- package/dist/types/src/walkthrough/generated.test.d.ts +2 -0
- package/dist/types/src/walkthrough/generated.test.d.ts.map +1 -0
- package/dist/types/src/walkthrough/headings.d.ts +8 -0
- package/dist/types/src/walkthrough/headings.d.ts.map +1 -0
- package/dist/types/src/walkthrough/headings.test.d.ts +2 -0
- package/dist/types/src/walkthrough/headings.test.d.ts.map +1 -0
- package/dist/types/src/walkthrough/index.d.ts +9 -0
- package/dist/types/src/walkthrough/index.d.ts.map +1 -0
- package/dist/types/src/walkthrough/patch.d.ts +48 -0
- package/dist/types/src/walkthrough/patch.d.ts.map +1 -0
- package/dist/types/src/walkthrough/plan.d.ts +55 -0
- package/dist/types/src/walkthrough/plan.d.ts.map +1 -0
- package/dist/types/src/walkthrough/plan.test.d.ts +2 -0
- package/dist/types/src/walkthrough/plan.test.d.ts.map +1 -0
- package/dist/types/src/walkthrough/prompt.d.ts +33 -0
- package/dist/types/src/walkthrough/prompt.d.ts.map +1 -0
- package/dist/types/src/walkthrough/prompt.test.d.ts +2 -0
- package/dist/types/src/walkthrough/prompt.test.d.ts.map +1 -0
- package/dist/types/src/walkthrough/score.d.ts +43 -0
- package/dist/types/src/walkthrough/score.d.ts.map +1 -0
- package/dist/types/src/walkthrough/score.test.d.ts +2 -0
- package/dist/types/src/walkthrough/score.test.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -0
- package/dx.config.ts +39 -0
- package/package.json +167 -48
- package/src/Extensions.ts +7 -0
- package/src/GitHubPlugin.ts +15 -0
- package/src/GitHubPlugin.workerd.test.ts +23 -0
- package/src/approval.test.ts +40 -0
- package/src/approval.ts +39 -0
- package/src/capabilities/app-graph-builder.ts +47 -0
- package/src/capabilities/connector.ts +95 -0
- package/src/capabilities/gen/browser.ts +82 -0
- package/src/capabilities/gen/node.ts +43 -0
- package/src/capabilities/gen/tauri.ts +82 -0
- package/src/capabilities/gen/workerd.ts +43 -0
- package/src/capabilities/index.ts +71 -0
- package/src/capabilities/link-resolver.ts +137 -0
- package/src/capabilities/markdown-extension.ts +146 -0
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/page-action.ts +32 -0
- package/src/capabilities/react-surface.ts +98 -0
- package/src/capabilities/schema.ts +16 -0
- package/src/capabilities/skill-definition.ts +14 -0
- package/src/cards/GitHubCard.stories.tsx +165 -0
- package/src/cards/GitHubCard.tsx +93 -0
- package/src/cards/PullRequestCard.tsx +23 -0
- package/src/cards/index.ts +6 -0
- package/src/components/CommentComposer/CommentComposer.tsx +109 -0
- package/src/components/CommentComposer/index.ts +5 -0
- package/src/components/PullRequestFiles/DiffStat.tsx +15 -0
- package/src/components/PullRequestFiles/FileTree.tsx +102 -0
- package/src/components/PullRequestFiles/PullRequestFiles.tsx +87 -0
- package/src/components/PullRequestFiles/files.test.ts +59 -0
- package/src/components/PullRequestFiles/files.ts +115 -0
- package/src/components/PullRequestFiles/index.ts +8 -0
- package/src/components/PullRequestOverview/ArtifactPill.tsx +82 -0
- package/src/components/PullRequestOverview/CheckRunList.test.ts +29 -0
- package/src/components/PullRequestOverview/CheckRunList.tsx +141 -0
- package/src/components/PullRequestOverview/PullRequestDetails.tsx +15 -0
- package/src/components/PullRequestOverview/PullRequestOverview.tsx +110 -0
- package/src/components/PullRequestOverview/RelatedCards.tsx +147 -0
- package/src/components/PullRequestOverview/index.ts +9 -0
- package/src/components/PullRequestStatus/PullRequestStatus.tsx +84 -0
- package/src/components/PullRequestStatus/index.ts +5 -0
- package/src/components/WalkthroughView/WalkthroughView.tsx +62 -0
- package/src/components/WalkthroughView/extensions.ts +53 -0
- package/src/components/WalkthroughView/index.ts +6 -0
- package/src/components/index.ts +6 -9
- package/src/constants.ts +12 -0
- package/src/containers/ImportPullRequestDialog/ImportPullRequestDialog.tsx +160 -0
- package/src/containers/ImportPullRequestDialog/index.ts +7 -0
- package/src/containers/PullRequestArticle/PullRequestArticle.tsx +573 -0
- package/src/containers/PullRequestArticle/failure.test.ts +42 -0
- package/src/containers/PullRequestArticle/failure.ts +16 -0
- package/src/containers/PullRequestArticle/index.ts +5 -0
- package/src/containers/PullRequestCardMenu/PullRequestCardMenu.tsx +134 -0
- package/src/containers/PullRequestCardMenu/index.ts +5 -0
- package/src/containers/PullRequestsArticle/PullRequestsArticle.tsx +361 -0
- package/src/containers/PullRequestsArticle/arrange.test.ts +122 -0
- package/src/containers/PullRequestsArticle/arrange.ts +245 -0
- package/src/containers/PullRequestsArticle/format.ts +31 -0
- package/src/containers/PullRequestsArticle/index.ts +5 -0
- package/src/containers/WalkthroughArticle/WalkthroughArticle.tsx +31 -0
- package/src/containers/WalkthroughArticle/index.ts +5 -0
- package/src/containers/index.ts +11 -0
- package/src/errors.ts +61 -0
- package/src/extensions/index.ts +6 -0
- package/src/extensions/links.test.ts +133 -0
- package/src/extensions/links.ts +91 -0
- package/src/extensions/references.test.ts +83 -0
- package/src/extensions/references.ts +100 -0
- package/src/github-link.ts +70 -0
- package/src/hooks/index.ts +6 -3
- package/src/hooks/useOpenObject.ts +48 -0
- package/src/hooks/usePullRequestChecks.ts +81 -0
- package/src/hooks/usePullRequestDiff.ts +57 -0
- package/src/hooks/usePullRequestFiles.ts +98 -0
- package/src/hooks/useSyncPullRequest.ts +51 -0
- package/src/index.ts +4 -6
- package/src/meta.ts +8 -13
- package/src/operations/add-pull-request-comment.ts +31 -0
- package/src/operations/add-pull-request-review-comment.ts +32 -0
- package/src/operations/generate-walkthrough.ts +124 -0
- package/src/operations/get-pull-request-diff.ts +37 -0
- package/src/operations/get-pull-request-status.ts +44 -0
- package/src/operations/get-repositories.ts +53 -0
- package/src/operations/import-pull-request-from-snapshot.ts +48 -0
- package/src/operations/import-pull-request.test.ts +151 -0
- package/src/operations/import-pull-request.ts +149 -0
- package/src/operations/index.ts +30 -0
- package/src/operations/materialize-target.ts +60 -0
- package/src/operations/pull-request.test.ts +120 -0
- package/src/operations/pull-request.ts +141 -0
- package/src/operations/refresh-pull-requests.ts +69 -0
- package/src/operations/refresh.test.ts +112 -0
- package/src/operations/refresh.ts +111 -0
- package/src/operations/submit-pull-request-approval.ts +41 -0
- package/src/operations/sync-pull-request.ts +34 -0
- package/src/operations/sync.test.ts +453 -0
- package/src/operations/sync.ts +807 -0
- package/src/plugin.test.ts +40 -0
- package/src/plugin.ts +37 -0
- package/src/pull-request-body.test.ts +61 -0
- package/src/pull-request-body.ts +144 -0
- package/src/pull-request.test.ts +67 -0
- package/src/pull-request.ts +80 -0
- package/src/services/github-api.ts +735 -0
- package/src/services/index.ts +5 -0
- package/src/skills/GitHubSkill.ts +46 -0
- package/src/skills/index.ts +5 -0
- package/src/stories/Generate.stories.tsx +152 -0
- package/src/stories/Links.stories.tsx +153 -0
- package/src/stories/PullRequestArticle.stories.tsx +107 -0
- package/src/stories/PullRequestFiles.stories.tsx +69 -0
- package/src/stories/PullRequestOverview.stories.tsx +114 -0
- package/src/stories/PullRequestsArticle.stories.tsx +170 -0
- package/src/stories/Walkthrough.stories.tsx +110 -0
- package/src/stories/github.test.ts +65 -0
- package/src/stories/github.ts +70 -0
- package/src/stories/walkthrough-fixture.ts +115 -0
- package/src/testing/fixtures.ts +99 -0
- package/src/testing/index.ts +7 -0
- package/src/testing/plugin.ts +25 -0
- package/src/testing/pull-request-13348.ts +104 -0
- package/src/testing/pull-request-13363.patch +2981 -0
- package/src/translations.ts +135 -63
- package/src/types/GitHubCapabilities.ts +27 -0
- package/src/types/GitHubEvents.ts +16 -0
- package/src/types/GitHubOperation.ts +397 -0
- package/src/types/PullRequestsView.ts +45 -0
- package/src/types/Walkthrough.test.ts +75 -0
- package/src/types/Walkthrough.ts +66 -0
- package/src/types/index.ts +8 -0
- package/src/vite-env.d.ts +15 -0
- package/src/walkthrough/fill.test.ts +337 -0
- package/src/walkthrough/fill.ts +246 -0
- package/src/walkthrough/generate.test.ts +219 -0
- package/src/walkthrough/generate.ts +248 -0
- package/src/walkthrough/generated.test.ts +70 -0
- package/src/walkthrough/generated.ts +70 -0
- package/src/walkthrough/headings.test.ts +40 -0
- package/src/walkthrough/headings.ts +39 -0
- package/src/walkthrough/index.ts +12 -0
- package/src/walkthrough/patch.ts +154 -0
- package/src/walkthrough/plan.test.ts +178 -0
- package/src/walkthrough/plan.ts +251 -0
- package/src/walkthrough/prompt.test.ts +100 -0
- package/src/walkthrough/prompt.ts +147 -0
- package/src/walkthrough/score.test.ts +272 -0
- package/src/walkthrough/score.ts +430 -0
- package/README.md +0 -15
- package/dist/lib/browser/chunk-S4MPSBA5.mjs +0 -21
- package/dist/lib/browser/chunk-S4MPSBA5.mjs.map +0 -7
- package/dist/lib/browser/index.css +0 -7
- package/dist/lib/browser/index.css.map +0 -7
- package/dist/lib/browser/index.mjs +0 -1535
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/meta.mjs +0 -11
- package/dist/lib/browser/meta.mjs.map +0 -7
- package/dist/types/src/GithubPlugin.d.ts +0 -4
- package/dist/types/src/GithubPlugin.d.ts.map +0 -1
- package/dist/types/src/components/EmbeddedMain/EmbeddedMain.d.ts +0 -4
- package/dist/types/src/components/EmbeddedMain/EmbeddedMain.d.ts.map +0 -1
- package/dist/types/src/components/EmbeddedMain/GfmPreview.d.ts +0 -9
- package/dist/types/src/components/EmbeddedMain/GfmPreview.d.ts.map +0 -1
- package/dist/types/src/components/EmbeddedMain/index.d.ts +0 -2
- package/dist/types/src/components/EmbeddedMain/index.d.ts.map +0 -1
- package/dist/types/src/components/ExportDialog.d.ts +0 -8
- package/dist/types/src/components/ExportDialog.d.ts.map +0 -1
- package/dist/types/src/components/GithubApiProviders/GitHubSettings.d.ts +0 -3
- package/dist/types/src/components/GithubApiProviders/GitHubSettings.d.ts.map +0 -1
- package/dist/types/src/components/GithubApiProviders/OctokitProvider.d.ts +0 -15
- package/dist/types/src/components/GithubApiProviders/OctokitProvider.d.ts.map +0 -1
- package/dist/types/src/components/GithubApiProviders/index.d.ts +0 -3
- package/dist/types/src/components/GithubApiProviders/index.d.ts.map +0 -1
- package/dist/types/src/components/GithubEchoResolverProviders/DocumentTreeItem.d.ts +0 -6
- package/dist/types/src/components/GithubEchoResolverProviders/DocumentTreeItem.d.ts.map +0 -1
- package/dist/types/src/components/GithubEchoResolverProviders/ResolverContext.d.ts +0 -7
- package/dist/types/src/components/GithubEchoResolverProviders/ResolverContext.d.ts.map +0 -1
- package/dist/types/src/components/GithubEchoResolverProviders/ResolverDialog.d.ts +0 -6
- package/dist/types/src/components/GithubEchoResolverProviders/ResolverDialog.d.ts.map +0 -1
- package/dist/types/src/components/GithubEchoResolverProviders/ResolverProps.d.ts +0 -16
- package/dist/types/src/components/GithubEchoResolverProviders/ResolverProps.d.ts.map +0 -1
- package/dist/types/src/components/GithubEchoResolverProviders/ResolverTree.d.ts +0 -3
- package/dist/types/src/components/GithubEchoResolverProviders/ResolverTree.d.ts.map +0 -1
- package/dist/types/src/components/GithubEchoResolverProviders/SpacePickerTreeItem.d.ts +0 -11
- package/dist/types/src/components/GithubEchoResolverProviders/SpacePickerTreeItem.d.ts.map +0 -1
- package/dist/types/src/components/GithubEchoResolverProviders/index.d.ts +0 -3
- package/dist/types/src/components/GithubEchoResolverProviders/index.d.ts.map +0 -1
- package/dist/types/src/components/GithubEchoResolverProviders/spaceResolvers.d.ts +0 -6
- package/dist/types/src/components/GithubEchoResolverProviders/spaceResolvers.d.ts.map +0 -1
- package/dist/types/src/components/ImportDialog.d.ts +0 -7
- package/dist/types/src/components/ImportDialog.d.ts.map +0 -1
- package/dist/types/src/components/Issue.d.ts +0 -5
- package/dist/types/src/components/Issue.d.ts.map +0 -1
- package/dist/types/src/components/Loading/Loading.d.ts +0 -15
- package/dist/types/src/components/Loading/Loading.d.ts.map +0 -1
- package/dist/types/src/components/Loading/Loading.stories.d.ts +0 -40
- package/dist/types/src/components/Loading/Loading.stories.d.ts.map +0 -1
- package/dist/types/src/components/Loading/index.d.ts +0 -2
- package/dist/types/src/components/Loading/index.d.ts.map +0 -1
- package/dist/types/src/components/MarkdownActions.d.ts +0 -7
- package/dist/types/src/components/MarkdownActions.d.ts.map +0 -1
- package/dist/types/src/components/UrlDialog.d.ts +0 -6
- package/dist/types/src/components/UrlDialog.d.ts.map +0 -1
- package/dist/types/src/hooks/useDocGhId.d.ts +0 -6
- package/dist/types/src/hooks/useDocGhId.d.ts.map +0 -1
- package/dist/types/src/hooks/useGhIdFromUrl.d.ts +0 -2
- package/dist/types/src/hooks/useGhIdFromUrl.d.ts.map +0 -1
- package/dist/types/src/types.d.ts +0 -30
- package/dist/types/src/types.d.ts.map +0 -1
- package/src/GithubPlugin.tsx +0 -127
- package/src/components/EmbeddedMain/EmbeddedMain.tsx +0 -294
- package/src/components/EmbeddedMain/GfmPreview.tsx +0 -110
- package/src/components/EmbeddedMain/embedded.css +0 -3
- package/src/components/EmbeddedMain/index.ts +0 -5
- package/src/components/ExportDialog.tsx +0 -157
- package/src/components/GithubApiProviders/GitHubSettings.tsx +0 -72
- package/src/components/GithubApiProviders/OctokitProvider.tsx +0 -60
- package/src/components/GithubApiProviders/index.ts +0 -6
- package/src/components/GithubEchoResolverProviders/DocumentTreeItem.tsx +0 -26
- package/src/components/GithubEchoResolverProviders/ResolverContext.tsx +0 -137
- package/src/components/GithubEchoResolverProviders/ResolverDialog.tsx +0 -34
- package/src/components/GithubEchoResolverProviders/ResolverProps.ts +0 -23
- package/src/components/GithubEchoResolverProviders/ResolverTree.tsx +0 -86
- package/src/components/GithubEchoResolverProviders/SpacePickerTreeItem.tsx +0 -105
- package/src/components/GithubEchoResolverProviders/index.ts +0 -6
- package/src/components/GithubEchoResolverProviders/spaceResolvers.ts +0 -86
- package/src/components/ImportDialog.tsx +0 -72
- package/src/components/Issue.tsx +0 -62
- package/src/components/Loading/Loading.stories.tsx +0 -32
- package/src/components/Loading/Loading.tsx +0 -70
- package/src/components/Loading/index.ts +0 -5
- package/src/components/MarkdownActions.tsx +0 -136
- package/src/components/UrlDialog.tsx +0 -52
- package/src/hooks/useDocGhId.ts +0 -38
- package/src/hooks/useGhIdFromUrl.ts +0 -26
- package/src/types.ts +0 -51
package/src/translations.ts
CHANGED
|
@@ -1,72 +1,144 @@
|
|
|
1
1
|
//
|
|
2
|
-
// Copyright
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { Type } from '@dxos/echo';
|
|
6
|
+
import type * as Theme from '@dxos/react-ui/Theme';
|
|
7
|
+
import { PullRequest } from '@dxos/types';
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
import { meta } from '#meta';
|
|
10
|
+
import { Walkthrough } from '#types';
|
|
11
|
+
|
|
12
|
+
export const translations = [
|
|
8
13
|
{
|
|
9
14
|
'en-US': {
|
|
10
|
-
[
|
|
11
|
-
'
|
|
12
|
-
'
|
|
13
|
-
'
|
|
14
|
-
'
|
|
15
|
-
'
|
|
16
|
-
'
|
|
17
|
-
|
|
18
|
-
'
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
'
|
|
22
|
-
'
|
|
23
|
-
|
|
24
|
-
'
|
|
25
|
-
'
|
|
26
|
-
'
|
|
27
|
-
|
|
28
|
-
'
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
'
|
|
33
|
-
'
|
|
34
|
-
'
|
|
35
|
-
'
|
|
36
|
-
'
|
|
37
|
-
'
|
|
38
|
-
|
|
39
|
-
'
|
|
40
|
-
'
|
|
41
|
-
'
|
|
42
|
-
|
|
43
|
-
'
|
|
44
|
-
'
|
|
45
|
-
'
|
|
46
|
-
'
|
|
47
|
-
'
|
|
48
|
-
|
|
49
|
-
'
|
|
50
|
-
'
|
|
51
|
-
'
|
|
52
|
-
'
|
|
53
|
-
'
|
|
54
|
-
'
|
|
55
|
-
'
|
|
56
|
-
'
|
|
57
|
-
|
|
58
|
-
'
|
|
59
|
-
'
|
|
60
|
-
'
|
|
61
|
-
'
|
|
62
|
-
'
|
|
63
|
-
'
|
|
64
|
-
'
|
|
65
|
-
'
|
|
66
|
-
'
|
|
67
|
-
|
|
68
|
-
'
|
|
15
|
+
[Type.getTypename(PullRequest.PullRequest)]: {
|
|
16
|
+
'typename.label': 'Pull request',
|
|
17
|
+
'typename.label_zero': 'Pull requests',
|
|
18
|
+
'typename.label_one': 'Pull request',
|
|
19
|
+
'typename.label_other': 'Pull requests',
|
|
20
|
+
'object-name.placeholder': 'New pull request',
|
|
21
|
+
'rename-object.label': 'Rename pull request',
|
|
22
|
+
'delete-object.label': 'Delete pull request',
|
|
23
|
+
'object-deleted.label': 'Pull request deleted',
|
|
24
|
+
},
|
|
25
|
+
[Type.getTypename(Walkthrough.Walkthrough)]: {
|
|
26
|
+
'typename.label': 'Walkthrough',
|
|
27
|
+
'typename.label_zero': 'Walkthroughs',
|
|
28
|
+
'typename.label_one': 'Walkthrough',
|
|
29
|
+
'typename.label_other': 'Walkthroughs',
|
|
30
|
+
'object-name.placeholder': 'New walkthrough',
|
|
31
|
+
'rename-object.label': 'Rename walkthrough',
|
|
32
|
+
'delete-object.label': 'Delete walkthrough',
|
|
33
|
+
'object-deleted.label': 'Walkthrough deleted',
|
|
34
|
+
},
|
|
35
|
+
[meta.profile.key]: {
|
|
36
|
+
'plugin.name': 'GitHub',
|
|
37
|
+
'sync-now.label': 'Sync now',
|
|
38
|
+
'sync-toast.success.label': 'Sync complete',
|
|
39
|
+
'sync-toast.error.label': 'Sync failed',
|
|
40
|
+
'open-walkthrough.label': 'Open walkthrough',
|
|
41
|
+
'generate-walkthrough.label': 'Generate walkthrough',
|
|
42
|
+
'regenerate-walkthrough.label': 'Regenerate walkthrough',
|
|
43
|
+
'no-walkthrough.message': 'No walkthrough yet for this pull request.',
|
|
44
|
+
'walkthrough-generating.message': 'Writing the walkthrough…',
|
|
45
|
+
'import-pull-request.label': 'Import pull request',
|
|
46
|
+
'import-pull-request-dialog.title': 'Import pull request',
|
|
47
|
+
'import-pull-request-submit.label': 'Import',
|
|
48
|
+
'import-pull-request-failed.title': 'Could not import the pull request',
|
|
49
|
+
'import-pull-request-token-rejected.title': 'GitHub rejected your connection — reconnect GitHub and try again',
|
|
50
|
+
'import-pull-request-not-connected.title':
|
|
51
|
+
'Pull request not found — connect GitHub to import one from a private repository',
|
|
52
|
+
'import-pull-request-inaccessible.title':
|
|
53
|
+
'Pull request not found, or not accessible with your GitHub connection',
|
|
54
|
+
'import-pull-request-no-space.title': 'Open a space to import a pull request into',
|
|
55
|
+
'open-pull-request.label': 'Open pull request',
|
|
56
|
+
'github-token-rejected.title': 'GitHub rejected your connection — reconnect GitHub and try again',
|
|
57
|
+
'open-github-connection.label': 'Go to connection',
|
|
58
|
+
'walkthrough-ready.title': 'Walkthrough ready',
|
|
59
|
+
'walkthrough-failed.title': 'Walkthrough generation failed',
|
|
60
|
+
'approve-pull-request.label': 'Approve',
|
|
61
|
+
'approve-pull-request-success.title': 'Pull request approved',
|
|
62
|
+
'approve-pull-request-commented.title': 'Approval posted as a comment',
|
|
63
|
+
'approve-pull-request-error.title': 'Could not approve the pull request',
|
|
64
|
+
'comment-pull-request.label': 'Comment',
|
|
65
|
+
'comment-placeholder.label': 'Leave a comment on the pull request',
|
|
66
|
+
'comment-line.label': 'Commenting on {{file}}:{{line}}',
|
|
67
|
+
'comment-submit.label': 'Post comment',
|
|
68
|
+
'comment-cancel.label': 'Cancel',
|
|
69
|
+
'comment-success.title': 'Comment posted',
|
|
70
|
+
'comment-error.title': 'Could not post the comment',
|
|
71
|
+
'open-on-github.label': 'Open on GitHub',
|
|
72
|
+
'copy-link.label': 'Copy link to pull request',
|
|
73
|
+
'copy-link-success.title': 'Link copied',
|
|
74
|
+
'copy-link-error.title': 'Could not copy the link',
|
|
75
|
+
'pull-requests-sort.label': 'Sort',
|
|
76
|
+
'pull-requests-sort-relevance.label': 'Relevance',
|
|
77
|
+
'pull-requests-sort-updated.label': 'Updated',
|
|
78
|
+
'pull-requests-sort-created.label': 'Created',
|
|
79
|
+
'pull-requests-sort-number.label': 'Number',
|
|
80
|
+
'pull-requests-sort-title.label': 'Title',
|
|
81
|
+
'pull-requests-sort-asc.label': 'Ascending',
|
|
82
|
+
'pull-requests-sort-desc.label': 'Descending',
|
|
83
|
+
'pull-requests-group.label': 'Group',
|
|
84
|
+
'pull-requests-group-none.label': 'No grouping',
|
|
85
|
+
'pull-requests-group-repo.label': 'Repository',
|
|
86
|
+
'pull-requests-group-state.label': 'State',
|
|
87
|
+
'pull-requests-group-checks.label': 'Checks',
|
|
88
|
+
'pull-requests-group-author.label': 'Author',
|
|
89
|
+
'pull-requests-filter-clear.label': 'Clear filter',
|
|
90
|
+
'pull-requests-empty.message': 'No pull requests in this space yet.',
|
|
91
|
+
'pull-requests-no-match.message': 'No pull requests match the filter.',
|
|
92
|
+
'group-no-author.label': 'Unknown author',
|
|
93
|
+
'untitled-task.label': 'Untitled task',
|
|
94
|
+
'ci-status.success.label': 'CI passing',
|
|
95
|
+
'ci-status.failure.label': 'CI failing',
|
|
96
|
+
'ci-status.pending.label': 'CI running',
|
|
97
|
+
'ci-status.none.label': 'No CI',
|
|
98
|
+
'ci-status.unknown.label': 'CI unknown',
|
|
99
|
+
'pull-request-state.open.label': 'Open',
|
|
100
|
+
'pull-request-state.closed.label': 'Closed',
|
|
101
|
+
'pull-request-state.merged.label': 'Merged',
|
|
102
|
+
'pull-request-state.draft.label': 'Draft',
|
|
103
|
+
'review-status.approved.label_one': 'Approved',
|
|
104
|
+
'review-status.approved.label_other': 'Approved ×{{count}}',
|
|
105
|
+
'review-status.changes_requested.label': 'Changes requested',
|
|
106
|
+
'review-status.none.label': 'Awaiting review',
|
|
107
|
+
'review-status.unknown.label': 'Review unknown',
|
|
108
|
+
'views.label': 'Views',
|
|
109
|
+
'overview-tab.label': 'Overview',
|
|
110
|
+
'walkthrough-tab.label': 'Walkthrough',
|
|
111
|
+
'files-tab.label': 'Files',
|
|
112
|
+
'files-tree.label': 'Changed files',
|
|
113
|
+
'files-reviewed.label': '{{reviewed}} of {{total}} files reviewed',
|
|
114
|
+
'files-loading.message': 'Loading the changed files…',
|
|
115
|
+
'files-error.message': 'Could not read the changed files.',
|
|
116
|
+
'no-files.message': 'This pull request changes no files.',
|
|
117
|
+
'file-no-diff.message': 'No text changes to show — a binary file, or a rename without edits.',
|
|
118
|
+
'file-reviewed.label': 'Reviewed',
|
|
119
|
+
'previous-file.label': 'Previous file',
|
|
120
|
+
'next-file.label': 'Next file',
|
|
121
|
+
'details.label': 'Details',
|
|
122
|
+
'no-description.message': 'No description provided.',
|
|
123
|
+
'related.label': 'Related',
|
|
124
|
+
'checks.label': 'Checks',
|
|
125
|
+
'checks-summary.label': '{{passed}} passed · {{failed}} failed · {{pending}} running · {{skipped}} skipped',
|
|
126
|
+
'checks-loading.message': 'Loading checks…',
|
|
127
|
+
'no-checks.message': 'No checks ran on the head commit.',
|
|
128
|
+
'check-outcome.success.label': 'Passed',
|
|
129
|
+
'check-outcome.failure.label': 'Failed',
|
|
130
|
+
'check-outcome.pending.label': 'Running',
|
|
131
|
+
'check-outcome.skipped.label': 'Skipped',
|
|
132
|
+
'check-outcome.neutral.label': 'Neutral',
|
|
133
|
+
'preview-deployment.label': 'Composer preview',
|
|
134
|
+
'claude-session.label': 'Claude Code session',
|
|
135
|
+
'claude-generated.label': 'Generated with Claude Code',
|
|
136
|
+
'artifact-video.label': 'Demo video',
|
|
137
|
+
'artifact-image.label': 'Screenshot',
|
|
138
|
+
'artifact-file.label': 'Artifact',
|
|
139
|
+
'branches.label': 'Branches',
|
|
140
|
+
'open-link.label': 'Open',
|
|
69
141
|
},
|
|
70
142
|
},
|
|
71
143
|
},
|
|
72
|
-
];
|
|
144
|
+
] as const satisfies Theme.Resource[];
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
// @import-as-namespace
|
|
6
|
+
|
|
7
|
+
import type * as Effect from 'effect/Effect';
|
|
8
|
+
|
|
9
|
+
import * as Capability from '@dxos/app-framework/Capability';
|
|
10
|
+
import type * as PreviewCapabilities from '@dxos/plugin-preview/PreviewCapabilities';
|
|
11
|
+
import { type Issue, type PullRequest, type Repo } from '@dxos/types';
|
|
12
|
+
|
|
13
|
+
import { meta } from '#meta';
|
|
14
|
+
|
|
15
|
+
import { type GitHubLink } from '../extensions/index.ts';
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Where a previewed link's repository, pull request or issue comes from. The plugin's default fetches it from
|
|
19
|
+
* the GitHub API with the space's connection token (anonymously when there is none); a host that
|
|
20
|
+
* contributes one — a story, a test, an offline build — replaces the fetch.
|
|
21
|
+
*/
|
|
22
|
+
export type GitHubLinkSource = (
|
|
23
|
+
link: GitHubLink,
|
|
24
|
+
context: PreviewCapabilities.PreviewLinkContext,
|
|
25
|
+
) => Effect.Effect<Repo.Repo | Issue.Issue | PullRequest.PullRequest | undefined>;
|
|
26
|
+
|
|
27
|
+
export const LinkSource = Capability.make<GitHubLinkSource>()(`${meta.profile.key}.capability.linkSource`);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
// @import-as-namespace
|
|
6
|
+
|
|
7
|
+
import * as ActivationEvent from '@dxos/app-framework/ActivationEvent';
|
|
8
|
+
|
|
9
|
+
import { meta } from '#meta';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* The feature's start event: the plugin's start-gated modules (and cross-plugin
|
|
13
|
+
* contributions consumed by this feature) activate here. Fired on demand and by the
|
|
14
|
+
* host's idle trickle.
|
|
15
|
+
*/
|
|
16
|
+
export const Start = ActivationEvent.pluginStart(meta.profile.key);
|
|
@@ -0,0 +1,397 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
// @import-as-namespace
|
|
6
|
+
|
|
7
|
+
import * as Schema from 'effect/Schema';
|
|
8
|
+
|
|
9
|
+
import { AiService } from '@dxos/ai';
|
|
10
|
+
import * as Operation from '@dxos/compute/Operation';
|
|
11
|
+
import * as Trace from '@dxos/compute/Trace';
|
|
12
|
+
import { Database, DXN, Obj, Ref } from '@dxos/echo';
|
|
13
|
+
// Referenced in the emitted .d.ts of the operations (via `ConnectorSpec`'s schemas); importing it
|
|
14
|
+
// lets TypeScript name it (TS2883).
|
|
15
|
+
// eslint-disable-next-line unused-imports/no-unused-imports
|
|
16
|
+
import { Connection } from '@dxos/link';
|
|
17
|
+
import * as ConnectorSpec from '@dxos/plugin-connector/ConnectorSpec';
|
|
18
|
+
import * as PageAction from '@dxos/plugin-crx/PageAction';
|
|
19
|
+
import { PullRequest } from '@dxos/types';
|
|
20
|
+
|
|
21
|
+
import * as Walkthrough from './Walkthrough.ts';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Discovery only — list GitHub repositories the connection's token can see.
|
|
25
|
+
* Returns one descriptor per repo across all the user's orgs (and personal
|
|
26
|
+
* account). Read-only: NEVER materializes local objects — materialization is
|
|
27
|
+
* handled by the connector's `materializeTarget` when a `Cursor` is created.
|
|
28
|
+
*
|
|
29
|
+
* Orgs and their members are NOT presented as sync targets — they are
|
|
30
|
+
* auto-synced as part of the sync of any repo they own.
|
|
31
|
+
*/
|
|
32
|
+
export const GetGitHubRepositories = Operation.make({
|
|
33
|
+
meta: {
|
|
34
|
+
key: DXN.make('org.dxos.operation.github.getRepositories'),
|
|
35
|
+
name: 'Get GitHub Repositories',
|
|
36
|
+
description: 'List GitHub repositories reachable from a connection without materializing local objects.',
|
|
37
|
+
icon: 'ph--github-logo--regular',
|
|
38
|
+
},
|
|
39
|
+
input: ConnectorSpec.GetSyncTargetsInput,
|
|
40
|
+
output: ConnectorSpec.GetSyncTargetsOutput,
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Find-or-create the empty local root Project for a selected GitHub repo so a
|
|
45
|
+
* cursor can reference it as its `spec.target`. Keyed by the repo's
|
|
46
|
+
* GitHub foreign id (`remoteTarget.id`), so it is idempotent across re-selection.
|
|
47
|
+
*/
|
|
48
|
+
export const MaterializeGitHubTarget = Operation.make({
|
|
49
|
+
meta: {
|
|
50
|
+
key: DXN.make('org.dxos.operation.github.materializeTarget'),
|
|
51
|
+
name: 'Materialize GitHub Target',
|
|
52
|
+
description: 'Create the empty local root Project bound to a selected GitHub repository.',
|
|
53
|
+
icon: 'ph--github-logo--regular',
|
|
54
|
+
},
|
|
55
|
+
input: ConnectorSpec.MaterializeTargetInput,
|
|
56
|
+
output: ConnectorSpec.MaterializeTargetOutput,
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Per-target options. `maxDaysBack` caps how far back issues/PRs are pulled
|
|
61
|
+
* (mirrors the Gmail mailbox `daysBack`). Default — when unset — is "sync
|
|
62
|
+
* everything ever opened or edited."
|
|
63
|
+
*/
|
|
64
|
+
export const SyncOptions = Schema.Struct({
|
|
65
|
+
maxDaysBack: Schema.Number.annotate({
|
|
66
|
+
title: 'Sync history (days)',
|
|
67
|
+
description: 'Pull issues and PRs updated within this many days. Leave empty to sync everything.',
|
|
68
|
+
}).pipe(Schema.optional),
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
export interface SyncOptions extends Schema.Schema.Type<typeof SyncOptions> {}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Reconcile GitHub data for every repo bound to a connection (one cursor per repo).
|
|
75
|
+
*
|
|
76
|
+
* Pull-then-push per bound repo: auto-upsert its owning org + members,
|
|
77
|
+
* three-way merge the repo as a Project and its issues/PRs as Tasks (respecting
|
|
78
|
+
* `maxDaysBack` if set), then push diverged Project/Task fields back to GitHub.
|
|
79
|
+
* Sync state (`lastTick`/`lastError`/`spec.snapshots`) is written onto each binding.
|
|
80
|
+
*/
|
|
81
|
+
export const SyncGitHubRepositories = Operation.make({
|
|
82
|
+
meta: {
|
|
83
|
+
key: DXN.make('org.dxos.operation.github.syncRepositories'),
|
|
84
|
+
name: 'Sync GitHub Repositories',
|
|
85
|
+
description: 'Reconcile every bound GitHub repo plus its owning org, members, issues, PRs, and comments.',
|
|
86
|
+
icon: 'ph--arrows-clockwise--regular',
|
|
87
|
+
},
|
|
88
|
+
input: ConnectorSpec.SyncInput,
|
|
89
|
+
output: Schema.Struct({
|
|
90
|
+
pulled: Schema.Struct({
|
|
91
|
+
organizations: Schema.Number,
|
|
92
|
+
people: Schema.Number,
|
|
93
|
+
projects: Schema.Number,
|
|
94
|
+
tasks: Schema.Number,
|
|
95
|
+
comments: Schema.Number,
|
|
96
|
+
}),
|
|
97
|
+
}),
|
|
98
|
+
}).pipe(Operation.visible);
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Import a pull request named by a github.com URL or `owner/repo#123` into the space, so it can be
|
|
102
|
+
* opened, reviewed and walked through without waiting for a sync of the whole repository.
|
|
103
|
+
*
|
|
104
|
+
* Idempotent by coordinates — a pull request the space already holds is returned as it stands
|
|
105
|
+
* rather than duplicated.
|
|
106
|
+
*/
|
|
107
|
+
export const ImportPullRequest = Operation.make({
|
|
108
|
+
meta: {
|
|
109
|
+
key: DXN.make('org.dxos.operation.github.importPullRequest'),
|
|
110
|
+
name: 'Import Pull Request',
|
|
111
|
+
description: 'Add a pull request to the space, named by its URL or as owner/repo#number.',
|
|
112
|
+
icon: 'ph--git-pull-request--regular',
|
|
113
|
+
},
|
|
114
|
+
services: [Database.Service],
|
|
115
|
+
input: Schema.Struct({
|
|
116
|
+
/** A github.com pull request URL, or `owner/repo#123`. */
|
|
117
|
+
reference: Schema.String,
|
|
118
|
+
}),
|
|
119
|
+
output: Schema.Struct({
|
|
120
|
+
pullRequest: Ref.Ref(PullRequest.PullRequest),
|
|
121
|
+
/** False where the space already held the pull request, which is then returned unchanged. */
|
|
122
|
+
imported: Schema.Boolean,
|
|
123
|
+
}),
|
|
124
|
+
types: [PullRequest.PullRequest],
|
|
125
|
+
}).pipe(Operation.visible, Operation.mutation('write'));
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Import the pull request the browser extension is looking at, named by the page's own URL.
|
|
129
|
+
*
|
|
130
|
+
* Separate from {@link ImportPullRequest} because the extension bridge invokes every page action
|
|
131
|
+
* with the fixed `{ snapshot, target }` shape and reads an `{ id }` back. Nothing is extracted from
|
|
132
|
+
* the page: the URL in the snapshot's source names the pull request, and GitHub is the authority on
|
|
133
|
+
* everything else.
|
|
134
|
+
*/
|
|
135
|
+
export const ImportPullRequestFromSnapshot = Operation.make({
|
|
136
|
+
meta: {
|
|
137
|
+
key: DXN.make('org.dxos.operation.github.importPullRequestFromSnapshot'),
|
|
138
|
+
name: 'Open pull request in Composer',
|
|
139
|
+
description: "Import the pull request a browser page shows, named by that page's URL.",
|
|
140
|
+
icon: 'ph--git-pull-request--regular',
|
|
141
|
+
},
|
|
142
|
+
input: Schema.Struct({
|
|
143
|
+
snapshot: PageAction.Snapshot,
|
|
144
|
+
target: Database.Database.annotate({ description: 'The database to add the pull request to.' }),
|
|
145
|
+
}),
|
|
146
|
+
output: Schema.Struct({
|
|
147
|
+
id: Schema.String,
|
|
148
|
+
}),
|
|
149
|
+
types: [PullRequest.PullRequest],
|
|
150
|
+
}).pipe(Operation.mutation('write'));
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Generate a walkthrough of a pull request: one markdown document narrating the change in reading
|
|
154
|
+
* order, with its diff chunks spliced in from the patch itself.
|
|
155
|
+
*
|
|
156
|
+
* Idempotent by commit — a walkthrough already generated for the pull request's head is returned
|
|
157
|
+
* unchanged unless `force` says otherwise, since the answer cannot have changed.
|
|
158
|
+
*/
|
|
159
|
+
export const GenerateWalkthrough = Operation.make({
|
|
160
|
+
meta: {
|
|
161
|
+
key: DXN.make('org.dxos.operation.github.generateWalkthrough'),
|
|
162
|
+
name: 'Generate Walkthrough',
|
|
163
|
+
description: "Narrate a pull request as one markdown document, with the change's diffs embedded in it.",
|
|
164
|
+
icon: 'ph--path--regular',
|
|
165
|
+
},
|
|
166
|
+
input: Schema.Struct({
|
|
167
|
+
pullRequest: Ref.Ref(PullRequest.PullRequest),
|
|
168
|
+
/** Regenerate even where a walkthrough for this head already exists. */
|
|
169
|
+
force: Schema.Boolean.pipe(Schema.optional),
|
|
170
|
+
}),
|
|
171
|
+
output: Schema.Struct({
|
|
172
|
+
walkthrough: Ref.Ref(Walkthrough.Walkthrough),
|
|
173
|
+
/** Whether the model ran, as against an existing walkthrough being returned unchanged. */
|
|
174
|
+
generated: Schema.Boolean,
|
|
175
|
+
/** Hunks the prose accounts for, over the patch's total. */
|
|
176
|
+
covered: Schema.Number,
|
|
177
|
+
total: Schema.Number,
|
|
178
|
+
}),
|
|
179
|
+
types: [Walkthrough.Walkthrough, PullRequest.PullRequest],
|
|
180
|
+
// `AiService` must be declared, not merely provided: the invoker builds the runtime from THIS list
|
|
181
|
+
// and `Layer.orDie` clears a layer's error channel, never its requirement.
|
|
182
|
+
services: [Trace.TraceService, AiService.AiService],
|
|
183
|
+
}).pipe(Operation.visible);
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Submit an approving review on a pull request, as the space's GitHub connection.
|
|
187
|
+
*
|
|
188
|
+
* Falls back to a marked conversation comment where GitHub refuses the review — the author's own
|
|
189
|
+
* pull request, or a token with no review permission — so the approval is still recorded and still
|
|
190
|
+
* detectable by an agent deciding whether the pull request is good to land.
|
|
191
|
+
*/
|
|
192
|
+
export const SubmitPullRequestApproval = Operation.make({
|
|
193
|
+
meta: {
|
|
194
|
+
key: DXN.make('org.dxos.operation.github.submitPullRequestApproval'),
|
|
195
|
+
name: 'Submit Pull Request Approval',
|
|
196
|
+
description: 'Submit an approving review on a pull request, or record the approval as a comment.',
|
|
197
|
+
icon: 'ph--check-circle--regular',
|
|
198
|
+
},
|
|
199
|
+
input: Schema.Struct({
|
|
200
|
+
pullRequest: Ref.Ref(PullRequest.PullRequest),
|
|
201
|
+
/** Optional review summary. */
|
|
202
|
+
body: Schema.String.pipe(Schema.optional),
|
|
203
|
+
}),
|
|
204
|
+
output: Schema.Struct({
|
|
205
|
+
/** Set where the approving review was accepted. */
|
|
206
|
+
reviewId: Schema.Number.pipe(Schema.optional),
|
|
207
|
+
/** Set instead where the approval was recorded as a comment. */
|
|
208
|
+
commentId: Schema.Number.pipe(Schema.optional),
|
|
209
|
+
url: Schema.String.pipe(Schema.optional),
|
|
210
|
+
/** Whether the approval is a comment rather than a review. */
|
|
211
|
+
commented: Schema.Boolean,
|
|
212
|
+
}),
|
|
213
|
+
types: [PullRequest.PullRequest],
|
|
214
|
+
});
|
|
215
|
+
|
|
216
|
+
/** Post a conversation comment on a pull request, as the space's GitHub connection. */
|
|
217
|
+
export const AddPullRequestComment = Operation.make({
|
|
218
|
+
meta: {
|
|
219
|
+
key: DXN.make('org.dxos.operation.github.addPullRequestComment'),
|
|
220
|
+
name: 'Add Pull Request Comment',
|
|
221
|
+
description: 'Post a comment on a pull request.',
|
|
222
|
+
icon: 'ph--chat-text--regular',
|
|
223
|
+
},
|
|
224
|
+
input: Schema.Struct({
|
|
225
|
+
pullRequest: Ref.Ref(PullRequest.PullRequest),
|
|
226
|
+
body: Schema.String,
|
|
227
|
+
}),
|
|
228
|
+
output: Schema.Struct({
|
|
229
|
+
commentId: Schema.Number,
|
|
230
|
+
url: Schema.String.pipe(Schema.optional),
|
|
231
|
+
}),
|
|
232
|
+
types: [PullRequest.PullRequest],
|
|
233
|
+
});
|
|
234
|
+
|
|
235
|
+
/** Post a review comment on one line of a pull request's diff, as the space's GitHub connection. */
|
|
236
|
+
export const AddPullRequestReviewComment = Operation.make({
|
|
237
|
+
meta: {
|
|
238
|
+
key: DXN.make('org.dxos.operation.github.addPullRequestReviewComment'),
|
|
239
|
+
name: 'Add Pull Request Review Comment',
|
|
240
|
+
description: 'Post a review comment on a line of a pull request diff.',
|
|
241
|
+
icon: 'ph--chat-centered-text--regular',
|
|
242
|
+
},
|
|
243
|
+
input: Schema.Struct({
|
|
244
|
+
pullRequest: Ref.Ref(PullRequest.PullRequest),
|
|
245
|
+
body: Schema.String,
|
|
246
|
+
/** Head SHA the line numbers refer to; a walkthrough's `commit`. */
|
|
247
|
+
commit: Schema.String,
|
|
248
|
+
path: Schema.String,
|
|
249
|
+
line: Schema.Number,
|
|
250
|
+
/** `LEFT` for the removed side, `RIGHT` for added and context lines. */
|
|
251
|
+
side: Schema.Literals(['LEFT', 'RIGHT']),
|
|
252
|
+
}),
|
|
253
|
+
output: Schema.Struct({
|
|
254
|
+
commentId: Schema.Number,
|
|
255
|
+
url: Schema.String.pipe(Schema.optional),
|
|
256
|
+
}),
|
|
257
|
+
types: [PullRequest.PullRequest],
|
|
258
|
+
});
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* Re-read a stored pull request from GitHub and write back whatever has changed — its title, state,
|
|
262
|
+
* description, branches and size — so the object in the space does not go stale between syncs.
|
|
263
|
+
*/
|
|
264
|
+
export const SyncPullRequest = Operation.make({
|
|
265
|
+
meta: {
|
|
266
|
+
key: DXN.make('org.dxos.operation.github.syncPullRequest'),
|
|
267
|
+
name: 'Sync Pull Request',
|
|
268
|
+
description: 'Refresh a stored pull request from GitHub.',
|
|
269
|
+
icon: 'ph--arrows-clockwise--regular',
|
|
270
|
+
},
|
|
271
|
+
input: Schema.Struct({
|
|
272
|
+
pullRequest: Ref.Ref(PullRequest.PullRequest),
|
|
273
|
+
}),
|
|
274
|
+
output: Schema.Struct({
|
|
275
|
+
/** Names of the fields that changed; empty where the stored pull request was already current. */
|
|
276
|
+
updated: Schema.Array(Schema.String),
|
|
277
|
+
}),
|
|
278
|
+
types: [PullRequest.PullRequest],
|
|
279
|
+
}).pipe(Operation.mutation('write'));
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* Refresh every pull request in the space that is still in flight (open or draft) from GitHub.
|
|
283
|
+
*
|
|
284
|
+
* Run on a schedule by the space's refresh trigger (see `ensureRefreshTrigger`), so pull requests the
|
|
285
|
+
* user is not looking at still track their state; one unreachable pull request does not fail the rest.
|
|
286
|
+
*/
|
|
287
|
+
export const RefreshPullRequests = Operation.make({
|
|
288
|
+
meta: {
|
|
289
|
+
key: DXN.make('org.dxos.operation.github.refreshPullRequests'),
|
|
290
|
+
name: 'Refresh Pull Requests',
|
|
291
|
+
description: 'Refresh every open pull request in the space from GitHub.',
|
|
292
|
+
icon: 'ph--arrows-clockwise--regular',
|
|
293
|
+
},
|
|
294
|
+
services: [Database.Service],
|
|
295
|
+
input: Schema.Struct({}),
|
|
296
|
+
output: Schema.Struct({
|
|
297
|
+
/** Open pull requests read from GitHub. */
|
|
298
|
+
checked: Schema.Number,
|
|
299
|
+
/** Of those, the ones whose stored fields changed. */
|
|
300
|
+
updated: Schema.Number,
|
|
301
|
+
/** Of those, the ones GitHub could not be read for. */
|
|
302
|
+
failed: Schema.Number,
|
|
303
|
+
}),
|
|
304
|
+
types: [PullRequest.PullRequest],
|
|
305
|
+
}).pipe(Operation.mutation('write'));
|
|
306
|
+
|
|
307
|
+
/** Aggregate outcome of a commit's check runs; `none` when the commit has no checks at all. */
|
|
308
|
+
export const CiState = Schema.Literals(['success', 'failure', 'pending', 'none']);
|
|
309
|
+
export type CiState = Schema.Schema.Type<typeof CiState>;
|
|
310
|
+
|
|
311
|
+
export const CheckCounts = Schema.Struct({
|
|
312
|
+
total: Schema.Number,
|
|
313
|
+
passed: Schema.Number,
|
|
314
|
+
failed: Schema.Number,
|
|
315
|
+
pending: Schema.Number,
|
|
316
|
+
});
|
|
317
|
+
export interface CheckCounts extends Schema.Schema.Type<typeof CheckCounts> {}
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* Where the reviews stand, from each reviewer's latest verdict: any outstanding request for changes
|
|
321
|
+
* outweighs approvals, and `none` means no reviewer has approved or asked for changes.
|
|
322
|
+
*/
|
|
323
|
+
export const ReviewState = Schema.Literals(['approved', 'changes_requested', 'none']);
|
|
324
|
+
export type ReviewState = Schema.Schema.Type<typeof ReviewState>;
|
|
325
|
+
|
|
326
|
+
/** How one check run ended, folded to what a reader acts on; `skipped` is neither passing nor failing. */
|
|
327
|
+
export const CheckOutcome = Schema.Literals(['success', 'failure', 'pending', 'skipped', 'neutral']);
|
|
328
|
+
export type CheckOutcome = Schema.Schema.Type<typeof CheckOutcome>;
|
|
329
|
+
|
|
330
|
+
/** One check run on the head commit, as the article lists it. */
|
|
331
|
+
export const CheckRun = Schema.Struct({
|
|
332
|
+
name: Schema.String,
|
|
333
|
+
outcome: CheckOutcome,
|
|
334
|
+
/** GitHub's own `conclusion` (`timed_out`, `cancelled`, …), kept for the label when it says more than the outcome. */
|
|
335
|
+
conclusion: Schema.String.pipe(Schema.optional),
|
|
336
|
+
/** Where the run's logs live: the provider's page when it has one, else GitHub's. */
|
|
337
|
+
url: Schema.String.pipe(Schema.optional),
|
|
338
|
+
startedAt: Schema.String.pipe(Schema.optional),
|
|
339
|
+
completedAt: Schema.String.pipe(Schema.optional),
|
|
340
|
+
});
|
|
341
|
+
export interface CheckRun extends Schema.Schema.Type<typeof CheckRun> {}
|
|
342
|
+
|
|
343
|
+
/** Read a pull request's live state and the CI outcome of its head commit from GitHub. */
|
|
344
|
+
export const GetPullRequestStatus = Operation.make({
|
|
345
|
+
meta: {
|
|
346
|
+
key: DXN.make('org.dxos.operation.github.getPullRequestStatus'),
|
|
347
|
+
name: 'Get Pull Request Status',
|
|
348
|
+
description: "Read a pull request's state, its review verdict and the CI status of its head commit.",
|
|
349
|
+
icon: 'ph--git-pull-request--regular',
|
|
350
|
+
},
|
|
351
|
+
input: Schema.Struct({
|
|
352
|
+
pullRequest: Ref.Ref(PullRequest.PullRequest),
|
|
353
|
+
}),
|
|
354
|
+
output: Schema.Struct({
|
|
355
|
+
state: PullRequest.State,
|
|
356
|
+
title: Schema.String,
|
|
357
|
+
commit: Schema.String.pipe(Schema.optional),
|
|
358
|
+
/** The live description, which may have changed since the pull request was imported. */
|
|
359
|
+
body: Schema.String.pipe(Schema.optional),
|
|
360
|
+
ci: CiState,
|
|
361
|
+
checks: CheckCounts,
|
|
362
|
+
runs: Schema.Array(CheckRun),
|
|
363
|
+
review: ReviewState,
|
|
364
|
+
/** Reviewers whose latest verdict is an approval. */
|
|
365
|
+
approvals: Schema.Number,
|
|
366
|
+
}),
|
|
367
|
+
types: [PullRequest.PullRequest],
|
|
368
|
+
});
|
|
369
|
+
|
|
370
|
+
/**
|
|
371
|
+
* Read a pull request's whole change as a unified diff, with the head commit it was taken at so a
|
|
372
|
+
* line comment on it anchors to the lines the reader saw.
|
|
373
|
+
*/
|
|
374
|
+
export const GetPullRequestDiff = Operation.make({
|
|
375
|
+
meta: {
|
|
376
|
+
key: DXN.make('org.dxos.operation.github.getPullRequestDiff'),
|
|
377
|
+
name: 'Get Pull Request Diff',
|
|
378
|
+
description: "Read a pull request's changed files as a unified diff.",
|
|
379
|
+
icon: 'ph--git-diff--regular',
|
|
380
|
+
},
|
|
381
|
+
input: Schema.Struct({
|
|
382
|
+
pullRequest: Ref.Ref(PullRequest.PullRequest),
|
|
383
|
+
}),
|
|
384
|
+
output: Schema.Struct({
|
|
385
|
+
commit: Schema.String.pipe(Schema.optional),
|
|
386
|
+
diff: Schema.String,
|
|
387
|
+
}),
|
|
388
|
+
types: [PullRequest.PullRequest],
|
|
389
|
+
});
|
|
390
|
+
|
|
391
|
+
/**
|
|
392
|
+
* Progress key for {@link GenerateWalkthrough}, derived from the pull request rather than passed, so
|
|
393
|
+
* the UI can watch a run it did not start. The absolute URI form is required: a hydration-dependent
|
|
394
|
+
* one would not match the key the producer mints.
|
|
395
|
+
*/
|
|
396
|
+
export const createWalkthroughProgressKey = (pullRequest: PullRequest.PullRequest): string =>
|
|
397
|
+
Obj.getURI(pullRequest, { prefer: 'absolute' }).toString() + '#walkthrough';
|