@atolis-hq/wake 0.3.66 → 0.3.68
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.
|
@@ -17,10 +17,16 @@ export class RunRepository {
|
|
|
17
17
|
return events.map(decodeRunExecutionEvent);
|
|
18
18
|
}
|
|
19
19
|
async list(activationId) {
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
const grouped = new Map();
|
|
21
|
+
for (const event of await this.journal.readAll(0)) {
|
|
22
|
+
if (!isRunStream(event.stream))
|
|
23
|
+
continue;
|
|
24
|
+
const id = runId(event.stream.id);
|
|
25
|
+
const events = grouped.get(id) ?? [];
|
|
26
|
+
events.push(decodeRunExecutionEvent(event));
|
|
27
|
+
grouped.set(id, events);
|
|
28
|
+
}
|
|
29
|
+
const runs = (await Promise.all([...grouped.values()].map(foldRun))).filter((run) => run !== null);
|
|
24
30
|
return activationId === undefined
|
|
25
31
|
? runs
|
|
26
32
|
: runs.filter((run) => run.activationId === activationId);
|
|
@@ -73,6 +73,7 @@ function limitGitHubSourceClient(client, requests) {
|
|
|
73
73
|
}
|
|
74
74
|
async function pollRepository(input) {
|
|
75
75
|
const { client, config, adapter, signal, owner, repo } = input;
|
|
76
|
+
const queriedAt = input.now();
|
|
76
77
|
const context = {
|
|
77
78
|
client,
|
|
78
79
|
config,
|
|
@@ -107,7 +108,7 @@ async function pollRepository(input) {
|
|
|
107
108
|
]);
|
|
108
109
|
return {
|
|
109
110
|
repository: context.repository,
|
|
110
|
-
completedAt:
|
|
111
|
+
completedAt: queriedAt,
|
|
111
112
|
succeeded: isFulfilled(issuesResult) &&
|
|
112
113
|
isFulfilled(pullRequestsResult) &&
|
|
113
114
|
reviews.succeeded &&
|