@dxos/plugin-github 0.13.0 → 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/dist/lib/GitHubOperation.mjs +27 -1
- package/dist/lib/GitHubOperation.mjs.map +1 -1
- package/dist/lib/chunk-PullRequestArticle.mjs +31 -11
- package/dist/lib/chunk-PullRequestArticle.mjs.map +1 -1
- package/dist/lib/chunk-import-pull-request.mjs +78 -3
- package/dist/lib/chunk-import-pull-request.mjs.map +1 -1
- 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-sync-pull-request.mjs +11 -9
- package/dist/lib/chunk-sync-pull-request.mjs.map +1 -1
- package/dist/lib/operations.mjs +2 -1
- package/dist/lib/operations.mjs.map +1 -1
- package/dist/types/src/components/PullRequestOverview/CheckRunList.d.ts +5 -2
- package/dist/types/src/components/PullRequestOverview/CheckRunList.d.ts.map +1 -1
- 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/PullRequestStatus/PullRequestStatus.d.ts.map +1 -1
- package/dist/types/src/operations/import-pull-request.d.ts.map +1 -1
- package/dist/types/src/operations/index.d.ts.map +1 -1
- 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/sync-pull-request.d.ts.map +1 -1
- package/dist/types/src/stories/PullRequestOverview.stories.d.ts.map +1 -1
- package/dist/types/src/types/GitHubOperation.d.ts +11 -0
- package/dist/types/src/types/GitHubOperation.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +42 -42
- package/src/components/PullRequestOverview/ArtifactPill.tsx +1 -1
- package/src/components/PullRequestOverview/CheckRunList.test.ts +29 -0
- package/src/components/PullRequestOverview/CheckRunList.tsx +28 -7
- package/src/components/PullRequestStatus/PullRequestStatus.tsx +8 -5
- package/src/operations/import-pull-request.ts +8 -0
- package/src/operations/index.ts +1 -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/sync-pull-request.ts +10 -13
- package/src/stories/PullRequestOverview.stories.tsx +2 -1
- package/src/types/GitHubOperation.ts +26 -0
|
@@ -278,6 +278,32 @@ export const SyncPullRequest = Operation.make({
|
|
|
278
278
|
types: [PullRequest.PullRequest],
|
|
279
279
|
}).pipe(Operation.mutation('write'));
|
|
280
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
|
+
|
|
281
307
|
/** Aggregate outcome of a commit's check runs; `none` when the commit has no checks at all. */
|
|
282
308
|
export const CiState = Schema.Literals(['success', 'failure', 'pending', 'none']);
|
|
283
309
|
export type CiState = Schema.Schema.Type<typeof CiState>;
|