reposets 0.4.3 → 1.0.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.
Files changed (53) hide show
  1. package/README.md +87 -75
  2. package/bin/reposets.js +68 -17
  3. package/cli/commands/credentials.js +170 -49
  4. package/cli/commands/doctor.js +359 -86
  5. package/cli/commands/drift.js +48 -0
  6. package/cli/commands/history.js +203 -0
  7. package/cli/commands/init.js +110 -104
  8. package/cli/commands/list.js +60 -39
  9. package/cli/commands/nuke.js +127 -0
  10. package/cli/commands/sync.js +219 -59
  11. package/cli/commands/validate.js +57 -41
  12. package/cli/flags.js +36 -0
  13. package/cli/logger.js +48 -0
  14. package/index.d.ts +378 -1406
  15. package/index.js +3 -18
  16. package/lib/config-refs.js +76 -0
  17. package/lib/credential-labels.js +0 -0
  18. package/lib/fingerprint.js +52 -0
  19. package/lib/org-only.js +61 -0
  20. package/lib/schema-issues.js +50 -0
  21. package/package.json +11 -10
  22. package/schemas/annotations.js +81 -0
  23. package/schemas/common.js +83 -48
  24. package/schemas/config.js +214 -212
  25. package/schemas/credentials.js +190 -54
  26. package/schemas/environment.js +27 -21
  27. package/schemas/ruleset.js +235 -139
  28. package/services/ConfigFiles.js +126 -104
  29. package/services/CredentialResolver.js +97 -33
  30. package/services/OnePasswordClient.js +88 -16
  31. package/services/SyncLogger.js +107 -76
  32. package/store/AppliedState.js +0 -0
  33. package/store/RepoCache.js +86 -0
  34. package/store/SyncJournal.js +92 -0
  35. package/store/migrations.js +86 -0
  36. package/sync/SyncEngine.js +156 -0
  37. package/sync/decide.js +56 -0
  38. package/sync/phase.js +55 -0
  39. package/sync/phases/cleanup.js +220 -0
  40. package/sync/phases/code-scanning.js +187 -0
  41. package/sync/phases/environments.js +106 -0
  42. package/sync/phases/index.js +39 -0
  43. package/sync/phases/resource.js +149 -0
  44. package/sync/phases/rulesets.js +186 -0
  45. package/sync/phases/secrets.js +138 -0
  46. package/sync/phases/security.js +129 -0
  47. package/sync/phases/settings.js +274 -0
  48. package/sync/phases/variables.js +132 -0
  49. package/tsdoc-metadata.json +1 -1
  50. package/errors.js +0 -12
  51. package/lib/crypto.js +0 -27
  52. package/services/GitHubClient.js +0 -875
  53. package/services/SyncEngine.js +0 -580
package/index.d.ts CHANGED
@@ -1,898 +1,341 @@
1
- import { AppDirs, ConfigError, ConfigError as XdgConfigError, ConfigFile } from "xdg-effect";
2
- import { Context, Effect, Layer, Option, Ref, Schema } from "effect";
3
-
4
- //#region src/errors.d.ts
5
- declare const ResolveError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
6
- readonly _tag: "ResolveError";
7
- } & Readonly<A>;
8
- declare class ResolveError extends ResolveError_base<{
9
- readonly message: string;
10
- }> {}
11
- declare const OnePasswordError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
12
- readonly _tag: "OnePasswordError";
13
- } & Readonly<A>;
14
- declare class OnePasswordError extends OnePasswordError_base<{
15
- readonly message: string;
16
- }> {}
17
- declare const GitHubApiError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
18
- readonly _tag: "GitHubApiError";
19
- } & Readonly<A>;
20
- declare class GitHubApiError extends GitHubApiError_base<{
21
- readonly message: string;
22
- readonly status?: number;
23
- }> {}
24
- declare const SyncError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
25
- readonly _tag: "SyncError";
26
- } & Readonly<A>;
27
- declare class SyncError extends SyncError_base<{
28
- readonly message: string;
29
- }> {}
30
- //#endregion
31
- //#region src/lib/crypto.d.ts
1
+ import { FileSystem, Layer, Path, Schema } from "effect";
2
+ import { AppDirs, Xdg } from "@effected/xdg";
3
+ //#region src/schemas/config.d.ts
32
4
  /**
33
- * Encrypt a secret using libsodium's sealed box algorithm.
34
- * Implementation based on tweetsodium using tweetnacl + blakejs.
5
+ * The whole `reposets.config.toml` document.
35
6
  *
36
- * The sealed box format is: ephemeral_public_key (32 bytes) || ciphertext
7
+ * @remarks
8
+ * `groups` is the only required key. Every resource map defaults to empty, so a
9
+ * config that declares repositories and nothing else is valid and does nothing —
10
+ * which is the right behaviour for a tool that mutates GitHub.
11
+ *
12
+ * @public
37
13
  */
38
- declare function encryptSecret(publicKey: string, secretValue: string): string;
39
- //#endregion
40
- //#region src/schemas/common.d.ts
41
- declare const SecretGroupSchema: Schema.Union<[Schema.Struct<{
42
- file: Schema.Record$<typeof Schema.String, typeof Schema.String>;
43
- }>, Schema.Struct<{
44
- value: Schema.Record$<typeof Schema.String, Schema.Union<[typeof Schema.String, Schema.Record$<typeof Schema.String, Schema.SchemaClass<unknown, unknown, never>>]>>;
45
- }>, Schema.Struct<{
46
- resolved: Schema.Record$<typeof Schema.String, typeof Schema.String>;
47
- }>]>;
48
- type SecretGroup = typeof SecretGroupSchema.Type;
49
- declare const VariableGroupSchema: Schema.Union<[Schema.Struct<{
50
- file: Schema.Record$<typeof Schema.String, typeof Schema.String>;
51
- }>, Schema.Struct<{
52
- value: Schema.Record$<typeof Schema.String, Schema.Union<[typeof Schema.String, Schema.Record$<typeof Schema.String, Schema.SchemaClass<unknown, unknown, never>>]>>;
53
- }>, Schema.Struct<{
54
- resolved: Schema.Record$<typeof Schema.String, typeof Schema.String>;
55
- }>]>;
56
- type VariableGroup = typeof VariableGroupSchema.Type;
57
- declare const CleanupScopeSchema: Schema.Union<[typeof Schema.Boolean, Schema.Struct<{
58
- preserve: Schema.Array$<typeof Schema.String>;
59
- }>]>;
60
- type CleanupScope = typeof CleanupScopeSchema.Type;
61
- declare const CleanupSchema: Schema.Struct<{
62
- secrets: Schema.optionalWith<Schema.Struct<{
63
- actions: Schema.optionalWith<Schema.Union<[typeof Schema.Boolean, Schema.Struct<{
64
- preserve: Schema.Array$<typeof Schema.String>;
65
- }>]>, {
66
- default: () => CleanupScope;
67
- }>;
68
- dependabot: Schema.optionalWith<Schema.Union<[typeof Schema.Boolean, Schema.Struct<{
69
- preserve: Schema.Array$<typeof Schema.String>;
70
- }>]>, {
71
- default: () => CleanupScope;
72
- }>;
73
- codespaces: Schema.optionalWith<Schema.Union<[typeof Schema.Boolean, Schema.Struct<{
74
- preserve: Schema.Array$<typeof Schema.String>;
75
- }>]>, {
76
- default: () => CleanupScope;
77
- }>;
78
- environments: Schema.optionalWith<Schema.Union<[typeof Schema.Boolean, Schema.Struct<{
79
- preserve: Schema.Array$<typeof Schema.String>;
80
- }>]>, {
81
- default: () => CleanupScope;
82
- }>;
83
- }>, {
84
- default: () => {
85
- actions: CleanupScope;
86
- dependabot: CleanupScope;
87
- codespaces: CleanupScope;
88
- environments: CleanupScope;
89
- };
90
- }>;
91
- variables: Schema.optionalWith<Schema.Struct<{
92
- actions: Schema.optionalWith<Schema.Union<[typeof Schema.Boolean, Schema.Struct<{
93
- preserve: Schema.Array$<typeof Schema.String>;
94
- }>]>, {
95
- default: () => CleanupScope;
96
- }>;
97
- environments: Schema.optionalWith<Schema.Union<[typeof Schema.Boolean, Schema.Struct<{
98
- preserve: Schema.Array$<typeof Schema.String>;
99
- }>]>, {
100
- default: () => CleanupScope;
101
- }>;
102
- }>, {
103
- default: () => {
104
- actions: CleanupScope;
105
- environments: CleanupScope;
106
- };
107
- }>;
108
- rulesets: Schema.optionalWith<Schema.Union<[typeof Schema.Boolean, Schema.Struct<{
109
- preserve: Schema.Array$<typeof Schema.String>;
110
- }>]>, {
111
- default: () => CleanupScope;
112
- }>;
113
- environments: Schema.optionalWith<Schema.Union<[typeof Schema.Boolean, Schema.Struct<{
114
- preserve: Schema.Array$<typeof Schema.String>;
115
- }>]>, {
116
- default: () => CleanupScope;
117
- }>;
118
- }>;
119
- type Cleanup = typeof CleanupSchema.Type;
120
- //#endregion
121
- //#region src/schemas/config.d.ts
122
- declare const GroupSchema: Schema.Struct<{
123
- owner: Schema.optional<Schema.SchemaClass<string, string, never>>;
124
- repos: Schema.Array$<typeof Schema.String>;
125
- credentials: Schema.optional<Schema.SchemaClass<string, string, never>>;
126
- settings: Schema.optional<Schema.Array$<typeof Schema.String>>;
127
- environments: Schema.optional<Schema.Array$<typeof Schema.String>>;
128
- secrets: Schema.optional<Schema.Struct<{
129
- actions: Schema.optional<Schema.Array$<typeof Schema.String>>;
130
- dependabot: Schema.optional<Schema.Array$<typeof Schema.String>>;
131
- codespaces: Schema.optional<Schema.Array$<typeof Schema.String>>;
132
- environments: Schema.optional<Schema.Record$<typeof Schema.String, Schema.Array$<typeof Schema.String>>>;
133
- }>>;
134
- variables: Schema.optional<Schema.Struct<{
135
- actions: Schema.optional<Schema.Array$<typeof Schema.String>>;
136
- environments: Schema.optional<Schema.Record$<typeof Schema.String, Schema.Array$<typeof Schema.String>>>;
137
- }>>;
138
- rulesets: Schema.optional<Schema.Array$<typeof Schema.String>>;
139
- security: Schema.optional<Schema.Array$<typeof Schema.String>>;
140
- code_scanning: Schema.optional<Schema.Array$<typeof Schema.String>>;
141
- cleanup: Schema.optional<Schema.Struct<{
142
- secrets: Schema.optionalWith<Schema.Struct<{
143
- actions: Schema.optionalWith<Schema.Union<[typeof Schema.Boolean, Schema.Struct<{
144
- preserve: Schema.Array$<typeof Schema.String>;
145
- }>]>, {
146
- default: () => CleanupScope;
147
- }>;
148
- dependabot: Schema.optionalWith<Schema.Union<[typeof Schema.Boolean, Schema.Struct<{
149
- preserve: Schema.Array$<typeof Schema.String>;
150
- }>]>, {
151
- default: () => CleanupScope;
152
- }>;
153
- codespaces: Schema.optionalWith<Schema.Union<[typeof Schema.Boolean, Schema.Struct<{
154
- preserve: Schema.Array$<typeof Schema.String>;
155
- }>]>, {
156
- default: () => CleanupScope;
157
- }>;
158
- environments: Schema.optionalWith<Schema.Union<[typeof Schema.Boolean, Schema.Struct<{
159
- preserve: Schema.Array$<typeof Schema.String>;
160
- }>]>, {
161
- default: () => CleanupScope;
162
- }>;
163
- }>, {
164
- default: () => {
165
- actions: CleanupScope;
166
- dependabot: CleanupScope;
167
- codespaces: CleanupScope;
168
- environments: CleanupScope;
169
- };
170
- }>;
171
- variables: Schema.optionalWith<Schema.Struct<{
172
- actions: Schema.optionalWith<Schema.Union<[typeof Schema.Boolean, Schema.Struct<{
173
- preserve: Schema.Array$<typeof Schema.String>;
174
- }>]>, {
175
- default: () => CleanupScope;
176
- }>;
177
- environments: Schema.optionalWith<Schema.Union<[typeof Schema.Boolean, Schema.Struct<{
178
- preserve: Schema.Array$<typeof Schema.String>;
179
- }>]>, {
180
- default: () => CleanupScope;
181
- }>;
182
- }>, {
183
- default: () => {
184
- actions: CleanupScope;
185
- environments: CleanupScope;
186
- };
187
- }>;
188
- rulesets: Schema.optionalWith<Schema.Union<[typeof Schema.Boolean, Schema.Struct<{
189
- preserve: Schema.Array$<typeof Schema.String>;
190
- }>]>, {
191
- default: () => CleanupScope;
192
- }>;
193
- environments: Schema.optionalWith<Schema.Union<[typeof Schema.Boolean, Schema.Struct<{
194
- preserve: Schema.Array$<typeof Schema.String>;
195
- }>]>, {
196
- default: () => CleanupScope;
197
- }>;
198
- }>>;
199
- }>;
200
- type Group = typeof GroupSchema.Type;
201
- declare const CodeScanningGroupSchema: Schema.refine<{
202
- readonly state?: "configured" | "not-configured" | undefined;
203
- readonly languages?: readonly ("actions" | "c-cpp" | "csharp" | "go" | "java-kotlin" | "javascript-typescript" | "python" | "ruby" | "swift")[] | undefined;
204
- readonly query_suite?: "default" | "extended" | undefined;
205
- readonly threat_model?: "remote" | "remote_and_local" | undefined;
206
- readonly runner_type?: "standard" | "labeled" | undefined;
207
- readonly runner_label?: string | undefined;
208
- }, Schema.Struct<{
209
- state: Schema.optional<Schema.Literal<["configured", "not-configured"]>>;
210
- languages: Schema.optional<Schema.Array$<Schema.Literal<["actions", "c-cpp", "csharp", "go", "java-kotlin", "javascript-typescript", "python", "ruby", "swift"]>>>;
211
- query_suite: Schema.optional<Schema.Literal<["default", "extended"]>>;
212
- threat_model: Schema.optional<Schema.Literal<["remote", "remote_and_local"]>>;
213
- runner_type: Schema.optional<Schema.Literal<["standard", "labeled"]>>;
214
- runner_label: Schema.optional<Schema.SchemaClass<string, string, never>>;
215
- }>>;
216
- type CodeScanningGroup = typeof CodeScanningGroupSchema.Type;
217
- declare const LogLevelSchema: Schema.Literal<["silent", "info", "verbose", "debug"]>;
218
- type LogLevel = typeof LogLevelSchema.Type;
219
14
  declare const ConfigSchema: Schema.Struct<{
220
- owner: Schema.optional<Schema.SchemaClass<string, string, never>>;
221
- log_level: Schema.optionalWith<Schema.Literal<["silent", "info", "verbose", "debug"]>, {
222
- default: () => "info";
223
- }>;
224
- settings: Schema.optionalWith<Schema.Record$<typeof Schema.String, Schema.TypeLiteral<{
225
- is_template: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
226
- has_wiki: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
227
- has_issues: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
228
- has_projects: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
229
- has_discussions: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
230
- has_sponsorships: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
231
- has_pull_requests: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
232
- allow_forking: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
233
- allow_merge_commit: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
234
- allow_squash_merge: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
235
- allow_rebase_merge: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
236
- allow_auto_merge: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
237
- allow_update_branch: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
238
- squash_merge_commit_title: Schema.optional<Schema.Literal<["PR_TITLE", "COMMIT_OR_PR_TITLE"]>>;
239
- squash_merge_commit_message: Schema.optional<Schema.Literal<["PR_BODY", "COMMIT_MESSAGES", "BLANK"]>>;
240
- merge_commit_title: Schema.optional<Schema.Literal<["PR_TITLE", "MERGE_MESSAGE"]>>;
241
- merge_commit_message: Schema.optional<Schema.Literal<["PR_BODY", "PR_TITLE", "BLANK"]>>;
242
- delete_branch_on_merge: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
243
- web_commit_signoff_required: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
244
- security_and_analysis: Schema.optional<Schema.Struct<{
245
- advanced_security: Schema.optional<Schema.Literal<["enabled", "disabled"]>>;
246
- code_security: Schema.optional<Schema.Literal<["enabled", "disabled"]>>;
247
- secret_scanning: Schema.optional<Schema.Literal<["enabled", "disabled"]>>;
248
- secret_scanning_push_protection: Schema.optional<Schema.Literal<["enabled", "disabled"]>>;
249
- secret_scanning_ai_detection: Schema.optional<Schema.Literal<["enabled", "disabled"]>>;
250
- secret_scanning_non_provider_patterns: Schema.optional<Schema.Literal<["enabled", "disabled"]>>;
251
- secret_scanning_delegated_alert_dismissal: Schema.optional<Schema.Literal<["enabled", "disabled"]>>;
252
- secret_scanning_delegated_bypass: Schema.optional<Schema.Literal<["enabled", "disabled"]>>;
253
- delegated_bypass_reviewers: Schema.optional<Schema.Array$<Schema.Union<[Schema.Struct<{
254
- team: Schema.SchemaClass<string, string, never>;
255
- mode: Schema.optional<Schema.Literal<["ALWAYS", "EXEMPT"]>>;
15
+ readonly settings: Schema.withDecodingDefaultKey<Schema.$Record<Schema.String, Schema.StructWithRest<Schema.Struct<{
16
+ readonly is_template: Schema.optional<Schema.Boolean>;
17
+ readonly has_wiki: Schema.optional<Schema.Boolean>;
18
+ readonly has_issues: Schema.optional<Schema.Boolean>;
19
+ readonly has_projects: Schema.optional<Schema.Boolean>;
20
+ readonly has_discussions: Schema.optional<Schema.Boolean>;
21
+ readonly has_sponsorships: Schema.optional<Schema.Boolean>;
22
+ readonly has_pull_requests: Schema.optional<Schema.Boolean>;
23
+ readonly allow_forking: Schema.optional<Schema.Boolean>;
24
+ readonly allow_merge_commit: Schema.optional<Schema.Boolean>;
25
+ readonly allow_squash_merge: Schema.optional<Schema.Boolean>;
26
+ readonly allow_rebase_merge: Schema.optional<Schema.Boolean>;
27
+ readonly allow_auto_merge: Schema.optional<Schema.Boolean>;
28
+ readonly allow_update_branch: Schema.optional<Schema.Boolean>;
29
+ readonly squash_merge_commit_title: Schema.optional<Schema.Literals<readonly ["PR_TITLE", "COMMIT_OR_PR_TITLE"]>>;
30
+ readonly squash_merge_commit_message: Schema.optional<Schema.Literals<readonly ["PR_BODY", "COMMIT_MESSAGES", "BLANK"]>>;
31
+ readonly merge_commit_title: Schema.optional<Schema.Literals<readonly ["PR_TITLE", "MERGE_MESSAGE"]>>;
32
+ readonly merge_commit_message: Schema.optional<Schema.Literals<readonly ["PR_BODY", "PR_TITLE", "BLANK"]>>;
33
+ readonly delete_branch_on_merge: Schema.optional<Schema.Boolean>;
34
+ readonly web_commit_signoff_required: Schema.optional<Schema.Boolean>;
35
+ readonly security_and_analysis: Schema.optional<Schema.Struct<{
36
+ readonly advanced_security: Schema.optional<Schema.Literals<readonly ["enabled", "disabled"]>>;
37
+ readonly code_security: Schema.optional<Schema.Literals<readonly ["enabled", "disabled"]>>;
38
+ readonly secret_scanning: Schema.optional<Schema.Literals<readonly ["enabled", "disabled"]>>;
39
+ readonly secret_scanning_push_protection: Schema.optional<Schema.Literals<readonly ["enabled", "disabled"]>>;
40
+ readonly secret_scanning_ai_detection: Schema.optional<Schema.Literals<readonly ["enabled", "disabled"]>>;
41
+ readonly secret_scanning_non_provider_patterns: Schema.optional<Schema.Literals<readonly ["enabled", "disabled"]>>;
42
+ readonly secret_scanning_delegated_alert_dismissal: Schema.optional<Schema.Literals<readonly ["enabled", "disabled"]>>;
43
+ readonly secret_scanning_delegated_bypass: Schema.optional<Schema.Literals<readonly ["enabled", "disabled"]>>;
44
+ readonly delegated_bypass_reviewers: Schema.optional<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
45
+ readonly team: Schema.String;
46
+ readonly mode: Schema.optional<Schema.Literals<readonly ["ALWAYS", "EXEMPT"]>>;
256
47
  }>, Schema.Struct<{
257
- role: Schema.SchemaClass<string, string, never>;
258
- mode: Schema.optional<Schema.Literal<["ALWAYS", "EXEMPT"]>>;
48
+ readonly role: Schema.String;
49
+ readonly mode: Schema.optional<Schema.Literals<readonly ["ALWAYS", "EXEMPT"]>>;
259
50
  }>]>>>;
260
- dependabot_security_updates: Schema.optional<Schema.Literal<["enabled", "disabled"]>>;
51
+ readonly dependabot_security_updates: Schema.optional<Schema.Literals<readonly ["enabled", "disabled"]>>;
261
52
  }>>;
262
- }, readonly [{
263
- readonly key: typeof Schema.String;
264
- readonly value: Schema.SchemaClass<unknown, unknown, never>;
265
- }]>>, {
266
- default: () => {};
267
- }>;
268
- secrets: Schema.optionalWith<Schema.Record$<typeof Schema.String, Schema.Union<[Schema.Struct<{
269
- file: Schema.Record$<typeof Schema.String, typeof Schema.String>;
53
+ }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>, never>;
54
+ readonly secrets: Schema.withDecodingDefaultKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
55
+ readonly file: Schema.$Record<Schema.String, Schema.String>;
270
56
  }>, Schema.Struct<{
271
- value: Schema.Record$<typeof Schema.String, Schema.Union<[typeof Schema.String, Schema.Record$<typeof Schema.String, Schema.SchemaClass<unknown, unknown, never>>]>>;
57
+ readonly value: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>;
272
58
  }>, Schema.Struct<{
273
- resolved: Schema.Record$<typeof Schema.String, typeof Schema.String>;
274
- }>]>>, {
275
- default: () => {};
276
- }>;
277
- variables: Schema.optionalWith<Schema.Record$<typeof Schema.String, Schema.Union<[Schema.Struct<{
278
- file: Schema.Record$<typeof Schema.String, typeof Schema.String>;
59
+ readonly resolved: Schema.$Record<Schema.String, Schema.String>;
60
+ }>]>>, never>;
61
+ readonly variables: Schema.withDecodingDefaultKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
62
+ readonly file: Schema.$Record<Schema.String, Schema.String>;
279
63
  }>, Schema.Struct<{
280
- value: Schema.Record$<typeof Schema.String, Schema.Union<[typeof Schema.String, Schema.Record$<typeof Schema.String, Schema.SchemaClass<unknown, unknown, never>>]>>;
64
+ readonly value: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>;
281
65
  }>, Schema.Struct<{
282
- resolved: Schema.Record$<typeof Schema.String, typeof Schema.String>;
283
- }>]>>, {
284
- default: () => {};
285
- }>;
286
- rulesets: Schema.optionalWith<Schema.Record$<typeof Schema.String, Schema.Union<[Schema.Struct<{
287
- type: Schema.Literal<["branch"]>;
288
- pull_requests: Schema.optional<Schema.Struct<{
289
- approvals: Schema.optionalWith<Schema.refine<number, typeof Schema.Int>, {
290
- default: () => number;
291
- }>;
292
- dismiss_stale_reviews: Schema.optionalWith<Schema.SchemaClass<boolean, boolean, never>, {
293
- default: () => boolean;
294
- }>;
295
- code_owner_review: Schema.optionalWith<Schema.SchemaClass<boolean, boolean, never>, {
296
- default: () => boolean;
297
- }>;
298
- last_push_approval: Schema.optionalWith<Schema.SchemaClass<boolean, boolean, never>, {
299
- default: () => boolean;
300
- }>;
301
- resolve_threads: Schema.optionalWith<Schema.SchemaClass<boolean, boolean, never>, {
302
- default: () => boolean;
303
- }>;
304
- merge_methods: Schema.optional<Schema.Array$<Schema.Literal<["merge", "squash", "rebase"]>>>;
305
- reviewers: Schema.optional<Schema.Array$<Schema.Struct<{
306
- file_patterns: Schema.Array$<typeof Schema.String>;
307
- minimum_approvals: Schema.refine<number, typeof Schema.Number>;
308
- reviewer: Schema.Struct<{
309
- id: Schema.refine<number, typeof Schema.Number>;
310
- type: Schema.Literal<["Team"]>;
311
- }>;
312
- }>>>;
313
- }>>;
314
- merge_queue: Schema.optional<Schema.Struct<{
315
- check_timeout: Schema.refine<number, typeof Schema.Int>;
316
- grouping: Schema.Literal<["ALLGREEN", "HEADGREEN"]>;
317
- max_build: Schema.refine<number, typeof Schema.Int>;
318
- max_merge: Schema.refine<number, typeof Schema.Int>;
319
- merge_method: Schema.Literal<["MERGE", "SQUASH", "REBASE"]>;
320
- min_merge: Schema.refine<number, typeof Schema.Int>;
321
- min_wait: Schema.refine<number, typeof Schema.Int>;
322
- }>>;
323
- copilot_review: Schema.optional<Schema.Struct<{
324
- draft_prs: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
325
- on_push: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
326
- }>>;
327
- code_scanning: Schema.optional<Schema.Array$<Schema.Struct<{
328
- tool: Schema.SchemaClass<string, string, never>;
329
- alerts: Schema.Literal<["none", "errors", "errors_and_warnings", "all"]>;
330
- security_alerts: Schema.Literal<["none", "critical", "high_or_higher", "medium_or_higher", "all"]>;
331
- }>>>;
332
- workflows: Schema.optional<Schema.Struct<{
333
- on_creation: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
334
- required: Schema.Array$<Schema.Struct<{
335
- path: Schema.SchemaClass<string, string, never>;
336
- ref: Schema.optional<Schema.SchemaClass<string, string, never>>;
337
- repository_id: Schema.Union<[typeof Schema.Int, Schema.Struct<{
338
- resolved: Schema.SchemaClass<string, string, never>;
339
- }>]>;
340
- sha: Schema.optional<Schema.SchemaClass<string, string, never>>;
66
+ readonly resolved: Schema.$Record<Schema.String, Schema.String>;
67
+ }>]>>, never>;
68
+ readonly rulesets: Schema.withDecodingDefaultKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
69
+ readonly name: Schema.String;
70
+ readonly enforcement: Schema.Literals<readonly ["disabled", "active", "evaluate"]>;
71
+ readonly conditions: Schema.optional<Schema.Struct<{
72
+ readonly ref_name: Schema.optional<Schema.Struct<{
73
+ readonly include: Schema.withDecodingDefaultKey<Schema.$Array<Schema.String>, never>;
74
+ readonly exclude: Schema.withDecodingDefaultKey<Schema.$Array<Schema.String>, never>;
341
75
  }>>;
342
76
  }>>;
343
- branch_name: Schema.optional<Schema.Array$<Schema.Struct<{
344
- operator: Schema.Literal<["starts_with", "ends_with", "contains", "regex"]>;
345
- pattern: Schema.SchemaClass<string, string, never>;
346
- name: Schema.optional<Schema.SchemaClass<string, string, never>>;
347
- negate: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
348
- }>>>;
349
- name: Schema.SchemaClass<string, string, never>;
350
- enforcement: Schema.Literal<["disabled", "active", "evaluate"]>;
351
- conditions: Schema.optional<Schema.Struct<{
352
- ref_name: Schema.optional<Schema.Struct<{
353
- include: Schema.optionalWith<Schema.Array$<typeof Schema.String>, {
354
- default: () => never[];
355
- }>;
356
- exclude: Schema.optionalWith<Schema.Array$<typeof Schema.String>, {
357
- default: () => never[];
358
- }>;
359
- }>>;
360
- }>>;
361
- bypass_actors: Schema.optional<Schema.Array$<Schema.Struct<{
362
- actor_id: Schema.optional<Schema.Union<[typeof Schema.Int, Schema.Struct<{
363
- resolved: Schema.SchemaClass<string, string, never>;
77
+ readonly bypass_actors: Schema.optional<Schema.$Array<Schema.Struct<{
78
+ readonly actor_id: Schema.optional<Schema.Union<readonly [Schema.Int, Schema.Struct<{
79
+ readonly resolved: Schema.String;
364
80
  }>]>>;
365
- actor_type: Schema.Literal<["Integration", "OrganizationAdmin", "RepositoryRole", "Team", "DeployKey"]>;
366
- bypass_mode: Schema.optionalWith<Schema.Literal<["always", "pull_request", "exempt"]>, {
367
- default: () => "always";
368
- }>;
81
+ readonly actor_type: Schema.Literals<readonly ["Integration", "OrganizationAdmin", "RepositoryRole", "Team", "DeployKey"]>;
82
+ readonly bypass_mode: Schema.withDecodingDefaultKey<Schema.Literals<readonly ["always", "pull_request", "exempt"]>, never>;
369
83
  }>>>;
370
- creation: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
371
- update: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
372
- deletion: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
373
- required_linear_history: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
374
- required_signatures: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
375
- non_fast_forward: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
376
- deployments: Schema.optional<Schema.Array$<typeof Schema.String>>;
377
- targets: Schema.optional<Schema.Union<[Schema.Literal<["default", "all"]>, Schema.Array$<Schema.Union<[Schema.Struct<{
378
- include: Schema.SchemaClass<string, string, never>;
84
+ readonly creation: Schema.optional<Schema.Boolean>;
85
+ readonly update: Schema.optional<Schema.Boolean>;
86
+ readonly deletion: Schema.optional<Schema.Boolean>;
87
+ readonly required_linear_history: Schema.optional<Schema.Boolean>;
88
+ readonly required_signatures: Schema.optional<Schema.Boolean>;
89
+ readonly non_fast_forward: Schema.optional<Schema.Boolean>;
90
+ readonly deployments: Schema.optional<Schema.$Array<Schema.String>>;
91
+ readonly targets: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly ["default", "all"]>, Schema.$Array<Schema.Union<readonly [Schema.Struct<{
92
+ readonly include: Schema.String;
379
93
  }>, Schema.Struct<{
380
- exclude: Schema.SchemaClass<string, string, never>;
94
+ readonly exclude: Schema.String;
381
95
  }>]>>]>>;
382
- status_checks: Schema.optional<Schema.Struct<{
383
- update_branch: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
384
- on_creation: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
385
- default_integration_id: Schema.optional<Schema.Union<[typeof Schema.Int, Schema.Struct<{
386
- resolved: Schema.SchemaClass<string, string, never>;
96
+ readonly status_checks: Schema.optional<Schema.Struct<{
97
+ readonly update_branch: Schema.optional<Schema.Boolean>;
98
+ readonly on_creation: Schema.optional<Schema.Boolean>;
99
+ readonly default_integration_id: Schema.optional<Schema.Union<readonly [Schema.Int, Schema.Struct<{
100
+ readonly resolved: Schema.String;
387
101
  }>]>>;
388
- required: Schema.Array$<Schema.Struct<{
389
- context: Schema.SchemaClass<string, string, never>;
390
- integration_id: Schema.optional<Schema.Union<[typeof Schema.Int, Schema.Struct<{
391
- resolved: Schema.SchemaClass<string, string, never>;
102
+ readonly required: Schema.$Array<Schema.Struct<{
103
+ readonly context: Schema.String;
104
+ readonly integration_id: Schema.optional<Schema.Union<readonly [Schema.Int, Schema.Struct<{
105
+ readonly resolved: Schema.String;
392
106
  }>]>>;
393
107
  }>>;
394
108
  }>>;
395
- commit_message: Schema.optional<Schema.Array$<Schema.Struct<{
396
- operator: Schema.Literal<["starts_with", "ends_with", "contains", "regex"]>;
397
- pattern: Schema.SchemaClass<string, string, never>;
398
- name: Schema.optional<Schema.SchemaClass<string, string, never>>;
399
- negate: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
400
- }>>>;
401
- commit_author_email: Schema.optional<Schema.Array$<Schema.Struct<{
402
- operator: Schema.Literal<["starts_with", "ends_with", "contains", "regex"]>;
403
- pattern: Schema.SchemaClass<string, string, never>;
404
- name: Schema.optional<Schema.SchemaClass<string, string, never>>;
405
- negate: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
109
+ readonly commit_message: Schema.optional<Schema.$Array<Schema.Struct<{
110
+ readonly operator: Schema.Literals<readonly ["starts_with", "ends_with", "contains", "regex"]>;
111
+ readonly pattern: Schema.String;
112
+ readonly name: Schema.optional<Schema.String>;
113
+ readonly negate: Schema.optional<Schema.Boolean>;
406
114
  }>>>;
407
- committer_email: Schema.optional<Schema.Array$<Schema.Struct<{
408
- operator: Schema.Literal<["starts_with", "ends_with", "contains", "regex"]>;
409
- pattern: Schema.SchemaClass<string, string, never>;
410
- name: Schema.optional<Schema.SchemaClass<string, string, never>>;
411
- negate: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
115
+ readonly commit_author_email: Schema.optional<Schema.$Array<Schema.Struct<{
116
+ readonly operator: Schema.Literals<readonly ["starts_with", "ends_with", "contains", "regex"]>;
117
+ readonly pattern: Schema.String;
118
+ readonly name: Schema.optional<Schema.String>;
119
+ readonly negate: Schema.optional<Schema.Boolean>;
412
120
  }>>>;
413
- }>, Schema.Struct<{
414
- type: Schema.Literal<["tag"]>;
415
- tag_name: Schema.optional<Schema.Array$<Schema.Struct<{
416
- operator: Schema.Literal<["starts_with", "ends_with", "contains", "regex"]>;
417
- pattern: Schema.SchemaClass<string, string, never>;
418
- name: Schema.optional<Schema.SchemaClass<string, string, never>>;
419
- negate: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
121
+ readonly committer_email: Schema.optional<Schema.$Array<Schema.Struct<{
122
+ readonly operator: Schema.Literals<readonly ["starts_with", "ends_with", "contains", "regex"]>;
123
+ readonly pattern: Schema.String;
124
+ readonly name: Schema.optional<Schema.String>;
125
+ readonly negate: Schema.optional<Schema.Boolean>;
420
126
  }>>>;
421
- name: Schema.SchemaClass<string, string, never>;
422
- enforcement: Schema.Literal<["disabled", "active", "evaluate"]>;
423
- conditions: Schema.optional<Schema.Struct<{
424
- ref_name: Schema.optional<Schema.Struct<{
425
- include: Schema.optionalWith<Schema.Array$<typeof Schema.String>, {
426
- default: () => never[];
427
- }>;
428
- exclude: Schema.optionalWith<Schema.Array$<typeof Schema.String>, {
429
- default: () => never[];
127
+ readonly type: Schema.Literal<"branch">;
128
+ readonly pull_requests: Schema.optional<Schema.Struct<{
129
+ readonly approvals: Schema.withDecodingDefaultKey<Schema.Int, never>;
130
+ readonly dismiss_stale_reviews: Schema.withDecodingDefaultKey<Schema.Boolean, never>;
131
+ readonly code_owner_review: Schema.withDecodingDefaultKey<Schema.Boolean, never>;
132
+ readonly last_push_approval: Schema.withDecodingDefaultKey<Schema.Boolean, never>;
133
+ readonly resolve_threads: Schema.withDecodingDefaultKey<Schema.Boolean, never>;
134
+ readonly merge_methods: Schema.optional<Schema.$Array<Schema.Literals<readonly ["merge", "squash", "rebase"]>>>;
135
+ readonly reviewers: Schema.optional<Schema.$Array<Schema.Struct<{
136
+ readonly file_patterns: Schema.$Array<Schema.String>;
137
+ readonly minimum_approvals: Schema.Int;
138
+ readonly reviewer: Schema.Struct<{
139
+ readonly id: Schema.Int;
140
+ readonly type: Schema.Literal<"Team">;
430
141
  }>;
142
+ }>>>;
143
+ }>>;
144
+ readonly merge_queue: Schema.optional<Schema.Struct<{
145
+ readonly check_timeout: Schema.Int;
146
+ readonly grouping: Schema.Literals<readonly ["ALLGREEN", "HEADGREEN"]>;
147
+ readonly max_build: Schema.Int;
148
+ readonly max_merge: Schema.Int;
149
+ readonly merge_method: Schema.Literals<readonly ["MERGE", "SQUASH", "REBASE"]>;
150
+ readonly min_merge: Schema.Int;
151
+ readonly min_wait: Schema.Int;
152
+ }>>;
153
+ readonly copilot_review: Schema.optional<Schema.Struct<{
154
+ readonly draft_prs: Schema.optional<Schema.Boolean>;
155
+ readonly on_push: Schema.optional<Schema.Boolean>;
156
+ }>>;
157
+ readonly code_scanning: Schema.optional<Schema.$Array<Schema.Struct<{
158
+ readonly tool: Schema.String;
159
+ readonly alerts: Schema.Literals<readonly ["none", "errors", "errors_and_warnings", "all"]>;
160
+ readonly security_alerts: Schema.Literals<readonly ["none", "critical", "high_or_higher", "medium_or_higher", "all"]>;
161
+ }>>>;
162
+ readonly workflows: Schema.optional<Schema.Struct<{
163
+ readonly on_creation: Schema.optional<Schema.Boolean>;
164
+ readonly required: Schema.$Array<Schema.Struct<{
165
+ readonly path: Schema.String;
166
+ readonly ref: Schema.optional<Schema.String>;
167
+ readonly repository_id: Schema.Union<readonly [Schema.Int, Schema.Struct<{
168
+ readonly resolved: Schema.String;
169
+ }>]>;
170
+ readonly sha: Schema.optional<Schema.String>;
431
171
  }>>;
432
172
  }>>;
433
- bypass_actors: Schema.optional<Schema.Array$<Schema.Struct<{
434
- actor_id: Schema.optional<Schema.Union<[typeof Schema.Int, Schema.Struct<{
435
- resolved: Schema.SchemaClass<string, string, never>;
173
+ readonly branch_name: Schema.optional<Schema.$Array<Schema.Struct<{
174
+ readonly operator: Schema.Literals<readonly ["starts_with", "ends_with", "contains", "regex"]>;
175
+ readonly pattern: Schema.String;
176
+ readonly name: Schema.optional<Schema.String>;
177
+ readonly negate: Schema.optional<Schema.Boolean>;
178
+ }>>>;
179
+ }>, Schema.Struct<{
180
+ readonly name: Schema.String;
181
+ readonly enforcement: Schema.Literals<readonly ["disabled", "active", "evaluate"]>;
182
+ readonly conditions: Schema.optional<Schema.Struct<{
183
+ readonly ref_name: Schema.optional<Schema.Struct<{
184
+ readonly include: Schema.withDecodingDefaultKey<Schema.$Array<Schema.String>, never>;
185
+ readonly exclude: Schema.withDecodingDefaultKey<Schema.$Array<Schema.String>, never>;
186
+ }>>;
187
+ }>>;
188
+ readonly bypass_actors: Schema.optional<Schema.$Array<Schema.Struct<{
189
+ readonly actor_id: Schema.optional<Schema.Union<readonly [Schema.Int, Schema.Struct<{
190
+ readonly resolved: Schema.String;
436
191
  }>]>>;
437
- actor_type: Schema.Literal<["Integration", "OrganizationAdmin", "RepositoryRole", "Team", "DeployKey"]>;
438
- bypass_mode: Schema.optionalWith<Schema.Literal<["always", "pull_request", "exempt"]>, {
439
- default: () => "always";
440
- }>;
192
+ readonly actor_type: Schema.Literals<readonly ["Integration", "OrganizationAdmin", "RepositoryRole", "Team", "DeployKey"]>;
193
+ readonly bypass_mode: Schema.withDecodingDefaultKey<Schema.Literals<readonly ["always", "pull_request", "exempt"]>, never>;
441
194
  }>>>;
442
- creation: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
443
- update: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
444
- deletion: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
445
- required_linear_history: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
446
- required_signatures: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
447
- non_fast_forward: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
448
- deployments: Schema.optional<Schema.Array$<typeof Schema.String>>;
449
- targets: Schema.optional<Schema.Union<[Schema.Literal<["default", "all"]>, Schema.Array$<Schema.Union<[Schema.Struct<{
450
- include: Schema.SchemaClass<string, string, never>;
195
+ readonly creation: Schema.optional<Schema.Boolean>;
196
+ readonly update: Schema.optional<Schema.Boolean>;
197
+ readonly deletion: Schema.optional<Schema.Boolean>;
198
+ readonly required_linear_history: Schema.optional<Schema.Boolean>;
199
+ readonly required_signatures: Schema.optional<Schema.Boolean>;
200
+ readonly non_fast_forward: Schema.optional<Schema.Boolean>;
201
+ readonly deployments: Schema.optional<Schema.$Array<Schema.String>>;
202
+ readonly targets: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly ["default", "all"]>, Schema.$Array<Schema.Union<readonly [Schema.Struct<{
203
+ readonly include: Schema.String;
451
204
  }>, Schema.Struct<{
452
- exclude: Schema.SchemaClass<string, string, never>;
205
+ readonly exclude: Schema.String;
453
206
  }>]>>]>>;
454
- status_checks: Schema.optional<Schema.Struct<{
455
- update_branch: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
456
- on_creation: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
457
- default_integration_id: Schema.optional<Schema.Union<[typeof Schema.Int, Schema.Struct<{
458
- resolved: Schema.SchemaClass<string, string, never>;
207
+ readonly status_checks: Schema.optional<Schema.Struct<{
208
+ readonly update_branch: Schema.optional<Schema.Boolean>;
209
+ readonly on_creation: Schema.optional<Schema.Boolean>;
210
+ readonly default_integration_id: Schema.optional<Schema.Union<readonly [Schema.Int, Schema.Struct<{
211
+ readonly resolved: Schema.String;
459
212
  }>]>>;
460
- required: Schema.Array$<Schema.Struct<{
461
- context: Schema.SchemaClass<string, string, never>;
462
- integration_id: Schema.optional<Schema.Union<[typeof Schema.Int, Schema.Struct<{
463
- resolved: Schema.SchemaClass<string, string, never>;
213
+ readonly required: Schema.$Array<Schema.Struct<{
214
+ readonly context: Schema.String;
215
+ readonly integration_id: Schema.optional<Schema.Union<readonly [Schema.Int, Schema.Struct<{
216
+ readonly resolved: Schema.String;
464
217
  }>]>>;
465
218
  }>>;
466
219
  }>>;
467
- commit_message: Schema.optional<Schema.Array$<Schema.Struct<{
468
- operator: Schema.Literal<["starts_with", "ends_with", "contains", "regex"]>;
469
- pattern: Schema.SchemaClass<string, string, never>;
470
- name: Schema.optional<Schema.SchemaClass<string, string, never>>;
471
- negate: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
220
+ readonly commit_message: Schema.optional<Schema.$Array<Schema.Struct<{
221
+ readonly operator: Schema.Literals<readonly ["starts_with", "ends_with", "contains", "regex"]>;
222
+ readonly pattern: Schema.String;
223
+ readonly name: Schema.optional<Schema.String>;
224
+ readonly negate: Schema.optional<Schema.Boolean>;
225
+ }>>>;
226
+ readonly commit_author_email: Schema.optional<Schema.$Array<Schema.Struct<{
227
+ readonly operator: Schema.Literals<readonly ["starts_with", "ends_with", "contains", "regex"]>;
228
+ readonly pattern: Schema.String;
229
+ readonly name: Schema.optional<Schema.String>;
230
+ readonly negate: Schema.optional<Schema.Boolean>;
472
231
  }>>>;
473
- commit_author_email: Schema.optional<Schema.Array$<Schema.Struct<{
474
- operator: Schema.Literal<["starts_with", "ends_with", "contains", "regex"]>;
475
- pattern: Schema.SchemaClass<string, string, never>;
476
- name: Schema.optional<Schema.SchemaClass<string, string, never>>;
477
- negate: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
232
+ readonly committer_email: Schema.optional<Schema.$Array<Schema.Struct<{
233
+ readonly operator: Schema.Literals<readonly ["starts_with", "ends_with", "contains", "regex"]>;
234
+ readonly pattern: Schema.String;
235
+ readonly name: Schema.optional<Schema.String>;
236
+ readonly negate: Schema.optional<Schema.Boolean>;
478
237
  }>>>;
479
- committer_email: Schema.optional<Schema.Array$<Schema.Struct<{
480
- operator: Schema.Literal<["starts_with", "ends_with", "contains", "regex"]>;
481
- pattern: Schema.SchemaClass<string, string, never>;
482
- name: Schema.optional<Schema.SchemaClass<string, string, never>>;
483
- negate: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
238
+ readonly type: Schema.Literal<"tag">;
239
+ readonly tag_name: Schema.optional<Schema.$Array<Schema.Struct<{
240
+ readonly operator: Schema.Literals<readonly ["starts_with", "ends_with", "contains", "regex"]>;
241
+ readonly pattern: Schema.String;
242
+ readonly name: Schema.optional<Schema.String>;
243
+ readonly negate: Schema.optional<Schema.Boolean>;
484
244
  }>>>;
485
- }>]>>, {
486
- default: () => {};
487
- }>;
488
- environments: Schema.optionalWith<Schema.Record$<typeof Schema.String, Schema.Struct<{
489
- wait_timer: Schema.optional<Schema.refine<number, typeof Schema.Int>>;
490
- prevent_self_review: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
491
- reviewers: Schema.optional<Schema.Array$<Schema.Struct<{
492
- type: Schema.Literal<["User", "Team"]>;
493
- id: Schema.refine<number, typeof Schema.Number>;
245
+ }>]>>, never>;
246
+ readonly environments: Schema.withDecodingDefaultKey<Schema.$Record<Schema.String, Schema.Struct<{
247
+ readonly wait_timer: Schema.optional<Schema.Int>;
248
+ readonly prevent_self_review: Schema.optional<Schema.Boolean>;
249
+ readonly reviewers: Schema.optional<Schema.$Array<Schema.Struct<{
250
+ readonly type: Schema.Literals<readonly ["User", "Team"]>;
251
+ readonly id: Schema.Int;
494
252
  }>>>;
495
- deployment_branches: Schema.optional<Schema.Union<[Schema.Literal<["all", "protected"]>, Schema.Array$<Schema.Struct<{
496
- name: Schema.SchemaClass<string, string, never>;
497
- type: Schema.optionalWith<Schema.Literal<["branch", "tag"]>, {
498
- default: () => "branch";
499
- }>;
253
+ readonly deployment_branches: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly ["all", "protected"]>, Schema.$Array<Schema.Struct<{
254
+ readonly name: Schema.String;
255
+ readonly type: Schema.withDecodingDefaultKey<Schema.Literals<readonly ["branch", "tag"]>, never>;
500
256
  }>>]>>;
501
- }>>, {
502
- default: () => {};
503
- }>;
504
- security: Schema.optionalWith<Schema.Record$<typeof Schema.String, Schema.refine<{
505
- readonly vulnerability_alerts?: boolean | undefined;
506
- readonly automated_security_fixes?: boolean | undefined;
507
- readonly private_vulnerability_reporting?: boolean | undefined;
508
- }, Schema.Struct<{
509
- vulnerability_alerts: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
510
- automated_security_fixes: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
511
- private_vulnerability_reporting: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
512
- }>>>, {
513
- default: () => {};
514
- }>;
515
- code_scanning: Schema.optionalWith<Schema.Record$<typeof Schema.String, Schema.refine<{
516
- readonly state?: "configured" | "not-configured" | undefined;
517
- readonly languages?: readonly ("actions" | "c-cpp" | "csharp" | "go" | "java-kotlin" | "javascript-typescript" | "python" | "ruby" | "swift")[] | undefined;
518
- readonly query_suite?: "default" | "extended" | undefined;
519
- readonly threat_model?: "remote" | "remote_and_local" | undefined;
520
- readonly runner_type?: "standard" | "labeled" | undefined;
521
- readonly runner_label?: string | undefined;
522
- }, Schema.Struct<{
523
- state: Schema.optional<Schema.Literal<["configured", "not-configured"]>>;
524
- languages: Schema.optional<Schema.Array$<Schema.Literal<["actions", "c-cpp", "csharp", "go", "java-kotlin", "javascript-typescript", "python", "ruby", "swift"]>>>;
525
- query_suite: Schema.optional<Schema.Literal<["default", "extended"]>>;
526
- threat_model: Schema.optional<Schema.Literal<["remote", "remote_and_local"]>>;
527
- runner_type: Schema.optional<Schema.Literal<["standard", "labeled"]>>;
528
- runner_label: Schema.optional<Schema.SchemaClass<string, string, never>>;
529
- }>>>, {
530
- default: () => {};
531
- }>;
532
- groups: Schema.Record$<typeof Schema.String, Schema.Struct<{
533
- owner: Schema.optional<Schema.SchemaClass<string, string, never>>;
534
- repos: Schema.Array$<typeof Schema.String>;
535
- credentials: Schema.optional<Schema.SchemaClass<string, string, never>>;
536
- settings: Schema.optional<Schema.Array$<typeof Schema.String>>;
537
- environments: Schema.optional<Schema.Array$<typeof Schema.String>>;
538
- secrets: Schema.optional<Schema.Struct<{
539
- actions: Schema.optional<Schema.Array$<typeof Schema.String>>;
540
- dependabot: Schema.optional<Schema.Array$<typeof Schema.String>>;
541
- codespaces: Schema.optional<Schema.Array$<typeof Schema.String>>;
542
- environments: Schema.optional<Schema.Record$<typeof Schema.String, Schema.Array$<typeof Schema.String>>>;
257
+ }>>, never>;
258
+ readonly security: Schema.withDecodingDefaultKey<Schema.$Record<Schema.String, Schema.Struct<{
259
+ readonly vulnerability_alerts: Schema.optional<Schema.Boolean>;
260
+ readonly automated_security_fixes: Schema.optional<Schema.Boolean>;
261
+ readonly private_vulnerability_reporting: Schema.optional<Schema.Boolean>;
262
+ }>>, never>;
263
+ readonly code_scanning: Schema.withDecodingDefaultKey<Schema.$Record<Schema.String, Schema.Struct<{
264
+ readonly state: Schema.optional<Schema.Literals<readonly ["configured", "not-configured"]>>;
265
+ readonly languages: Schema.optional<Schema.$Array<Schema.Literals<readonly ["actions", "c-cpp", "csharp", "go", "java-kotlin", "javascript-typescript", "python", "ruby", "swift"]>>>;
266
+ readonly query_suite: Schema.optional<Schema.Literals<readonly ["default", "extended"]>>;
267
+ readonly threat_model: Schema.optional<Schema.Literals<readonly ["remote", "remote_and_local"]>>;
268
+ readonly runner_type: Schema.optional<Schema.Literals<readonly ["standard", "labeled"]>>;
269
+ readonly runner_label: Schema.optional<Schema.String>;
270
+ }>>, never>;
271
+ readonly groups: Schema.withDecodingDefaultKey<Schema.$Record<Schema.String, Schema.Struct<{
272
+ readonly repos: Schema.$Array<Schema.String>;
273
+ readonly credentials: Schema.String;
274
+ readonly settings: Schema.optional<Schema.$Array<Schema.String>>;
275
+ readonly environments: Schema.optional<Schema.$Array<Schema.String>>;
276
+ readonly secrets: Schema.optional<Schema.Struct<{
277
+ readonly actions: Schema.optional<Schema.$Array<Schema.String>>;
278
+ readonly dependabot: Schema.optional<Schema.$Array<Schema.String>>;
279
+ readonly codespaces: Schema.optional<Schema.$Array<Schema.String>>;
280
+ readonly environments: Schema.optional<Schema.$Record<Schema.String, Schema.$Array<Schema.String>>>;
543
281
  }>>;
544
- variables: Schema.optional<Schema.Struct<{
545
- actions: Schema.optional<Schema.Array$<typeof Schema.String>>;
546
- environments: Schema.optional<Schema.Record$<typeof Schema.String, Schema.Array$<typeof Schema.String>>>;
547
- }>>;
548
- rulesets: Schema.optional<Schema.Array$<typeof Schema.String>>;
549
- security: Schema.optional<Schema.Array$<typeof Schema.String>>;
550
- code_scanning: Schema.optional<Schema.Array$<typeof Schema.String>>;
551
- cleanup: Schema.optional<Schema.Struct<{
552
- secrets: Schema.optionalWith<Schema.Struct<{
553
- actions: Schema.optionalWith<Schema.Union<[typeof Schema.Boolean, Schema.Struct<{
554
- preserve: Schema.Array$<typeof Schema.String>;
555
- }>]>, {
556
- default: () => CleanupScope;
557
- }>;
558
- dependabot: Schema.optionalWith<Schema.Union<[typeof Schema.Boolean, Schema.Struct<{
559
- preserve: Schema.Array$<typeof Schema.String>;
560
- }>]>, {
561
- default: () => CleanupScope;
562
- }>;
563
- codespaces: Schema.optionalWith<Schema.Union<[typeof Schema.Boolean, Schema.Struct<{
564
- preserve: Schema.Array$<typeof Schema.String>;
565
- }>]>, {
566
- default: () => CleanupScope;
567
- }>;
568
- environments: Schema.optionalWith<Schema.Union<[typeof Schema.Boolean, Schema.Struct<{
569
- preserve: Schema.Array$<typeof Schema.String>;
570
- }>]>, {
571
- default: () => CleanupScope;
572
- }>;
573
- }>, {
574
- default: () => {
575
- actions: CleanupScope;
576
- dependabot: CleanupScope;
577
- codespaces: CleanupScope;
578
- environments: CleanupScope;
579
- };
580
- }>;
581
- variables: Schema.optionalWith<Schema.Struct<{
582
- actions: Schema.optionalWith<Schema.Union<[typeof Schema.Boolean, Schema.Struct<{
583
- preserve: Schema.Array$<typeof Schema.String>;
584
- }>]>, {
585
- default: () => CleanupScope;
586
- }>;
587
- environments: Schema.optionalWith<Schema.Union<[typeof Schema.Boolean, Schema.Struct<{
588
- preserve: Schema.Array$<typeof Schema.String>;
589
- }>]>, {
590
- default: () => CleanupScope;
591
- }>;
592
- }>, {
593
- default: () => {
594
- actions: CleanupScope;
595
- environments: CleanupScope;
596
- };
597
- }>;
598
- rulesets: Schema.optionalWith<Schema.Union<[typeof Schema.Boolean, Schema.Struct<{
599
- preserve: Schema.Array$<typeof Schema.String>;
600
- }>]>, {
601
- default: () => CleanupScope;
602
- }>;
603
- environments: Schema.optionalWith<Schema.Union<[typeof Schema.Boolean, Schema.Struct<{
604
- preserve: Schema.Array$<typeof Schema.String>;
605
- }>]>, {
606
- default: () => CleanupScope;
607
- }>;
282
+ readonly variables: Schema.optional<Schema.Struct<{
283
+ readonly actions: Schema.optional<Schema.$Array<Schema.String>>;
284
+ readonly environments: Schema.optional<Schema.$Record<Schema.String, Schema.$Array<Schema.String>>>;
608
285
  }>>;
609
- }>>;
610
- }>;
611
- type Config = typeof ConfigSchema.Type;
612
- //#endregion
613
- //#region src/schemas/credentials.d.ts
614
- declare const ResolveSectionSchema: Schema.Struct<{
615
- op: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.String>>;
616
- file: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.String>>;
617
- value: Schema.optional<Schema.Record$<typeof Schema.String, Schema.Union<[typeof Schema.String, Schema.Record$<typeof Schema.String, Schema.SchemaClass<unknown, unknown, never>>]>>>;
618
- }>;
619
- type ResolveSection = typeof ResolveSectionSchema.Type;
620
- declare const CredentialProfileSchema: Schema.Struct<{
621
- github_token: Schema.SchemaClass<string, string, never>;
622
- op_service_account_token: Schema.optional<Schema.SchemaClass<string, string, never>>;
623
- resolve: Schema.optional<Schema.Struct<{
624
- op: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.String>>;
625
- file: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.String>>;
626
- value: Schema.optional<Schema.Record$<typeof Schema.String, Schema.Union<[typeof Schema.String, Schema.Record$<typeof Schema.String, Schema.SchemaClass<unknown, unknown, never>>]>>>;
627
- }>>;
628
- }>;
629
- type CredentialProfile = typeof CredentialProfileSchema.Type;
630
- declare const CredentialsSchema: Schema.Struct<{
631
- profiles: Schema.optionalWith<Schema.Record$<typeof Schema.String, Schema.Struct<{
632
- github_token: Schema.SchemaClass<string, string, never>;
633
- op_service_account_token: Schema.optional<Schema.SchemaClass<string, string, never>>;
634
- resolve: Schema.optional<Schema.Struct<{
635
- op: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.String>>;
636
- file: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.String>>;
637
- value: Schema.optional<Schema.Record$<typeof Schema.String, Schema.Union<[typeof Schema.String, Schema.Record$<typeof Schema.String, Schema.SchemaClass<unknown, unknown, never>>]>>>;
286
+ readonly rulesets: Schema.optional<Schema.$Array<Schema.String>>;
287
+ readonly security: Schema.optional<Schema.$Array<Schema.String>>;
288
+ readonly code_scanning: Schema.optional<Schema.$Array<Schema.String>>;
289
+ readonly cleanup: Schema.optional<Schema.Struct<{
290
+ readonly secrets: Schema.withDecodingDefaultKey<Schema.Struct<{
291
+ readonly actions: Schema.withDecodingDefaultKey<Schema.Union<readonly [Schema.Boolean, Schema.Struct<{
292
+ readonly preserve: Schema.$Array<Schema.String>;
293
+ }>]>, never>;
294
+ readonly dependabot: Schema.withDecodingDefaultKey<Schema.Union<readonly [Schema.Boolean, Schema.Struct<{
295
+ readonly preserve: Schema.$Array<Schema.String>;
296
+ }>]>, never>;
297
+ readonly codespaces: Schema.withDecodingDefaultKey<Schema.Union<readonly [Schema.Boolean, Schema.Struct<{
298
+ readonly preserve: Schema.$Array<Schema.String>;
299
+ }>]>, never>;
300
+ readonly environments: Schema.withDecodingDefaultKey<Schema.Union<readonly [Schema.Boolean, Schema.Struct<{
301
+ readonly preserve: Schema.$Array<Schema.String>;
302
+ }>]>, never>;
303
+ }>, never>;
304
+ readonly variables: Schema.withDecodingDefaultKey<Schema.Struct<{
305
+ readonly actions: Schema.withDecodingDefaultKey<Schema.Union<readonly [Schema.Boolean, Schema.Struct<{
306
+ readonly preserve: Schema.$Array<Schema.String>;
307
+ }>]>, never>;
308
+ readonly environments: Schema.withDecodingDefaultKey<Schema.Union<readonly [Schema.Boolean, Schema.Struct<{
309
+ readonly preserve: Schema.$Array<Schema.String>;
310
+ }>]>, never>;
311
+ }>, never>;
312
+ readonly rulesets: Schema.withDecodingDefaultKey<Schema.Union<readonly [Schema.Boolean, Schema.Struct<{
313
+ readonly preserve: Schema.$Array<Schema.String>;
314
+ }>]>, never>;
315
+ readonly environments: Schema.withDecodingDefaultKey<Schema.Union<readonly [Schema.Boolean, Schema.Struct<{
316
+ readonly preserve: Schema.$Array<Schema.String>;
317
+ }>]>, never>;
638
318
  }>>;
639
- }>>, {
640
- default: () => {};
641
- }>;
319
+ }>>, never>;
642
320
  }>;
643
- type Credentials = typeof CredentialsSchema.Type;
644
- //#endregion
645
- //#region src/schemas/ruleset.d.ts
646
- declare const ResolvedRefSchema: Schema.Struct<{
647
- resolved: Schema.SchemaClass<string, string, never>;
648
- }>;
649
- type ResolvedRef = typeof ResolvedRefSchema.Type;
650
- declare const BypassActorSchema: Schema.Struct<{
651
- actor_id: Schema.optional<Schema.Union<[typeof Schema.Int, Schema.Struct<{
652
- resolved: Schema.SchemaClass<string, string, never>;
653
- }>]>>;
654
- actor_type: Schema.Literal<["Integration", "OrganizationAdmin", "RepositoryRole", "Team", "DeployKey"]>;
655
- bypass_mode: Schema.optionalWith<Schema.Literal<["always", "pull_request", "exempt"]>, {
656
- default: () => "always";
657
- }>;
658
- }>;
659
- type BypassActor = typeof BypassActorSchema.Type;
660
- declare const RulesetSchema: Schema.Union<[Schema.Struct<{
661
- type: Schema.Literal<["branch"]>;
662
- pull_requests: Schema.optional<Schema.Struct<{
663
- approvals: Schema.optionalWith<Schema.refine<number, typeof Schema.Int>, {
664
- default: () => number;
665
- }>;
666
- dismiss_stale_reviews: Schema.optionalWith<Schema.SchemaClass<boolean, boolean, never>, {
667
- default: () => boolean;
668
- }>;
669
- code_owner_review: Schema.optionalWith<Schema.SchemaClass<boolean, boolean, never>, {
670
- default: () => boolean;
671
- }>;
672
- last_push_approval: Schema.optionalWith<Schema.SchemaClass<boolean, boolean, never>, {
673
- default: () => boolean;
674
- }>;
675
- resolve_threads: Schema.optionalWith<Schema.SchemaClass<boolean, boolean, never>, {
676
- default: () => boolean;
677
- }>;
678
- merge_methods: Schema.optional<Schema.Array$<Schema.Literal<["merge", "squash", "rebase"]>>>;
679
- reviewers: Schema.optional<Schema.Array$<Schema.Struct<{
680
- file_patterns: Schema.Array$<typeof Schema.String>;
681
- minimum_approvals: Schema.refine<number, typeof Schema.Number>;
682
- reviewer: Schema.Struct<{
683
- id: Schema.refine<number, typeof Schema.Number>;
684
- type: Schema.Literal<["Team"]>;
685
- }>;
686
- }>>>;
687
- }>>;
688
- merge_queue: Schema.optional<Schema.Struct<{
689
- check_timeout: Schema.refine<number, typeof Schema.Int>;
690
- grouping: Schema.Literal<["ALLGREEN", "HEADGREEN"]>;
691
- max_build: Schema.refine<number, typeof Schema.Int>;
692
- max_merge: Schema.refine<number, typeof Schema.Int>;
693
- merge_method: Schema.Literal<["MERGE", "SQUASH", "REBASE"]>;
694
- min_merge: Schema.refine<number, typeof Schema.Int>;
695
- min_wait: Schema.refine<number, typeof Schema.Int>;
696
- }>>;
697
- copilot_review: Schema.optional<Schema.Struct<{
698
- draft_prs: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
699
- on_push: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
700
- }>>;
701
- code_scanning: Schema.optional<Schema.Array$<Schema.Struct<{
702
- tool: Schema.SchemaClass<string, string, never>;
703
- alerts: Schema.Literal<["none", "errors", "errors_and_warnings", "all"]>;
704
- security_alerts: Schema.Literal<["none", "critical", "high_or_higher", "medium_or_higher", "all"]>;
705
- }>>>;
706
- workflows: Schema.optional<Schema.Struct<{
707
- on_creation: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
708
- required: Schema.Array$<Schema.Struct<{
709
- path: Schema.SchemaClass<string, string, never>;
710
- ref: Schema.optional<Schema.SchemaClass<string, string, never>>;
711
- repository_id: Schema.Union<[typeof Schema.Int, Schema.Struct<{
712
- resolved: Schema.SchemaClass<string, string, never>;
713
- }>]>;
714
- sha: Schema.optional<Schema.SchemaClass<string, string, never>>;
715
- }>>;
716
- }>>;
717
- branch_name: Schema.optional<Schema.Array$<Schema.Struct<{
718
- operator: Schema.Literal<["starts_with", "ends_with", "contains", "regex"]>;
719
- pattern: Schema.SchemaClass<string, string, never>;
720
- name: Schema.optional<Schema.SchemaClass<string, string, never>>;
721
- negate: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
722
- }>>>;
723
- name: Schema.SchemaClass<string, string, never>;
724
- enforcement: Schema.Literal<["disabled", "active", "evaluate"]>;
725
- conditions: Schema.optional<Schema.Struct<{
726
- ref_name: Schema.optional<Schema.Struct<{
727
- include: Schema.optionalWith<Schema.Array$<typeof Schema.String>, {
728
- default: () => never[];
729
- }>;
730
- exclude: Schema.optionalWith<Schema.Array$<typeof Schema.String>, {
731
- default: () => never[];
732
- }>;
733
- }>>;
734
- }>>;
735
- bypass_actors: Schema.optional<Schema.Array$<Schema.Struct<{
736
- actor_id: Schema.optional<Schema.Union<[typeof Schema.Int, Schema.Struct<{
737
- resolved: Schema.SchemaClass<string, string, never>;
738
- }>]>>;
739
- actor_type: Schema.Literal<["Integration", "OrganizationAdmin", "RepositoryRole", "Team", "DeployKey"]>;
740
- bypass_mode: Schema.optionalWith<Schema.Literal<["always", "pull_request", "exempt"]>, {
741
- default: () => "always";
742
- }>;
743
- }>>>;
744
- creation: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
745
- update: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
746
- deletion: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
747
- required_linear_history: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
748
- required_signatures: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
749
- non_fast_forward: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
750
- deployments: Schema.optional<Schema.Array$<typeof Schema.String>>;
751
- targets: Schema.optional<Schema.Union<[Schema.Literal<["default", "all"]>, Schema.Array$<Schema.Union<[Schema.Struct<{
752
- include: Schema.SchemaClass<string, string, never>;
753
- }>, Schema.Struct<{
754
- exclude: Schema.SchemaClass<string, string, never>;
755
- }>]>>]>>;
756
- status_checks: Schema.optional<Schema.Struct<{
757
- update_branch: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
758
- on_creation: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
759
- default_integration_id: Schema.optional<Schema.Union<[typeof Schema.Int, Schema.Struct<{
760
- resolved: Schema.SchemaClass<string, string, never>;
761
- }>]>>;
762
- required: Schema.Array$<Schema.Struct<{
763
- context: Schema.SchemaClass<string, string, never>;
764
- integration_id: Schema.optional<Schema.Union<[typeof Schema.Int, Schema.Struct<{
765
- resolved: Schema.SchemaClass<string, string, never>;
766
- }>]>>;
767
- }>>;
768
- }>>;
769
- commit_message: Schema.optional<Schema.Array$<Schema.Struct<{
770
- operator: Schema.Literal<["starts_with", "ends_with", "contains", "regex"]>;
771
- pattern: Schema.SchemaClass<string, string, never>;
772
- name: Schema.optional<Schema.SchemaClass<string, string, never>>;
773
- negate: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
774
- }>>>;
775
- commit_author_email: Schema.optional<Schema.Array$<Schema.Struct<{
776
- operator: Schema.Literal<["starts_with", "ends_with", "contains", "regex"]>;
777
- pattern: Schema.SchemaClass<string, string, never>;
778
- name: Schema.optional<Schema.SchemaClass<string, string, never>>;
779
- negate: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
780
- }>>>;
781
- committer_email: Schema.optional<Schema.Array$<Schema.Struct<{
782
- operator: Schema.Literal<["starts_with", "ends_with", "contains", "regex"]>;
783
- pattern: Schema.SchemaClass<string, string, never>;
784
- name: Schema.optional<Schema.SchemaClass<string, string, never>>;
785
- negate: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
786
- }>>>;
787
- }>, Schema.Struct<{
788
- type: Schema.Literal<["tag"]>;
789
- tag_name: Schema.optional<Schema.Array$<Schema.Struct<{
790
- operator: Schema.Literal<["starts_with", "ends_with", "contains", "regex"]>;
791
- pattern: Schema.SchemaClass<string, string, never>;
792
- name: Schema.optional<Schema.SchemaClass<string, string, never>>;
793
- negate: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
794
- }>>>;
795
- name: Schema.SchemaClass<string, string, never>;
796
- enforcement: Schema.Literal<["disabled", "active", "evaluate"]>;
797
- conditions: Schema.optional<Schema.Struct<{
798
- ref_name: Schema.optional<Schema.Struct<{
799
- include: Schema.optionalWith<Schema.Array$<typeof Schema.String>, {
800
- default: () => never[];
801
- }>;
802
- exclude: Schema.optionalWith<Schema.Array$<typeof Schema.String>, {
803
- default: () => never[];
804
- }>;
805
- }>>;
806
- }>>;
807
- bypass_actors: Schema.optional<Schema.Array$<Schema.Struct<{
808
- actor_id: Schema.optional<Schema.Union<[typeof Schema.Int, Schema.Struct<{
809
- resolved: Schema.SchemaClass<string, string, never>;
810
- }>]>>;
811
- actor_type: Schema.Literal<["Integration", "OrganizationAdmin", "RepositoryRole", "Team", "DeployKey"]>;
812
- bypass_mode: Schema.optionalWith<Schema.Literal<["always", "pull_request", "exempt"]>, {
813
- default: () => "always";
814
- }>;
815
- }>>>;
816
- creation: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
817
- update: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
818
- deletion: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
819
- required_linear_history: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
820
- required_signatures: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
821
- non_fast_forward: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
822
- deployments: Schema.optional<Schema.Array$<typeof Schema.String>>;
823
- targets: Schema.optional<Schema.Union<[Schema.Literal<["default", "all"]>, Schema.Array$<Schema.Union<[Schema.Struct<{
824
- include: Schema.SchemaClass<string, string, never>;
825
- }>, Schema.Struct<{
826
- exclude: Schema.SchemaClass<string, string, never>;
827
- }>]>>]>>;
828
- status_checks: Schema.optional<Schema.Struct<{
829
- update_branch: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
830
- on_creation: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
831
- default_integration_id: Schema.optional<Schema.Union<[typeof Schema.Int, Schema.Struct<{
832
- resolved: Schema.SchemaClass<string, string, never>;
833
- }>]>>;
834
- required: Schema.Array$<Schema.Struct<{
835
- context: Schema.SchemaClass<string, string, never>;
836
- integration_id: Schema.optional<Schema.Union<[typeof Schema.Int, Schema.Struct<{
837
- resolved: Schema.SchemaClass<string, string, never>;
838
- }>]>>;
839
- }>>;
840
- }>>;
841
- commit_message: Schema.optional<Schema.Array$<Schema.Struct<{
842
- operator: Schema.Literal<["starts_with", "ends_with", "contains", "regex"]>;
843
- pattern: Schema.SchemaClass<string, string, never>;
844
- name: Schema.optional<Schema.SchemaClass<string, string, never>>;
845
- negate: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
846
- }>>>;
847
- commit_author_email: Schema.optional<Schema.Array$<Schema.Struct<{
848
- operator: Schema.Literal<["starts_with", "ends_with", "contains", "regex"]>;
849
- pattern: Schema.SchemaClass<string, string, never>;
850
- name: Schema.optional<Schema.SchemaClass<string, string, never>>;
851
- negate: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
852
- }>>>;
853
- committer_email: Schema.optional<Schema.Array$<Schema.Struct<{
854
- operator: Schema.Literal<["starts_with", "ends_with", "contains", "regex"]>;
855
- pattern: Schema.SchemaClass<string, string, never>;
856
- name: Schema.optional<Schema.SchemaClass<string, string, never>>;
857
- negate: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
858
- }>>>;
859
- }>]>;
860
- type Ruleset = typeof RulesetSchema.Type;
861
- /** API-compatible payload for creating/updating a ruleset. */
862
- interface RulesetPayload {
863
- name: string;
864
- target: "branch" | "tag";
865
- enforcement: "disabled" | "active" | "evaluate";
866
- conditions?: Record<string, unknown>;
867
- bypass_actors?: ReadonlyArray<Record<string, unknown>>;
868
- rules?: ReadonlyArray<Record<string, unknown>>;
869
- }
870
321
  /**
871
- * Builds an API-compatible ruleset payload from the config-level Ruleset.
872
- * Converts all shorthand fields into the GitHub API rules array format.
322
+ * The decoded shape of {@link ConfigSchema}.
323
+ *
324
+ * @public
873
325
  */
874
- declare function buildRulesetPayload(ruleset: Ruleset): RulesetPayload;
326
+ type Config = typeof ConfigSchema.Type;
875
327
  //#endregion
876
328
  //#region src/services/ConfigFiles.d.ts
329
+ /**
330
+ * The config file's fixed name, in every tier of the resolver chain.
331
+ *
332
+ * @public
333
+ */
877
334
  declare const CONFIG_FILENAME = "reposets.config.toml";
878
- declare const CREDENTIALS_FILENAME = "reposets.credentials.toml";
879
- declare const ReposetsConfigFile: import("effect/Context").Tag<import("xdg-effect").ConfigFileService<{
880
- readonly code_scanning: {
881
- readonly [x: string]: {
882
- readonly state?: "configured" | "not-configured" | undefined;
883
- readonly languages?: readonly ("actions" | "c-cpp" | "csharp" | "go" | "java-kotlin" | "javascript-typescript" | "python" | "ruby" | "swift")[] | undefined;
884
- readonly query_suite?: "default" | "extended" | undefined;
885
- readonly threat_model?: "remote" | "remote_and_local" | undefined;
886
- readonly runner_type?: "standard" | "labeled" | undefined;
887
- readonly runner_label?: string | undefined;
888
- };
889
- };
890
- readonly owner?: string | undefined;
891
- readonly log_level: "silent" | "info" | "verbose" | "debug";
335
+ declare const ReposetsConfigFile_base: import("effect/Context").ServiceClass<ReposetsConfigFile, "reposets/Config", import("@effected/config-file").ConfigFileShape<{
892
336
  readonly settings: {
893
337
  readonly [x: string]: {
894
- readonly [x: string]: unknown;
895
- readonly allow_forking?: boolean | undefined;
338
+ readonly [x: string]: import("effect/Schema").Json;
896
339
  readonly is_template?: boolean | undefined;
897
340
  readonly has_wiki?: boolean | undefined;
898
341
  readonly has_issues?: boolean | undefined;
@@ -900,15 +343,16 @@ declare const ReposetsConfigFile: import("effect/Context").Tag<import("xdg-effec
900
343
  readonly has_discussions?: boolean | undefined;
901
344
  readonly has_sponsorships?: boolean | undefined;
902
345
  readonly has_pull_requests?: boolean | undefined;
346
+ readonly allow_forking?: boolean | undefined;
903
347
  readonly allow_merge_commit?: boolean | undefined;
904
348
  readonly allow_squash_merge?: boolean | undefined;
905
349
  readonly allow_rebase_merge?: boolean | undefined;
906
350
  readonly allow_auto_merge?: boolean | undefined;
907
351
  readonly allow_update_branch?: boolean | undefined;
908
- readonly squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE" | undefined;
909
- readonly squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK" | undefined;
910
- readonly merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE" | undefined;
911
- readonly merge_commit_message?: "PR_TITLE" | "PR_BODY" | "BLANK" | undefined;
352
+ readonly squash_merge_commit_title?: "COMMIT_OR_PR_TITLE" | "PR_TITLE" | undefined;
353
+ readonly squash_merge_commit_message?: "BLANK" | "COMMIT_MESSAGES" | "PR_BODY" | undefined;
354
+ readonly merge_commit_title?: "MERGE_MESSAGE" | "PR_TITLE" | undefined;
355
+ readonly merge_commit_message?: "BLANK" | "PR_BODY" | "PR_TITLE" | undefined;
912
356
  readonly delete_branch_on_merge?: boolean | undefined;
913
357
  readonly web_commit_signoff_required?: boolean | undefined;
914
358
  readonly security_and_analysis?: {
@@ -924,8 +368,8 @@ declare const ReposetsConfigFile: import("effect/Context").Tag<import("xdg-effec
924
368
  readonly team: string;
925
369
  readonly mode?: "ALWAYS" | "EXEMPT" | undefined;
926
370
  } | {
927
- readonly mode?: "ALWAYS" | "EXEMPT" | undefined;
928
371
  readonly role: string;
372
+ readonly mode?: "ALWAYS" | "EXEMPT" | undefined;
929
373
  })[] | undefined;
930
374
  readonly dependabot_security_updates?: "disabled" | "enabled" | undefined;
931
375
  } | undefined;
@@ -939,7 +383,7 @@ declare const ReposetsConfigFile: import("effect/Context").Tag<import("xdg-effec
939
383
  } | {
940
384
  readonly value: {
941
385
  readonly [x: string]: string | {
942
- readonly [x: string]: unknown;
386
+ readonly [x: string]: import("effect/Schema").Json;
943
387
  };
944
388
  };
945
389
  } | {
@@ -956,7 +400,7 @@ declare const ReposetsConfigFile: import("effect/Context").Tag<import("xdg-effec
956
400
  } | {
957
401
  readonly value: {
958
402
  readonly [x: string]: string | {
959
- readonly [x: string]: unknown;
403
+ readonly [x: string]: import("effect/Schema").Json;
960
404
  };
961
405
  };
962
406
  } | {
@@ -968,119 +412,7 @@ declare const ReposetsConfigFile: import("effect/Context").Tag<import("xdg-effec
968
412
  readonly rulesets: {
969
413
  readonly [x: string]: {
970
414
  readonly name: string;
971
- readonly type: "branch";
972
- readonly pull_requests?: {
973
- readonly approvals: number;
974
- readonly dismiss_stale_reviews: boolean;
975
- readonly code_owner_review: boolean;
976
- readonly last_push_approval: boolean;
977
- readonly resolve_threads: boolean;
978
- readonly merge_methods?: readonly ("merge" | "squash" | "rebase")[] | undefined;
979
- readonly reviewers?: readonly {
980
- readonly file_patterns: readonly string[];
981
- readonly minimum_approvals: number;
982
- readonly reviewer: {
983
- readonly type: "Team";
984
- readonly id: number;
985
- };
986
- }[] | undefined;
987
- } | undefined;
988
- readonly merge_queue?: {
989
- readonly check_timeout: number;
990
- readonly grouping: "ALLGREEN" | "HEADGREEN";
991
- readonly max_build: number;
992
- readonly max_merge: number;
993
- readonly merge_method: "MERGE" | "SQUASH" | "REBASE";
994
- readonly min_merge: number;
995
- readonly min_wait: number;
996
- } | undefined;
997
- readonly copilot_review?: {
998
- readonly draft_prs?: boolean | undefined;
999
- readonly on_push?: boolean | undefined;
1000
- } | undefined;
1001
- readonly code_scanning?: readonly {
1002
- readonly tool: string;
1003
- readonly alerts: "all" | "none" | "errors" | "errors_and_warnings";
1004
- readonly security_alerts: "all" | "none" | "critical" | "high_or_higher" | "medium_or_higher";
1005
- }[] | undefined;
1006
- readonly workflows?: {
1007
- readonly on_creation?: boolean | undefined;
1008
- readonly required: readonly {
1009
- readonly path: string;
1010
- readonly ref?: string | undefined;
1011
- readonly repository_id: number | {
1012
- readonly resolved: string;
1013
- };
1014
- readonly sha?: string | undefined;
1015
- }[];
1016
- } | undefined;
1017
- readonly branch_name?: readonly {
1018
- readonly operator: "starts_with" | "ends_with" | "contains" | "regex";
1019
- readonly pattern: string;
1020
- readonly name?: string | undefined;
1021
- readonly negate?: boolean | undefined;
1022
- }[] | undefined;
1023
- readonly enforcement: "disabled" | "active" | "evaluate";
1024
- readonly conditions?: {
1025
- readonly ref_name?: {
1026
- readonly include: readonly string[];
1027
- readonly exclude: readonly string[];
1028
- } | undefined;
1029
- } | undefined;
1030
- readonly bypass_actors?: readonly {
1031
- readonly actor_id?: number | {
1032
- readonly resolved: string;
1033
- } | undefined;
1034
- readonly actor_type: "Integration" | "OrganizationAdmin" | "RepositoryRole" | "Team" | "DeployKey";
1035
- readonly bypass_mode: "always" | "pull_request" | "exempt";
1036
- }[] | undefined;
1037
- readonly creation?: boolean | undefined;
1038
- readonly update?: boolean | undefined;
1039
- readonly deletion?: boolean | undefined;
1040
- readonly required_linear_history?: boolean | undefined;
1041
- readonly required_signatures?: boolean | undefined;
1042
- readonly non_fast_forward?: boolean | undefined;
1043
- readonly deployments?: readonly string[] | undefined;
1044
- readonly targets?: "default" | "all" | readonly ({
1045
- readonly include: string;
1046
- } | {
1047
- readonly exclude: string;
1048
- })[] | undefined;
1049
- readonly status_checks?: {
1050
- readonly update_branch?: boolean | undefined;
1051
- readonly on_creation?: boolean | undefined;
1052
- readonly default_integration_id?: number | {
1053
- readonly resolved: string;
1054
- } | undefined;
1055
- readonly required: readonly {
1056
- readonly context: string;
1057
- readonly integration_id?: number | {
1058
- readonly resolved: string;
1059
- } | undefined;
1060
- }[];
1061
- } | undefined;
1062
- readonly commit_message?: readonly {
1063
- readonly operator: "starts_with" | "ends_with" | "contains" | "regex";
1064
- readonly pattern: string;
1065
- readonly name?: string | undefined;
1066
- readonly negate?: boolean | undefined;
1067
- }[] | undefined;
1068
- readonly commit_author_email?: readonly {
1069
- readonly operator: "starts_with" | "ends_with" | "contains" | "regex";
1070
- readonly pattern: string;
1071
- readonly name?: string | undefined;
1072
- readonly negate?: boolean | undefined;
1073
- }[] | undefined;
1074
- readonly committer_email?: readonly {
1075
- readonly operator: "starts_with" | "ends_with" | "contains" | "regex";
1076
- readonly pattern: string;
1077
- readonly name?: string | undefined;
1078
- readonly negate?: boolean | undefined;
1079
- }[] | undefined;
1080
- } | {
1081
- readonly name: string;
1082
- readonly type: "tag";
1083
- readonly enforcement: "disabled" | "active" | "evaluate";
415
+ readonly enforcement: "active" | "disabled" | "evaluate";
1084
416
  readonly conditions?: {
1085
417
  readonly ref_name?: {
1086
418
  readonly include: readonly string[];
@@ -1091,8 +423,8 @@ declare const ReposetsConfigFile: import("effect/Context").Tag<import("xdg-effec
1091
423
  readonly actor_id?: number | {
1092
424
  readonly resolved: string;
1093
425
  } | undefined;
1094
- readonly actor_type: "Integration" | "OrganizationAdmin" | "RepositoryRole" | "Team" | "DeployKey";
1095
- readonly bypass_mode: "always" | "pull_request" | "exempt";
426
+ readonly actor_type: "DeployKey" | "Integration" | "OrganizationAdmin" | "RepositoryRole" | "Team";
427
+ readonly bypass_mode: "always" | "exempt" | "pull_request";
1096
428
  }[] | undefined;
1097
429
  readonly creation?: boolean | undefined;
1098
430
  readonly update?: boolean | undefined;
@@ -1101,7 +433,7 @@ declare const ReposetsConfigFile: import("effect/Context").Tag<import("xdg-effec
1101
433
  readonly required_signatures?: boolean | undefined;
1102
434
  readonly non_fast_forward?: boolean | undefined;
1103
435
  readonly deployments?: readonly string[] | undefined;
1104
- readonly targets?: "default" | "all" | readonly ({
436
+ readonly targets?: "all" | "default" | readonly ({
1105
437
  readonly include: string;
1106
438
  } | {
1107
439
  readonly exclude: string;
@@ -1120,200 +452,23 @@ declare const ReposetsConfigFile: import("effect/Context").Tag<import("xdg-effec
1120
452
  }[];
1121
453
  } | undefined;
1122
454
  readonly commit_message?: readonly {
1123
- readonly operator: "starts_with" | "ends_with" | "contains" | "regex";
455
+ readonly operator: "contains" | "ends_with" | "regex" | "starts_with";
1124
456
  readonly pattern: string;
1125
457
  readonly name?: string | undefined;
1126
458
  readonly negate?: boolean | undefined;
1127
459
  }[] | undefined;
1128
460
  readonly commit_author_email?: readonly {
1129
- readonly operator: "starts_with" | "ends_with" | "contains" | "regex";
461
+ readonly operator: "contains" | "ends_with" | "regex" | "starts_with";
1130
462
  readonly pattern: string;
1131
463
  readonly name?: string | undefined;
1132
464
  readonly negate?: boolean | undefined;
1133
465
  }[] | undefined;
1134
466
  readonly committer_email?: readonly {
1135
- readonly operator: "starts_with" | "ends_with" | "contains" | "regex";
467
+ readonly operator: "contains" | "ends_with" | "regex" | "starts_with";
1136
468
  readonly pattern: string;
1137
469
  readonly name?: string | undefined;
1138
470
  readonly negate?: boolean | undefined;
1139
471
  }[] | undefined;
1140
- readonly tag_name?: readonly {
1141
- readonly operator: "starts_with" | "ends_with" | "contains" | "regex";
1142
- readonly pattern: string;
1143
- readonly name?: string | undefined;
1144
- readonly negate?: boolean | undefined;
1145
- }[] | undefined;
1146
- };
1147
- };
1148
- readonly environments: {
1149
- readonly [x: string]: {
1150
- readonly reviewers?: readonly {
1151
- readonly type: "Team" | "User";
1152
- readonly id: number;
1153
- }[] | undefined;
1154
- readonly wait_timer?: number | undefined;
1155
- readonly prevent_self_review?: boolean | undefined;
1156
- readonly deployment_branches?: "all" | "protected" | readonly {
1157
- readonly name: string;
1158
- readonly type: "branch" | "tag";
1159
- }[] | undefined;
1160
- };
1161
- };
1162
- readonly security: {
1163
- readonly [x: string]: {
1164
- readonly vulnerability_alerts?: boolean | undefined;
1165
- readonly automated_security_fixes?: boolean | undefined;
1166
- readonly private_vulnerability_reporting?: boolean | undefined;
1167
- };
1168
- };
1169
- readonly groups: {
1170
- readonly [x: string]: {
1171
- readonly code_scanning?: readonly string[] | undefined;
1172
- readonly owner?: string | undefined;
1173
- readonly settings?: readonly string[] | undefined;
1174
- readonly secrets?: {
1175
- readonly environments?: {
1176
- readonly [x: string]: readonly string[];
1177
- } | undefined;
1178
- readonly actions?: readonly string[] | undefined;
1179
- readonly dependabot?: readonly string[] | undefined;
1180
- readonly codespaces?: readonly string[] | undefined;
1181
- } | undefined;
1182
- readonly variables?: {
1183
- readonly environments?: {
1184
- readonly [x: string]: readonly string[];
1185
- } | undefined;
1186
- readonly actions?: readonly string[] | undefined;
1187
- } | undefined;
1188
- readonly rulesets?: readonly string[] | undefined;
1189
- readonly environments?: readonly string[] | undefined;
1190
- readonly security?: readonly string[] | undefined;
1191
- readonly repos: readonly string[];
1192
- readonly credentials?: string | undefined;
1193
- readonly cleanup?: {
1194
- readonly secrets: {
1195
- readonly environments: boolean | {
1196
- readonly preserve: readonly string[];
1197
- };
1198
- readonly actions: boolean | {
1199
- readonly preserve: readonly string[];
1200
- };
1201
- readonly dependabot: boolean | {
1202
- readonly preserve: readonly string[];
1203
- };
1204
- readonly codespaces: boolean | {
1205
- readonly preserve: readonly string[];
1206
- };
1207
- };
1208
- readonly variables: {
1209
- readonly environments: boolean | {
1210
- readonly preserve: readonly string[];
1211
- };
1212
- readonly actions: boolean | {
1213
- readonly preserve: readonly string[];
1214
- };
1215
- };
1216
- readonly rulesets: boolean | {
1217
- readonly preserve: readonly string[];
1218
- };
1219
- readonly environments: boolean | {
1220
- readonly preserve: readonly string[];
1221
- };
1222
- } | undefined;
1223
- };
1224
- };
1225
- }>, import("xdg-effect").ConfigFileService<{
1226
- readonly code_scanning: {
1227
- readonly [x: string]: {
1228
- readonly state?: "configured" | "not-configured" | undefined;
1229
- readonly languages?: readonly ("actions" | "c-cpp" | "csharp" | "go" | "java-kotlin" | "javascript-typescript" | "python" | "ruby" | "swift")[] | undefined;
1230
- readonly query_suite?: "default" | "extended" | undefined;
1231
- readonly threat_model?: "remote" | "remote_and_local" | undefined;
1232
- readonly runner_type?: "standard" | "labeled" | undefined;
1233
- readonly runner_label?: string | undefined;
1234
- };
1235
- };
1236
- readonly owner?: string | undefined;
1237
- readonly log_level: "silent" | "info" | "verbose" | "debug";
1238
- readonly settings: {
1239
- readonly [x: string]: {
1240
- readonly [x: string]: unknown;
1241
- readonly allow_forking?: boolean | undefined;
1242
- readonly is_template?: boolean | undefined;
1243
- readonly has_wiki?: boolean | undefined;
1244
- readonly has_issues?: boolean | undefined;
1245
- readonly has_projects?: boolean | undefined;
1246
- readonly has_discussions?: boolean | undefined;
1247
- readonly has_sponsorships?: boolean | undefined;
1248
- readonly has_pull_requests?: boolean | undefined;
1249
- readonly allow_merge_commit?: boolean | undefined;
1250
- readonly allow_squash_merge?: boolean | undefined;
1251
- readonly allow_rebase_merge?: boolean | undefined;
1252
- readonly allow_auto_merge?: boolean | undefined;
1253
- readonly allow_update_branch?: boolean | undefined;
1254
- readonly squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE" | undefined;
1255
- readonly squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK" | undefined;
1256
- readonly merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE" | undefined;
1257
- readonly merge_commit_message?: "PR_TITLE" | "PR_BODY" | "BLANK" | undefined;
1258
- readonly delete_branch_on_merge?: boolean | undefined;
1259
- readonly web_commit_signoff_required?: boolean | undefined;
1260
- readonly security_and_analysis?: {
1261
- readonly advanced_security?: "disabled" | "enabled" | undefined;
1262
- readonly code_security?: "disabled" | "enabled" | undefined;
1263
- readonly secret_scanning?: "disabled" | "enabled" | undefined;
1264
- readonly secret_scanning_push_protection?: "disabled" | "enabled" | undefined;
1265
- readonly secret_scanning_ai_detection?: "disabled" | "enabled" | undefined;
1266
- readonly secret_scanning_non_provider_patterns?: "disabled" | "enabled" | undefined;
1267
- readonly secret_scanning_delegated_alert_dismissal?: "disabled" | "enabled" | undefined;
1268
- readonly secret_scanning_delegated_bypass?: "disabled" | "enabled" | undefined;
1269
- readonly delegated_bypass_reviewers?: readonly ({
1270
- readonly team: string;
1271
- readonly mode?: "ALWAYS" | "EXEMPT" | undefined;
1272
- } | {
1273
- readonly mode?: "ALWAYS" | "EXEMPT" | undefined;
1274
- readonly role: string;
1275
- })[] | undefined;
1276
- readonly dependabot_security_updates?: "disabled" | "enabled" | undefined;
1277
- } | undefined;
1278
- };
1279
- };
1280
- readonly secrets: {
1281
- readonly [x: string]: {
1282
- readonly file: {
1283
- readonly [x: string]: string;
1284
- };
1285
- } | {
1286
- readonly value: {
1287
- readonly [x: string]: string | {
1288
- readonly [x: string]: unknown;
1289
- };
1290
- };
1291
- } | {
1292
- readonly resolved: {
1293
- readonly [x: string]: string;
1294
- };
1295
- };
1296
- };
1297
- readonly variables: {
1298
- readonly [x: string]: {
1299
- readonly file: {
1300
- readonly [x: string]: string;
1301
- };
1302
- } | {
1303
- readonly value: {
1304
- readonly [x: string]: string | {
1305
- readonly [x: string]: unknown;
1306
- };
1307
- };
1308
- } | {
1309
- readonly resolved: {
1310
- readonly [x: string]: string;
1311
- };
1312
- };
1313
- };
1314
- readonly rulesets: {
1315
- readonly [x: string]: {
1316
- readonly name: string;
1317
472
  readonly type: "branch";
1318
473
  readonly pull_requests?: {
1319
474
  readonly approvals: number;
@@ -1321,13 +476,13 @@ declare const ReposetsConfigFile: import("effect/Context").Tag<import("xdg-effec
1321
476
  readonly code_owner_review: boolean;
1322
477
  readonly last_push_approval: boolean;
1323
478
  readonly resolve_threads: boolean;
1324
- readonly merge_methods?: readonly ("merge" | "squash" | "rebase")[] | undefined;
479
+ readonly merge_methods?: readonly ("merge" | "rebase" | "squash")[] | undefined;
1325
480
  readonly reviewers?: readonly {
1326
481
  readonly file_patterns: readonly string[];
1327
482
  readonly minimum_approvals: number;
1328
483
  readonly reviewer: {
1329
- readonly type: "Team";
1330
484
  readonly id: number;
485
+ readonly type: "Team";
1331
486
  };
1332
487
  }[] | undefined;
1333
488
  } | undefined;
@@ -1336,7 +491,7 @@ declare const ReposetsConfigFile: import("effect/Context").Tag<import("xdg-effec
1336
491
  readonly grouping: "ALLGREEN" | "HEADGREEN";
1337
492
  readonly max_build: number;
1338
493
  readonly max_merge: number;
1339
- readonly merge_method: "MERGE" | "SQUASH" | "REBASE";
494
+ readonly merge_method: "MERGE" | "REBASE" | "SQUASH";
1340
495
  readonly min_merge: number;
1341
496
  readonly min_wait: number;
1342
497
  } | undefined;
@@ -1346,8 +501,8 @@ declare const ReposetsConfigFile: import("effect/Context").Tag<import("xdg-effec
1346
501
  } | undefined;
1347
502
  readonly code_scanning?: readonly {
1348
503
  readonly tool: string;
1349
- readonly alerts: "all" | "none" | "errors" | "errors_and_warnings";
1350
- readonly security_alerts: "all" | "none" | "critical" | "high_or_higher" | "medium_or_higher";
504
+ readonly alerts: "all" | "errors" | "errors_and_warnings" | "none";
505
+ readonly security_alerts: "all" | "critical" | "high_or_higher" | "medium_or_higher" | "none";
1351
506
  }[] | undefined;
1352
507
  readonly workflows?: {
1353
508
  readonly on_creation?: boolean | undefined;
@@ -1361,72 +516,14 @@ declare const ReposetsConfigFile: import("effect/Context").Tag<import("xdg-effec
1361
516
  }[];
1362
517
  } | undefined;
1363
518
  readonly branch_name?: readonly {
1364
- readonly operator: "starts_with" | "ends_with" | "contains" | "regex";
1365
- readonly pattern: string;
1366
- readonly name?: string | undefined;
1367
- readonly negate?: boolean | undefined;
1368
- }[] | undefined;
1369
- readonly enforcement: "disabled" | "active" | "evaluate";
1370
- readonly conditions?: {
1371
- readonly ref_name?: {
1372
- readonly include: readonly string[];
1373
- readonly exclude: readonly string[];
1374
- } | undefined;
1375
- } | undefined;
1376
- readonly bypass_actors?: readonly {
1377
- readonly actor_id?: number | {
1378
- readonly resolved: string;
1379
- } | undefined;
1380
- readonly actor_type: "Integration" | "OrganizationAdmin" | "RepositoryRole" | "Team" | "DeployKey";
1381
- readonly bypass_mode: "always" | "pull_request" | "exempt";
1382
- }[] | undefined;
1383
- readonly creation?: boolean | undefined;
1384
- readonly update?: boolean | undefined;
1385
- readonly deletion?: boolean | undefined;
1386
- readonly required_linear_history?: boolean | undefined;
1387
- readonly required_signatures?: boolean | undefined;
1388
- readonly non_fast_forward?: boolean | undefined;
1389
- readonly deployments?: readonly string[] | undefined;
1390
- readonly targets?: "default" | "all" | readonly ({
1391
- readonly include: string;
1392
- } | {
1393
- readonly exclude: string;
1394
- })[] | undefined;
1395
- readonly status_checks?: {
1396
- readonly update_branch?: boolean | undefined;
1397
- readonly on_creation?: boolean | undefined;
1398
- readonly default_integration_id?: number | {
1399
- readonly resolved: string;
1400
- } | undefined;
1401
- readonly required: readonly {
1402
- readonly context: string;
1403
- readonly integration_id?: number | {
1404
- readonly resolved: string;
1405
- } | undefined;
1406
- }[];
1407
- } | undefined;
1408
- readonly commit_message?: readonly {
1409
- readonly operator: "starts_with" | "ends_with" | "contains" | "regex";
1410
- readonly pattern: string;
1411
- readonly name?: string | undefined;
1412
- readonly negate?: boolean | undefined;
1413
- }[] | undefined;
1414
- readonly commit_author_email?: readonly {
1415
- readonly operator: "starts_with" | "ends_with" | "contains" | "regex";
1416
- readonly pattern: string;
1417
- readonly name?: string | undefined;
1418
- readonly negate?: boolean | undefined;
1419
- }[] | undefined;
1420
- readonly committer_email?: readonly {
1421
- readonly operator: "starts_with" | "ends_with" | "contains" | "regex";
519
+ readonly operator: "contains" | "ends_with" | "regex" | "starts_with";
1422
520
  readonly pattern: string;
1423
521
  readonly name?: string | undefined;
1424
522
  readonly negate?: boolean | undefined;
1425
523
  }[] | undefined;
1426
524
  } | {
1427
525
  readonly name: string;
1428
- readonly type: "tag";
1429
- readonly enforcement: "disabled" | "active" | "evaluate";
526
+ readonly enforcement: "active" | "disabled" | "evaluate";
1430
527
  readonly conditions?: {
1431
528
  readonly ref_name?: {
1432
529
  readonly include: readonly string[];
@@ -1437,8 +534,8 @@ declare const ReposetsConfigFile: import("effect/Context").Tag<import("xdg-effec
1437
534
  readonly actor_id?: number | {
1438
535
  readonly resolved: string;
1439
536
  } | undefined;
1440
- readonly actor_type: "Integration" | "OrganizationAdmin" | "RepositoryRole" | "Team" | "DeployKey";
1441
- readonly bypass_mode: "always" | "pull_request" | "exempt";
537
+ readonly actor_type: "DeployKey" | "Integration" | "OrganizationAdmin" | "RepositoryRole" | "Team";
538
+ readonly bypass_mode: "always" | "exempt" | "pull_request";
1442
539
  }[] | undefined;
1443
540
  readonly creation?: boolean | undefined;
1444
541
  readonly update?: boolean | undefined;
@@ -1447,7 +544,7 @@ declare const ReposetsConfigFile: import("effect/Context").Tag<import("xdg-effec
1447
544
  readonly required_signatures?: boolean | undefined;
1448
545
  readonly non_fast_forward?: boolean | undefined;
1449
546
  readonly deployments?: readonly string[] | undefined;
1450
- readonly targets?: "default" | "all" | readonly ({
547
+ readonly targets?: "all" | "default" | readonly ({
1451
548
  readonly include: string;
1452
549
  } | {
1453
550
  readonly exclude: string;
@@ -1466,25 +563,26 @@ declare const ReposetsConfigFile: import("effect/Context").Tag<import("xdg-effec
1466
563
  }[];
1467
564
  } | undefined;
1468
565
  readonly commit_message?: readonly {
1469
- readonly operator: "starts_with" | "ends_with" | "contains" | "regex";
566
+ readonly operator: "contains" | "ends_with" | "regex" | "starts_with";
1470
567
  readonly pattern: string;
1471
568
  readonly name?: string | undefined;
1472
569
  readonly negate?: boolean | undefined;
1473
570
  }[] | undefined;
1474
571
  readonly commit_author_email?: readonly {
1475
- readonly operator: "starts_with" | "ends_with" | "contains" | "regex";
572
+ readonly operator: "contains" | "ends_with" | "regex" | "starts_with";
1476
573
  readonly pattern: string;
1477
574
  readonly name?: string | undefined;
1478
575
  readonly negate?: boolean | undefined;
1479
576
  }[] | undefined;
1480
577
  readonly committer_email?: readonly {
1481
- readonly operator: "starts_with" | "ends_with" | "contains" | "regex";
578
+ readonly operator: "contains" | "ends_with" | "regex" | "starts_with";
1482
579
  readonly pattern: string;
1483
580
  readonly name?: string | undefined;
1484
581
  readonly negate?: boolean | undefined;
1485
582
  }[] | undefined;
583
+ readonly type: "tag";
1486
584
  readonly tag_name?: readonly {
1487
- readonly operator: "starts_with" | "ends_with" | "contains" | "regex";
585
+ readonly operator: "contains" | "ends_with" | "regex" | "starts_with";
1488
586
  readonly pattern: string;
1489
587
  readonly name?: string | undefined;
1490
588
  readonly negate?: boolean | undefined;
@@ -1493,12 +591,12 @@ declare const ReposetsConfigFile: import("effect/Context").Tag<import("xdg-effec
1493
591
  };
1494
592
  readonly environments: {
1495
593
  readonly [x: string]: {
594
+ readonly wait_timer?: number | undefined;
595
+ readonly prevent_self_review?: boolean | undefined;
1496
596
  readonly reviewers?: readonly {
1497
597
  readonly type: "Team" | "User";
1498
598
  readonly id: number;
1499
599
  }[] | undefined;
1500
- readonly wait_timer?: number | undefined;
1501
- readonly prevent_self_review?: boolean | undefined;
1502
600
  readonly deployment_branches?: "all" | "protected" | readonly {
1503
601
  readonly name: string;
1504
602
  readonly type: "branch" | "tag";
@@ -1512,35 +610,41 @@ declare const ReposetsConfigFile: import("effect/Context").Tag<import("xdg-effec
1512
610
  readonly private_vulnerability_reporting?: boolean | undefined;
1513
611
  };
1514
612
  };
613
+ readonly code_scanning: {
614
+ readonly [x: string]: {
615
+ readonly state?: "configured" | "not-configured" | undefined;
616
+ readonly languages?: readonly ("actions" | "c-cpp" | "csharp" | "go" | "java-kotlin" | "javascript-typescript" | "python" | "ruby" | "swift")[] | undefined;
617
+ readonly query_suite?: "default" | "extended" | undefined;
618
+ readonly threat_model?: "remote" | "remote_and_local" | undefined;
619
+ readonly runner_type?: "labeled" | "standard" | undefined;
620
+ readonly runner_label?: string | undefined;
621
+ };
622
+ };
1515
623
  readonly groups: {
1516
624
  readonly [x: string]: {
1517
- readonly code_scanning?: readonly string[] | undefined;
1518
- readonly owner?: string | undefined;
625
+ readonly repos: readonly string[];
626
+ readonly credentials: string;
1519
627
  readonly settings?: readonly string[] | undefined;
628
+ readonly environments?: readonly string[] | undefined;
1520
629
  readonly secrets?: {
1521
- readonly environments?: {
1522
- readonly [x: string]: readonly string[];
1523
- } | undefined;
1524
630
  readonly actions?: readonly string[] | undefined;
1525
631
  readonly dependabot?: readonly string[] | undefined;
1526
632
  readonly codespaces?: readonly string[] | undefined;
633
+ readonly environments?: {
634
+ readonly [x: string]: readonly string[];
635
+ } | undefined;
1527
636
  } | undefined;
1528
637
  readonly variables?: {
638
+ readonly actions?: readonly string[] | undefined;
1529
639
  readonly environments?: {
1530
640
  readonly [x: string]: readonly string[];
1531
641
  } | undefined;
1532
- readonly actions?: readonly string[] | undefined;
1533
642
  } | undefined;
1534
643
  readonly rulesets?: readonly string[] | undefined;
1535
- readonly environments?: readonly string[] | undefined;
1536
644
  readonly security?: readonly string[] | undefined;
1537
- readonly repos: readonly string[];
1538
- readonly credentials?: string | undefined;
645
+ readonly code_scanning?: readonly string[] | undefined;
1539
646
  readonly cleanup?: {
1540
647
  readonly secrets: {
1541
- readonly environments: boolean | {
1542
- readonly preserve: readonly string[];
1543
- };
1544
648
  readonly actions: boolean | {
1545
649
  readonly preserve: readonly string[];
1546
650
  };
@@ -1550,14 +654,17 @@ declare const ReposetsConfigFile: import("effect/Context").Tag<import("xdg-effec
1550
654
  readonly codespaces: boolean | {
1551
655
  readonly preserve: readonly string[];
1552
656
  };
1553
- };
1554
- readonly variables: {
1555
657
  readonly environments: boolean | {
1556
658
  readonly preserve: readonly string[];
1557
659
  };
660
+ };
661
+ readonly variables: {
1558
662
  readonly actions: boolean | {
1559
663
  readonly preserve: readonly string[];
1560
664
  };
665
+ readonly environments: boolean | {
666
+ readonly preserve: readonly string[];
667
+ };
1561
668
  };
1562
669
  readonly rulesets: boolean | {
1563
670
  readonly preserve: readonly string[];
@@ -1569,182 +676,47 @@ declare const ReposetsConfigFile: import("effect/Context").Tag<import("xdg-effec
1569
676
  };
1570
677
  };
1571
678
  }>>;
1572
- declare const ReposetsCredentialsFile: import("effect/Context").Tag<import("xdg-effect").ConfigFileService<{
1573
- readonly profiles: {
1574
- readonly [x: string]: {
1575
- readonly github_token: string;
1576
- readonly op_service_account_token?: string | undefined;
1577
- readonly resolve?: {
1578
- readonly value?: {
1579
- readonly [x: string]: string | {
1580
- readonly [x: string]: unknown;
1581
- };
1582
- } | undefined;
1583
- readonly file?: {
1584
- readonly [x: string]: string;
1585
- } | undefined;
1586
- readonly op?: {
1587
- readonly [x: string]: string;
1588
- } | undefined;
1589
- } | undefined;
1590
- };
1591
- };
1592
- }>, import("xdg-effect").ConfigFileService<{
1593
- readonly profiles: {
1594
- readonly [x: string]: {
1595
- readonly github_token: string;
1596
- readonly op_service_account_token?: string | undefined;
1597
- readonly resolve?: {
1598
- readonly value?: {
1599
- readonly [x: string]: string | {
1600
- readonly [x: string]: unknown;
1601
- };
1602
- } | undefined;
1603
- readonly file?: {
1604
- readonly [x: string]: string;
1605
- } | undefined;
1606
- readonly op?: {
1607
- readonly [x: string]: string;
1608
- } | undefined;
1609
- } | undefined;
1610
- };
1611
- };
1612
- }>>;
1613
679
  /**
1614
- * Validates all internal cross-references in a parsed config. Checks that
1615
- * every group's settings, secrets, variables, rulesets, and environments
1616
- * references point to defined top-level sections, and that environment-scoped
1617
- * secret/variable groups reference defined environments. Collects ALL errors
1618
- * into a single ConfigError.
680
+ * Service identity for the parsed `reposets.config.toml`.
681
+ *
682
+ * @public
1619
683
  */
1620
- declare function validateConfigRefs(config: Config): Effect.Effect<Config, ConfigError>;
684
+ declare class ReposetsConfigFile extends ReposetsConfigFile_base {}
685
+ declare const ConfigFlagNotFound_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
686
+ readonly _tag: "ConfigFlagNotFound";
687
+ } & Readonly<A>;
1621
688
  /**
1622
- * Creates a live Layer providing both config and credentials file services.
1623
- * When configFlag is Some and points to a directory, prepends StaticDir resolver.
1624
- * When configFlag is Some and points to a file, prepends ExplicitPath resolver.
1625
- * Always includes UpwardWalk + XdgConfigResolver as fallback resolvers.
1626
- * Passes validateConfigRefs as the validate callback on the config spec.
689
+ * Raised when `--config` names a path that does not exist.
690
+ *
691
+ * @remarks
692
+ * Config discovery is best-effort by contract every `ConfigResolver` has
693
+ * `never` in its error channel so a resolver that finds nothing falls through
694
+ * to the next tier. That is right for a probe and wrong for an explicit request:
695
+ * `--config /nope.toml` would otherwise load the XDG config instead. The
696
+ * distinction is enforced here rather than pushed into the resolver contract.
697
+ *
698
+ * @public
1627
699
  */
1628
- declare function makeConfigFilesLive(configFlag: Option.Option<string>): import("effect/Layer").Layer<import("xdg-effect").ConfigFileService<any> | import("xdg-effect").AppDirs | import("xdg-effect").XdgResolver, never, import("@effect/platform/FileSystem").FileSystem>;
700
+ declare class ConfigFlagNotFound extends ConfigFlagNotFound_base<{
701
+ readonly path: string;
702
+ }> {
703
+ /**
704
+ * @remarks
705
+ * Without this, the class renders as a bare `ConfigFlagNotFound:` and the
706
+ * `path` never reaches the log line. The kit does the same on its own errors.
707
+ */
708
+ get message(): string;
709
+ }
1629
710
  /**
1630
- * Default ConfigFiles layer with no --config flag override.
1631
- * Used by CLI entrypoint when no flag is provided.
711
+ * Builds the config-file layer for one invocation's `--config` flag.
712
+ *
713
+ * @remarks
714
+ * Mints a fresh layer per call, so bind the result once per run rather than
715
+ * inlining it at two provide sites.
716
+ *
717
+ * @public
1632
718
  */
1633
- declare const ConfigFilesLive: import("effect/Layer").Layer<import("xdg-effect").ConfigFileService<any> | import("xdg-effect").AppDirs | import("xdg-effect").XdgResolver, never, import("@effect/platform/FileSystem").FileSystem>;
1634
- //#endregion
1635
- //#region src/services/OnePasswordClient.d.ts
1636
- interface OnePasswordClientService {
1637
- readonly resolve: (reference: string, serviceAccountToken: string) => Effect.Effect<string, OnePasswordError>;
1638
- }
1639
- declare const OnePasswordClient_base: Context.TagClass<OnePasswordClient, "OnePasswordClient", OnePasswordClientService>;
1640
- declare class OnePasswordClient extends OnePasswordClient_base {}
1641
- declare const OnePasswordClientLive: Layer.Layer<OnePasswordClient, never, never>;
1642
- declare function OnePasswordClientTest(stubs: Record<string, string>): Layer.Layer<OnePasswordClient>;
1643
- //#endregion
1644
- //#region src/services/CredentialResolver.d.ts
1645
- interface CredentialResolverService {
1646
- readonly resolveAll: (profile: CredentialProfile, basePath: string) => Effect.Effect<Map<string, string>, ResolveError>;
1647
- }
1648
- declare const CredentialResolver_base: Context.TagClass<CredentialResolver, "CredentialResolver", CredentialResolverService>;
1649
- declare class CredentialResolver extends CredentialResolver_base {}
1650
- declare const CredentialResolverLive: Layer.Layer<CredentialResolver, never, OnePasswordClient>;
1651
- //#endregion
1652
- //#region src/services/GitHubClient.d.ts
1653
- type SecretScope = "actions" | "dependabot" | "codespaces";
1654
- interface SecretInfo {
1655
- name: string;
1656
- }
1657
- interface VariableInfo {
1658
- name: string;
1659
- }
1660
- interface RulesetInfo {
1661
- name: string;
1662
- id: number;
1663
- source_type?: string | undefined;
1664
- }
1665
- interface EnvironmentInfo {
1666
- name: string;
1667
- }
1668
- type OwnerType = "User" | "Organization";
1669
- interface GitHubClientService {
1670
- readonly getOwnerType: (owner: string) => Effect.Effect<OwnerType, GitHubApiError>;
1671
- readonly syncSecret: (owner: string, repo: string, name: string, value: string, scope: SecretScope) => Effect.Effect<void, GitHubApiError>;
1672
- readonly syncVariable: (owner: string, repo: string, name: string, value: string) => Effect.Effect<void, GitHubApiError>;
1673
- readonly syncSettings: (owner: string, repo: string, settings: Record<string, unknown>) => Effect.Effect<void, GitHubApiError>;
1674
- readonly syncRuleset: (owner: string, repo: string, name: string, payload: RulesetPayload) => Effect.Effect<void, GitHubApiError>;
1675
- readonly listSecrets: (owner: string, repo: string, scope: SecretScope) => Effect.Effect<SecretInfo[], GitHubApiError>;
1676
- readonly listVariables: (owner: string, repo: string) => Effect.Effect<VariableInfo[], GitHubApiError>;
1677
- readonly listRulesets: (owner: string, repo: string) => Effect.Effect<RulesetInfo[], GitHubApiError>;
1678
- readonly deleteSecret: (owner: string, repo: string, name: string, scope: SecretScope) => Effect.Effect<void, GitHubApiError>;
1679
- readonly deleteVariable: (owner: string, repo: string, name: string) => Effect.Effect<void, GitHubApiError>;
1680
- readonly deleteRuleset: (owner: string, repo: string, rulesetId: number) => Effect.Effect<void, GitHubApiError>;
1681
- readonly syncEnvironment: (owner: string, repo: string, name: string, config: Record<string, unknown>) => Effect.Effect<void, GitHubApiError>;
1682
- readonly syncEnvironmentSecret: (owner: string, repo: string, envName: string, name: string, value: string) => Effect.Effect<void, GitHubApiError>;
1683
- readonly syncEnvironmentVariable: (owner: string, repo: string, envName: string, name: string, value: string) => Effect.Effect<void, GitHubApiError>;
1684
- readonly listEnvironments: (owner: string, repo: string) => Effect.Effect<EnvironmentInfo[], GitHubApiError>;
1685
- readonly listEnvironmentSecrets: (owner: string, repo: string, envName: string) => Effect.Effect<SecretInfo[], GitHubApiError>;
1686
- readonly listEnvironmentVariables: (owner: string, repo: string, envName: string) => Effect.Effect<VariableInfo[], GitHubApiError>;
1687
- readonly deleteEnvironment: (owner: string, repo: string, name: string) => Effect.Effect<void, GitHubApiError>;
1688
- readonly deleteEnvironmentSecret: (owner: string, repo: string, envName: string, name: string) => Effect.Effect<void, GitHubApiError>;
1689
- readonly deleteEnvironmentVariable: (owner: string, repo: string, envName: string, name: string) => Effect.Effect<void, GitHubApiError>;
1690
- readonly getVulnerabilityAlerts: (owner: string, repo: string) => Effect.Effect<boolean, GitHubApiError>;
1691
- readonly setVulnerabilityAlerts: (owner: string, repo: string, enabled: boolean) => Effect.Effect<void, GitHubApiError>;
1692
- readonly getAutomatedSecurityFixes: (owner: string, repo: string) => Effect.Effect<boolean, GitHubApiError>;
1693
- readonly setAutomatedSecurityFixes: (owner: string, repo: string, enabled: boolean) => Effect.Effect<void, GitHubApiError>;
1694
- readonly getPrivateVulnerabilityReporting: (owner: string, repo: string) => Effect.Effect<boolean, GitHubApiError>;
1695
- readonly setPrivateVulnerabilityReporting: (owner: string, repo: string, enabled: boolean) => Effect.Effect<void, GitHubApiError>;
1696
- readonly updateCodeScanningDefaultSetup: (owner: string, repo: string, config: CodeScanningGroup) => Effect.Effect<void, GitHubApiError>;
1697
- readonly listRepoLanguages: (owner: string, repo: string) => Effect.Effect<ReadonlyArray<string>, GitHubApiError>;
1698
- readonly resolveTeamId: (org: string, slug: string) => Effect.Effect<number, GitHubApiError>;
1699
- readonly resolveRoleId: (org: string, name: string) => Effect.Effect<number, GitHubApiError>;
1700
- }
1701
- declare const GitHubClient_base: Context.TagClass<GitHubClient, "GitHubClient", GitHubClientService>;
1702
- declare class GitHubClient extends GitHubClient_base {}
1703
- declare function GitHubClientLive(token: string): Layer.Layer<GitHubClient>;
1704
- interface RecordedCall {
1705
- method: string;
1706
- args: Record<string, unknown>;
1707
- }
1708
- declare function GitHubClientTest(): {
1709
- layer: Layer.Layer<GitHubClient>;
1710
- calls: () => RecordedCall[];
1711
- };
1712
- //#endregion
1713
- //#region src/services/SyncLogger.d.ts
1714
- interface SyncLoggerService {
1715
- readonly groupStart: (name: string, repoCount: number) => Effect.Effect<void>;
1716
- readonly repoStart: (owner: string, repo: string) => Effect.Effect<void>;
1717
- readonly repoSkip: (owner: string, repo: string, reason: string) => Effect.Effect<void>;
1718
- readonly syncSummary: (resource: "secret" | "variable" | "ruleset" | "environment" | "security feature" | "code scanning", count: number, detail: string) => Effect.Effect<void>;
1719
- readonly settingsApplied: () => Effect.Effect<void>;
1720
- readonly cleanupSummary: (resource: string, count: number, names: string[]) => Effect.Effect<void>;
1721
- readonly syncOperation: (verb: "sync" | "apply" | "delete" | "skip", resource: string, name: string, detail?: string, source?: string) => Effect.Effect<void>;
1722
- readonly syncError: (context: string, message: string) => Effect.Effect<void>;
1723
- readonly finish: () => Effect.Effect<void>;
1724
- }
1725
- declare const SyncLogger_base: Context.TagClass<SyncLogger, "SyncLogger", SyncLoggerService>;
1726
- declare class SyncLogger extends SyncLogger_base {}
1727
- interface SyncLoggerConfig {
1728
- readonly dryRun: boolean;
1729
- readonly logLevel: LogLevel;
1730
- readonly output?: Ref.Ref<string[]>;
1731
- }
1732
- declare function SyncLoggerLive(config: SyncLoggerConfig): Layer.Layer<SyncLogger>;
1733
- //#endregion
1734
- //#region src/services/SyncEngine.d.ts
1735
- interface SyncOptions {
1736
- readonly dryRun: boolean;
1737
- readonly noCleanup: boolean;
1738
- readonly groupFilter?: string | undefined;
1739
- readonly repoFilter?: string | undefined;
1740
- readonly configDir: string;
1741
- }
1742
- interface SyncEngineService {
1743
- readonly syncAll: (config: Config, credentials: Credentials, options: SyncOptions) => Effect.Effect<void, SyncError>;
1744
- }
1745
- declare const SyncEngine_base: Context.TagClass<SyncEngine, "SyncEngine", SyncEngineService>;
1746
- declare class SyncEngine extends SyncEngine_base {}
1747
- declare const SyncEngineLive: Layer.Layer<SyncEngine, never, GitHubClient | SyncLogger | CredentialResolver>;
719
+ declare const makeConfigFilesLive: (configFlag: string | undefined) => Layer.Layer<ReposetsConfigFile, ConfigFlagNotFound, FileSystem.FileSystem | Path.Path | AppDirs | Xdg>;
1748
720
  //#endregion
1749
- export { AppDirs, type BypassActor, BypassActorSchema, CONFIG_FILENAME, CREDENTIALS_FILENAME, type Cleanup, CleanupSchema, type CleanupScope, CleanupScopeSchema, type Config, ConfigFile, ConfigFilesLive, ConfigSchema, type CredentialProfile, CredentialProfileSchema, CredentialResolver, CredentialResolverLive, type Credentials, CredentialsSchema, GitHubApiError, GitHubClient, GitHubClientLive, GitHubClientTest, type Group, GroupSchema, type LogLevel, LogLevelSchema, OnePasswordClient, OnePasswordClientLive, OnePasswordClientTest, OnePasswordError, type RecordedCall, ReposetsConfigFile, ReposetsCredentialsFile, ResolveError, type ResolveSection, ResolveSectionSchema, type ResolvedRef, ResolvedRefSchema, type Ruleset, type RulesetPayload, RulesetSchema, type SecretGroup, SecretGroupSchema, SyncEngine, SyncEngineLive, SyncError, SyncLogger, type SyncLoggerConfig, SyncLoggerLive, type VariableGroup, VariableGroupSchema, XdgConfigError, buildRulesetPayload, encryptSecret, makeConfigFilesLive, validateConfigRefs };
721
+ export { CONFIG_FILENAME, type Config, ConfigFlagNotFound, ConfigSchema, ReposetsConfigFile, makeConfigFilesLive };
1750
722
  //# sourceMappingURL=index.d.ts.map