@atolis-hq/wake 0.4.19 → 0.4.20
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/src/bootstrap/version.js +1 -1
- package/dist/src/integrations/github/application/intake-policy.js +2 -0
- package/dist/src/integrations/github/contracts/config.d.ts +5 -0
- package/dist/src/integrations/github/contracts/config.js +4 -0
- package/dist/src/integrations/github/contracts/vocabulary.d.ts +1 -0
- package/dist/src/integrations/github/contracts/vocabulary.js +1 -0
- package/package.json +1 -1
|
@@ -124,6 +124,6 @@ export function resolveWakeVersion(options = {}) {
|
|
|
124
124
|
return `g${headHash.slice(0, 7)}`;
|
|
125
125
|
return '0.1.0-dev';
|
|
126
126
|
}
|
|
127
|
-
export const wakeVersion = "v0.4.
|
|
127
|
+
export const wakeVersion = "v0.4.20";
|
|
128
128
|
/** The registry-installable version used by packaged sandbox images. */
|
|
129
129
|
export const wakePackageVersion = packageVersion(defaultRepoRoot) ?? wakeVersion;
|
|
@@ -5,6 +5,7 @@ export function gitHubIntakeRules(configured) {
|
|
|
5
5
|
return configured.map((rule) => ({
|
|
6
6
|
where: {
|
|
7
7
|
...(rule.where.kind === undefined ? {} : { [GitHubIntakeFacet.Kind]: [rule.where.kind] }),
|
|
8
|
+
[GitHubIntakeFacet.State]: rule.where.state,
|
|
8
9
|
[GitHubIntakeFacet.Label]: rule.where.labels,
|
|
9
10
|
[GitHubIntakeFacet.Assignee]: rule.where.requiredAssignees,
|
|
10
11
|
[GitHubIntakeFacet.Author]: rule.where.requiredAuthors,
|
|
@@ -40,6 +41,7 @@ function sharedRequiredValue(configured, values) {
|
|
|
40
41
|
export function gitHubIntakeFacts(payload) {
|
|
41
42
|
return {
|
|
42
43
|
[GitHubIntakeFacet.Kind]: [payload.kind],
|
|
44
|
+
[GitHubIntakeFacet.State]: [payload.state],
|
|
43
45
|
[GitHubIntakeFacet.Label]: payload.labels ?? [],
|
|
44
46
|
[GitHubIntakeFacet.Assignee]: payload.assignees ?? [],
|
|
45
47
|
[GitHubIntakeFacet.Author]: [payload.actor.id],
|
|
@@ -19,6 +19,11 @@ export declare const gitHubConfigSchema: z.ZodObject<{
|
|
|
19
19
|
issue: "issue";
|
|
20
20
|
"pull-request": "pull-request";
|
|
21
21
|
}>>;
|
|
22
|
+
state: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
23
|
+
open: "open";
|
|
24
|
+
closed: "closed";
|
|
25
|
+
merged: "merged";
|
|
26
|
+
}>>>;
|
|
22
27
|
requiredAssignees: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
23
28
|
requiredAuthors: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
24
29
|
labels: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { PullRequestState } from '../../../activities/index.js';
|
|
2
3
|
import { MatchMode } from '../../../kernel/index.js';
|
|
3
4
|
import { ReplyOutcomeConfig, ReplyTarget, } from '../../contracts/reply-routing.js';
|
|
4
5
|
import { isGitHubWakeMarker } from './vocabulary.js';
|
|
@@ -53,6 +54,9 @@ const intakeRuleSchema = z
|
|
|
53
54
|
where: z
|
|
54
55
|
.object({
|
|
55
56
|
kind: z.enum(['issue', 'pull-request']).optional(),
|
|
57
|
+
state: z
|
|
58
|
+
.array(z.enum([PullRequestState.Open, PullRequestState.Closed, PullRequestState.Merged]))
|
|
59
|
+
.default([]),
|
|
56
60
|
requiredAssignees: z.array(z.string().trim().min(1)).default([]),
|
|
57
61
|
requiredAuthors: z.array(z.string().trim().min(1)).default([]),
|
|
58
62
|
labels: z.array(z.string().trim().min(1)).default([]),
|
|
@@ -38,6 +38,7 @@ export type GitHubWakeMarkerPrefix = ValueOf<typeof GitHubWakeMarkerPrefix>;
|
|
|
38
38
|
export declare function isGitHubWakeMarker(label: string): boolean;
|
|
39
39
|
export declare const GitHubIntakeFacet: {
|
|
40
40
|
readonly Kind: "kind";
|
|
41
|
+
readonly State: "state";
|
|
41
42
|
readonly Label: "label";
|
|
42
43
|
readonly Assignee: "assignee";
|
|
43
44
|
readonly Author: "author";
|
|
@@ -40,6 +40,7 @@ export function isGitHubWakeMarker(label) {
|
|
|
40
40
|
// Facets a GitHub intake rule may constrain, and the observation fields they read.
|
|
41
41
|
export const GitHubIntakeFacet = {
|
|
42
42
|
Kind: 'kind',
|
|
43
|
+
State: 'state',
|
|
43
44
|
Label: 'label',
|
|
44
45
|
Assignee: 'assignee',
|
|
45
46
|
Author: 'author',
|