@markjaquith/agency 2.20.0 → 2.22.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.
@@ -51,6 +51,26 @@ const GitHubPullRequestUrl = NonEmptyString.pipe(
51
51
  Schema.pattern(/^https:\/\/github\.com\/[^/]+\/[^/]+\/pull\/\d+\/?$/),
52
52
  )
53
53
 
54
+ export const PullRequestRecord = Schema.Struct({
55
+ provider: EntityId,
56
+ repository: NonEmptyString,
57
+ identifier: NonEmptyString,
58
+ url: Url,
59
+ state: Schema.Literal("open", "closed", "merged"),
60
+ draft: Schema.Boolean,
61
+ merged: Schema.Boolean,
62
+ })
63
+
64
+ const DeliveryProvider = Schema.Struct({
65
+ provider: EntityId,
66
+ remote: Schema.optional(NonEmptyString),
67
+ createCommand: Schema.NonEmptyArray(NonEmptyString),
68
+ queryCommand: Schema.NonEmptyArray(NonEmptyString),
69
+ environment: Schema.optional(
70
+ Schema.Record({ key: EnvironmentName, value: Schema.String }),
71
+ ),
72
+ })
73
+
54
74
  export const WorkbaseConfig = Schema.Struct({
55
75
  version: Schema.Literal(2),
56
76
  chooserCommand: Schema.optional(Schema.NonEmptyArray(NonEmptyString)),
@@ -67,6 +87,7 @@ export const WorkbaseConfig = Schema.Struct({
67
87
  }),
68
88
  }),
69
89
  ),
90
+ delivery: Schema.optional(DeliveryProvider),
70
91
  })
71
92
 
72
93
  export const LegacyWorkbaseRegistry = Schema.Struct({
@@ -96,7 +117,7 @@ const ExecutionUnit = {
96
117
  repos: Schema.optional(Schema.Array(RepositoryReference)),
97
118
  branch: NonEmptyString,
98
119
  base: NonEmptyString,
99
- pr: Schema.NullOr(GitHubPullRequestUrl),
120
+ pr: Schema.NullOr(Schema.Union(GitHubPullRequestUrl, PullRequestRecord)),
100
121
  status: Schema.optionalWith(WorkStatus, { default: () => "open" as const }),
101
122
  claim: Schema.optional(ClaimRecord),
102
123
  }
@@ -141,6 +162,7 @@ export type Dependency = Schema.Schema.Type<typeof Dependency>
141
162
  export type RepositoryReference = Schema.Schema.Type<typeof RepositoryReference>
142
163
  export type WorkStatus = Schema.Schema.Type<typeof WorkStatus>
143
164
  export type ClaimRecord = Schema.Schema.Type<typeof ClaimRecord>
165
+ export type PullRequestRecord = Schema.Schema.Type<typeof PullRequestRecord>
144
166
  export type EpicFrontmatter = Schema.Schema.Type<typeof EpicFrontmatter>
145
167
  export type TaskFrontmatter = Schema.Schema.Type<typeof TaskFrontmatter>
146
168
  export type PhaseFrontmatter = Schema.Schema.Type<typeof PhaseFrontmatter>