reposets 0.4.2 → 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 (54) 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 +364 -91
  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 +471 -1499
  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/bin/reposets.d.ts +0 -1
  51. package/errors.js +0 -12
  52. package/lib/crypto.js +0 -27
  53. package/services/GitHubClient.js +0 -875
  54. package/services/SyncEngine.js +0 -580
package/index.d.ts CHANGED
@@ -1,1240 +1,378 @@
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.
6
+ *
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.
35
11
  *
36
- * The sealed box format is: ephemeral_public_key (32 bytes) || ciphertext
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[];
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">;
427
141
  }>;
428
- exclude: Schema.optionalWith<Schema.Array$<typeof Schema.String>, {
429
- default: () => never[];
430
- }>;
431
- }>>;
432
- }>>;
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>;
436
- }>]>>;
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
- }>;
441
- }>>>;
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>;
451
- }>, Schema.Struct<{
452
- exclude: Schema.SchemaClass<string, string, never>;
453
- }>]>>]>>;
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>;
459
- }>]>>;
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>;
464
- }>]>>;
465
- }>>;
142
+ }>>>;
466
143
  }>>;
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>>;
472
- }>>>;
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>>;
478
- }>>>;
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>>;
484
- }>>>;
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>;
494
- }>>>;
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
- }>;
500
- }>>]>>;
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>>>;
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;
543
152
  }>>;
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>>>;
153
+ readonly copilot_review: Schema.optional<Schema.Struct<{
154
+ readonly draft_prs: Schema.optional<Schema.Boolean>;
155
+ readonly on_push: Schema.optional<Schema.Boolean>;
547
156
  }>>;
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
- }>;
608
- }>>;
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>>]>>>;
638
- }>>;
639
- }>>, {
640
- default: () => {};
641
- }>;
642
- }>;
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
- }>;
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"]>;
686
161
  }>>>;
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
- }>;
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>;
171
+ }>>;
733
172
  }>>;
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>;
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
+ }>>>;
753
179
  }>, 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
- }>;
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
+ }>>;
805
187
  }>>;
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>;
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;
838
191
  }>]>>;
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
- /**
871
- * Builds an API-compatible ruleset payload from the config-level Ruleset.
872
- * Converts all shorthand fields into the GitHub API rules array format.
873
- */
874
- declare function buildRulesetPayload(ruleset: Ruleset): RulesetPayload;
875
- //#endregion
876
- //#region src/services/ConfigFiles.d.ts
877
- 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 environments: {
881
- readonly [x: string]: {
882
- readonly reviewers?: readonly {
883
- readonly type: "Team" | "User";
884
- readonly id: number;
885
- }[] | undefined;
886
- readonly wait_timer?: number | undefined;
887
- readonly prevent_self_review?: boolean | undefined;
888
- readonly deployment_branches?: "all" | "protected" | readonly {
889
- readonly name: string;
890
- readonly type: "branch" | "tag";
891
- }[] | undefined;
892
- };
893
- };
894
- readonly secrets: {
895
- readonly [x: string]: {
896
- readonly file: {
897
- readonly [x: string]: string;
898
- };
899
- } | {
900
- readonly value: {
901
- readonly [x: string]: string | {
902
- readonly [x: string]: unknown;
903
- };
904
- };
905
- } | {
906
- readonly resolved: {
907
- readonly [x: string]: string;
908
- };
909
- };
910
- };
911
- readonly variables: {
912
- readonly [x: string]: {
913
- readonly file: {
914
- readonly [x: string]: string;
915
- };
916
- } | {
917
- readonly value: {
918
- readonly [x: string]: string | {
919
- readonly [x: string]: unknown;
920
- };
921
- };
922
- } | {
923
- readonly resolved: {
924
- readonly [x: string]: string;
925
- };
926
- };
927
- };
928
- readonly rulesets: {
929
- readonly [x: string]: {
930
- readonly name: string;
931
- readonly code_scanning?: readonly {
932
- readonly tool: string;
933
- readonly alerts: "all" | "none" | "errors" | "errors_and_warnings";
934
- readonly security_alerts: "all" | "none" | "critical" | "high_or_higher" | "medium_or_higher";
935
- }[] | undefined;
936
- readonly type: "branch";
937
- readonly pull_requests?: {
938
- readonly approvals: number;
939
- readonly dismiss_stale_reviews: boolean;
940
- readonly code_owner_review: boolean;
941
- readonly last_push_approval: boolean;
942
- readonly resolve_threads: boolean;
943
- readonly merge_methods?: readonly ("merge" | "squash" | "rebase")[] | undefined;
944
- readonly reviewers?: readonly {
945
- readonly file_patterns: readonly string[];
946
- readonly minimum_approvals: number;
947
- readonly reviewer: {
948
- readonly type: "Team";
949
- readonly id: number;
950
- };
951
- }[] | undefined;
952
- } | undefined;
953
- readonly merge_queue?: {
954
- readonly check_timeout: number;
955
- readonly grouping: "ALLGREEN" | "HEADGREEN";
956
- readonly max_build: number;
957
- readonly max_merge: number;
958
- readonly merge_method: "MERGE" | "SQUASH" | "REBASE";
959
- readonly min_merge: number;
960
- readonly min_wait: number;
961
- } | undefined;
962
- readonly copilot_review?: {
963
- readonly draft_prs?: boolean | undefined;
964
- readonly on_push?: boolean | undefined;
965
- } | undefined;
966
- readonly workflows?: {
967
- readonly on_creation?: boolean | undefined;
968
- readonly required: readonly {
969
- readonly path: string;
970
- readonly ref?: string | undefined;
971
- readonly repository_id: number | {
972
- readonly resolved: string;
973
- };
974
- readonly sha?: string | undefined;
975
- }[];
976
- } | undefined;
977
- readonly branch_name?: readonly {
978
- readonly name?: string | undefined;
979
- readonly operator: "starts_with" | "ends_with" | "contains" | "regex";
980
- readonly pattern: string;
981
- readonly negate?: boolean | undefined;
982
- }[] | undefined;
983
- readonly enforcement: "disabled" | "active" | "evaluate";
984
- readonly conditions?: {
985
- readonly ref_name?: {
986
- readonly include: readonly string[];
987
- readonly exclude: readonly string[];
988
- } | undefined;
989
- } | undefined;
990
- readonly bypass_actors?: readonly {
991
- readonly actor_id?: number | {
992
- readonly resolved: string;
993
- } | undefined;
994
- readonly actor_type: "Integration" | "OrganizationAdmin" | "RepositoryRole" | "Team" | "DeployKey";
995
- readonly bypass_mode: "always" | "pull_request" | "exempt";
996
- }[] | undefined;
997
- readonly creation?: boolean | undefined;
998
- readonly update?: boolean | undefined;
999
- readonly deletion?: boolean | undefined;
1000
- readonly required_linear_history?: boolean | undefined;
1001
- readonly required_signatures?: boolean | undefined;
1002
- readonly non_fast_forward?: boolean | undefined;
1003
- readonly deployments?: readonly string[] | undefined;
1004
- readonly targets?: "default" | "all" | readonly ({
1005
- readonly include: string;
1006
- } | {
1007
- readonly exclude: string;
1008
- })[] | undefined;
1009
- readonly status_checks?: {
1010
- readonly update_branch?: boolean | undefined;
1011
- readonly on_creation?: boolean | undefined;
1012
- readonly default_integration_id?: number | {
1013
- readonly resolved: string;
1014
- } | undefined;
1015
- readonly required: readonly {
1016
- readonly context: string;
1017
- readonly integration_id?: number | {
1018
- readonly resolved: string;
1019
- } | undefined;
1020
- }[];
1021
- } | undefined;
1022
- readonly commit_message?: readonly {
1023
- readonly name?: string | undefined;
1024
- readonly operator: "starts_with" | "ends_with" | "contains" | "regex";
1025
- readonly pattern: string;
1026
- readonly negate?: boolean | undefined;
1027
- }[] | undefined;
1028
- readonly commit_author_email?: readonly {
1029
- readonly name?: string | undefined;
1030
- readonly operator: "starts_with" | "ends_with" | "contains" | "regex";
1031
- readonly pattern: string;
1032
- readonly negate?: boolean | undefined;
1033
- }[] | undefined;
1034
- readonly committer_email?: readonly {
1035
- readonly name?: string | undefined;
1036
- readonly operator: "starts_with" | "ends_with" | "contains" | "regex";
1037
- readonly pattern: string;
1038
- readonly negate?: boolean | undefined;
1039
- }[] | undefined;
1040
- } | {
1041
- readonly name: string;
1042
- readonly type: "tag";
1043
- readonly enforcement: "disabled" | "active" | "evaluate";
1044
- readonly conditions?: {
1045
- readonly ref_name?: {
1046
- readonly include: readonly string[];
1047
- readonly exclude: readonly string[];
1048
- } | undefined;
1049
- } | undefined;
1050
- readonly bypass_actors?: readonly {
1051
- readonly actor_id?: number | {
1052
- readonly resolved: string;
1053
- } | undefined;
1054
- readonly actor_type: "Integration" | "OrganizationAdmin" | "RepositoryRole" | "Team" | "DeployKey";
1055
- readonly bypass_mode: "always" | "pull_request" | "exempt";
1056
- }[] | undefined;
1057
- readonly creation?: boolean | undefined;
1058
- readonly update?: boolean | undefined;
1059
- readonly deletion?: boolean | undefined;
1060
- readonly required_linear_history?: boolean | undefined;
1061
- readonly required_signatures?: boolean | undefined;
1062
- readonly non_fast_forward?: boolean | undefined;
1063
- readonly deployments?: readonly string[] | undefined;
1064
- readonly targets?: "default" | "all" | readonly ({
1065
- readonly include: string;
1066
- } | {
1067
- readonly exclude: string;
1068
- })[] | undefined;
1069
- readonly status_checks?: {
1070
- readonly update_branch?: boolean | undefined;
1071
- readonly on_creation?: boolean | undefined;
1072
- readonly default_integration_id?: number | {
1073
- readonly resolved: string;
1074
- } | undefined;
1075
- readonly required: readonly {
1076
- readonly context: string;
1077
- readonly integration_id?: number | {
1078
- readonly resolved: string;
1079
- } | undefined;
1080
- }[];
1081
- } | undefined;
1082
- readonly commit_message?: readonly {
1083
- readonly name?: string | undefined;
1084
- readonly operator: "starts_with" | "ends_with" | "contains" | "regex";
1085
- readonly pattern: string;
1086
- readonly negate?: boolean | undefined;
1087
- }[] | undefined;
1088
- readonly commit_author_email?: readonly {
1089
- readonly name?: string | undefined;
1090
- readonly operator: "starts_with" | "ends_with" | "contains" | "regex";
1091
- readonly pattern: string;
1092
- readonly negate?: boolean | undefined;
1093
- }[] | undefined;
1094
- readonly committer_email?: readonly {
1095
- readonly name?: string | undefined;
1096
- readonly operator: "starts_with" | "ends_with" | "contains" | "regex";
1097
- readonly pattern: string;
1098
- readonly negate?: boolean | undefined;
1099
- }[] | undefined;
1100
- readonly tag_name?: readonly {
1101
- readonly name?: string | undefined;
1102
- readonly operator: "starts_with" | "ends_with" | "contains" | "regex";
1103
- readonly pattern: string;
1104
- readonly negate?: boolean | undefined;
1105
- }[] | undefined;
1106
- };
1107
- };
1108
- readonly owner?: string | undefined;
1109
- readonly settings: {
1110
- readonly [x: string]: {
1111
- readonly [x: string]: unknown;
1112
- readonly is_template?: boolean | undefined;
1113
- readonly has_wiki?: boolean | undefined;
1114
- readonly has_issues?: boolean | undefined;
1115
- readonly has_projects?: boolean | undefined;
1116
- readonly has_discussions?: boolean | undefined;
1117
- readonly has_sponsorships?: boolean | undefined;
1118
- readonly has_pull_requests?: boolean | undefined;
1119
- readonly allow_forking?: boolean | undefined;
1120
- readonly allow_merge_commit?: boolean | undefined;
1121
- readonly allow_squash_merge?: boolean | undefined;
1122
- readonly allow_rebase_merge?: boolean | undefined;
1123
- readonly allow_auto_merge?: boolean | undefined;
1124
- readonly allow_update_branch?: boolean | undefined;
1125
- readonly squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE" | undefined;
1126
- readonly squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK" | undefined;
1127
- readonly merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE" | undefined;
1128
- readonly merge_commit_message?: "PR_TITLE" | "PR_BODY" | "BLANK" | undefined;
1129
- readonly delete_branch_on_merge?: boolean | undefined;
1130
- readonly web_commit_signoff_required?: boolean | undefined;
1131
- readonly security_and_analysis?: {
1132
- readonly advanced_security?: "enabled" | "disabled" | undefined;
1133
- readonly code_security?: "enabled" | "disabled" | undefined;
1134
- readonly secret_scanning?: "enabled" | "disabled" | undefined;
1135
- readonly secret_scanning_push_protection?: "enabled" | "disabled" | undefined;
1136
- readonly secret_scanning_ai_detection?: "enabled" | "disabled" | undefined;
1137
- readonly secret_scanning_non_provider_patterns?: "enabled" | "disabled" | undefined;
1138
- readonly secret_scanning_delegated_alert_dismissal?: "enabled" | "disabled" | undefined;
1139
- readonly secret_scanning_delegated_bypass?: "enabled" | "disabled" | undefined;
1140
- readonly delegated_bypass_reviewers?: readonly ({
1141
- readonly team: string;
1142
- readonly mode?: "ALWAYS" | "EXEMPT" | undefined;
1143
- } | {
1144
- readonly mode?: "ALWAYS" | "EXEMPT" | undefined;
1145
- readonly role: string;
1146
- })[] | undefined;
1147
- readonly dependabot_security_updates?: "enabled" | "disabled" | undefined;
1148
- } | undefined;
1149
- };
1150
- };
1151
- readonly security: {
1152
- readonly [x: string]: {
1153
- readonly vulnerability_alerts?: boolean | undefined;
1154
- readonly automated_security_fixes?: boolean | undefined;
1155
- readonly private_vulnerability_reporting?: boolean | undefined;
1156
- };
1157
- };
1158
- readonly code_scanning: {
1159
- readonly [x: string]: {
1160
- readonly state?: "configured" | "not-configured" | undefined;
1161
- readonly languages?: readonly ("actions" | "c-cpp" | "csharp" | "go" | "java-kotlin" | "javascript-typescript" | "python" | "ruby" | "swift")[] | undefined;
1162
- readonly query_suite?: "default" | "extended" | undefined;
1163
- readonly threat_model?: "remote" | "remote_and_local" | undefined;
1164
- readonly runner_type?: "standard" | "labeled" | undefined;
1165
- readonly runner_label?: string | undefined;
1166
- };
1167
- };
1168
- readonly log_level: "silent" | "info" | "verbose" | "debug";
1169
- readonly groups: {
1170
- readonly [x: string]: {
1171
- readonly environments?: readonly string[] | undefined;
1172
- readonly secrets?: {
1173
- readonly actions?: readonly string[] | undefined;
1174
- readonly dependabot?: readonly string[] | undefined;
1175
- readonly codespaces?: readonly string[] | undefined;
1176
- readonly environments?: {
1177
- readonly [x: string]: readonly string[];
1178
- } | undefined;
1179
- } | undefined;
1180
- readonly variables?: {
1181
- readonly actions?: readonly string[] | undefined;
1182
- readonly environments?: {
1183
- readonly [x: string]: readonly string[];
1184
- } | undefined;
1185
- } | undefined;
1186
- readonly rulesets?: readonly string[] | undefined;
1187
- readonly owner?: string | undefined;
1188
- readonly repos: readonly string[];
1189
- readonly credentials?: string | undefined;
1190
- readonly settings?: readonly string[] | undefined;
1191
- readonly security?: readonly string[] | undefined;
1192
- readonly code_scanning?: readonly string[] | undefined;
1193
- readonly cleanup?: {
1194
- readonly environments: boolean | {
1195
- readonly preserve: readonly string[];
1196
- };
1197
- readonly secrets: {
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
- readonly environments: boolean | {
1208
- readonly preserve: readonly string[];
1209
- };
1210
- };
1211
- readonly variables: {
1212
- readonly actions: boolean | {
1213
- readonly preserve: readonly string[];
1214
- };
1215
- readonly environments: boolean | {
1216
- readonly preserve: readonly string[];
1217
- };
1218
- };
1219
- readonly rulesets: boolean | {
1220
- readonly preserve: readonly string[];
1221
- };
1222
- } | undefined;
1223
- };
1224
- };
1225
- }>, import("xdg-effect").ConfigFileService<{
1226
- readonly environments: {
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>;
194
+ }>>>;
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;
204
+ }>, Schema.Struct<{
205
+ readonly exclude: Schema.String;
206
+ }>]>>]>>;
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;
212
+ }>]>>;
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;
217
+ }>]>>;
218
+ }>>;
219
+ }>>;
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>;
231
+ }>>>;
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>;
237
+ }>>>;
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>;
244
+ }>>>;
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;
252
+ }>>>;
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>;
256
+ }>>]>>;
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>>>;
281
+ }>>;
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>>>;
285
+ }>>;
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>;
318
+ }>>;
319
+ }>>, never>;
320
+ }>;
321
+ /**
322
+ * The decoded shape of {@link ConfigSchema}.
323
+ *
324
+ * @public
325
+ */
326
+ type Config = typeof ConfigSchema.Type;
327
+ //#endregion
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
+ */
334
+ declare const CONFIG_FILENAME = "reposets.config.toml";
335
+ declare const ReposetsConfigFile_base: import("effect/Context").ServiceClass<ReposetsConfigFile, "reposets/Config", import("@effected/config-file").ConfigFileShape<{
336
+ readonly settings: {
1227
337
  readonly [x: string]: {
1228
- readonly reviewers?: readonly {
1229
- readonly type: "Team" | "User";
1230
- readonly id: number;
1231
- }[] | undefined;
1232
- readonly wait_timer?: number | undefined;
1233
- readonly prevent_self_review?: boolean | undefined;
1234
- readonly deployment_branches?: "all" | "protected" | readonly {
1235
- readonly name: string;
1236
- readonly type: "branch" | "tag";
1237
- }[] | undefined;
338
+ readonly [x: string]: import("effect/Schema").Json;
339
+ readonly is_template?: boolean | undefined;
340
+ readonly has_wiki?: boolean | undefined;
341
+ readonly has_issues?: boolean | undefined;
342
+ readonly has_projects?: boolean | undefined;
343
+ readonly has_discussions?: boolean | undefined;
344
+ readonly has_sponsorships?: boolean | undefined;
345
+ readonly has_pull_requests?: boolean | undefined;
346
+ readonly allow_forking?: boolean | undefined;
347
+ readonly allow_merge_commit?: boolean | undefined;
348
+ readonly allow_squash_merge?: boolean | undefined;
349
+ readonly allow_rebase_merge?: boolean | undefined;
350
+ readonly allow_auto_merge?: boolean | undefined;
351
+ readonly allow_update_branch?: boolean | 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;
356
+ readonly delete_branch_on_merge?: boolean | undefined;
357
+ readonly web_commit_signoff_required?: boolean | undefined;
358
+ readonly security_and_analysis?: {
359
+ readonly advanced_security?: "disabled" | "enabled" | undefined;
360
+ readonly code_security?: "disabled" | "enabled" | undefined;
361
+ readonly secret_scanning?: "disabled" | "enabled" | undefined;
362
+ readonly secret_scanning_push_protection?: "disabled" | "enabled" | undefined;
363
+ readonly secret_scanning_ai_detection?: "disabled" | "enabled" | undefined;
364
+ readonly secret_scanning_non_provider_patterns?: "disabled" | "enabled" | undefined;
365
+ readonly secret_scanning_delegated_alert_dismissal?: "disabled" | "enabled" | undefined;
366
+ readonly secret_scanning_delegated_bypass?: "disabled" | "enabled" | undefined;
367
+ readonly delegated_bypass_reviewers?: readonly ({
368
+ readonly team: string;
369
+ readonly mode?: "ALWAYS" | "EXEMPT" | undefined;
370
+ } | {
371
+ readonly role: string;
372
+ readonly mode?: "ALWAYS" | "EXEMPT" | undefined;
373
+ })[] | undefined;
374
+ readonly dependabot_security_updates?: "disabled" | "enabled" | undefined;
375
+ } | undefined;
1238
376
  };
1239
377
  };
1240
378
  readonly secrets: {
@@ -1245,7 +383,7 @@ declare const ReposetsConfigFile: import("effect/Context").Tag<import("xdg-effec
1245
383
  } | {
1246
384
  readonly value: {
1247
385
  readonly [x: string]: string | {
1248
- readonly [x: string]: unknown;
386
+ readonly [x: string]: import("effect/Schema").Json;
1249
387
  };
1250
388
  };
1251
389
  } | {
@@ -1262,7 +400,7 @@ declare const ReposetsConfigFile: import("effect/Context").Tag<import("xdg-effec
1262
400
  } | {
1263
401
  readonly value: {
1264
402
  readonly [x: string]: string | {
1265
- readonly [x: string]: unknown;
403
+ readonly [x: string]: import("effect/Schema").Json;
1266
404
  };
1267
405
  };
1268
406
  } | {
@@ -1274,59 +412,7 @@ declare const ReposetsConfigFile: import("effect/Context").Tag<import("xdg-effec
1274
412
  readonly rulesets: {
1275
413
  readonly [x: string]: {
1276
414
  readonly name: string;
1277
- readonly code_scanning?: readonly {
1278
- readonly tool: string;
1279
- readonly alerts: "all" | "none" | "errors" | "errors_and_warnings";
1280
- readonly security_alerts: "all" | "none" | "critical" | "high_or_higher" | "medium_or_higher";
1281
- }[] | undefined;
1282
- readonly type: "branch";
1283
- readonly pull_requests?: {
1284
- readonly approvals: number;
1285
- readonly dismiss_stale_reviews: boolean;
1286
- readonly code_owner_review: boolean;
1287
- readonly last_push_approval: boolean;
1288
- readonly resolve_threads: boolean;
1289
- readonly merge_methods?: readonly ("merge" | "squash" | "rebase")[] | undefined;
1290
- readonly reviewers?: readonly {
1291
- readonly file_patterns: readonly string[];
1292
- readonly minimum_approvals: number;
1293
- readonly reviewer: {
1294
- readonly type: "Team";
1295
- readonly id: number;
1296
- };
1297
- }[] | undefined;
1298
- } | undefined;
1299
- readonly merge_queue?: {
1300
- readonly check_timeout: number;
1301
- readonly grouping: "ALLGREEN" | "HEADGREEN";
1302
- readonly max_build: number;
1303
- readonly max_merge: number;
1304
- readonly merge_method: "MERGE" | "SQUASH" | "REBASE";
1305
- readonly min_merge: number;
1306
- readonly min_wait: number;
1307
- } | undefined;
1308
- readonly copilot_review?: {
1309
- readonly draft_prs?: boolean | undefined;
1310
- readonly on_push?: boolean | undefined;
1311
- } | undefined;
1312
- readonly workflows?: {
1313
- readonly on_creation?: boolean | undefined;
1314
- readonly required: readonly {
1315
- readonly path: string;
1316
- readonly ref?: string | undefined;
1317
- readonly repository_id: number | {
1318
- readonly resolved: string;
1319
- };
1320
- readonly sha?: string | undefined;
1321
- }[];
1322
- } | undefined;
1323
- readonly branch_name?: readonly {
1324
- readonly name?: string | undefined;
1325
- readonly operator: "starts_with" | "ends_with" | "contains" | "regex";
1326
- readonly pattern: string;
1327
- readonly negate?: boolean | undefined;
1328
- }[] | undefined;
1329
- readonly enforcement: "disabled" | "active" | "evaluate";
415
+ readonly enforcement: "active" | "disabled" | "evaluate";
1330
416
  readonly conditions?: {
1331
417
  readonly ref_name?: {
1332
418
  readonly include: readonly string[];
@@ -1337,8 +423,8 @@ declare const ReposetsConfigFile: import("effect/Context").Tag<import("xdg-effec
1337
423
  readonly actor_id?: number | {
1338
424
  readonly resolved: string;
1339
425
  } | undefined;
1340
- readonly actor_type: "Integration" | "OrganizationAdmin" | "RepositoryRole" | "Team" | "DeployKey";
1341
- readonly bypass_mode: "always" | "pull_request" | "exempt";
426
+ readonly actor_type: "DeployKey" | "Integration" | "OrganizationAdmin" | "RepositoryRole" | "Team";
427
+ readonly bypass_mode: "always" | "exempt" | "pull_request";
1342
428
  }[] | undefined;
1343
429
  readonly creation?: boolean | undefined;
1344
430
  readonly update?: boolean | undefined;
@@ -1347,7 +433,7 @@ declare const ReposetsConfigFile: import("effect/Context").Tag<import("xdg-effec
1347
433
  readonly required_signatures?: boolean | undefined;
1348
434
  readonly non_fast_forward?: boolean | undefined;
1349
435
  readonly deployments?: readonly string[] | undefined;
1350
- readonly targets?: "default" | "all" | readonly ({
436
+ readonly targets?: "all" | "default" | readonly ({
1351
437
  readonly include: string;
1352
438
  } | {
1353
439
  readonly exclude: string;
@@ -1366,27 +452,78 @@ declare const ReposetsConfigFile: import("effect/Context").Tag<import("xdg-effec
1366
452
  }[];
1367
453
  } | undefined;
1368
454
  readonly commit_message?: readonly {
1369
- readonly name?: string | undefined;
1370
- readonly operator: "starts_with" | "ends_with" | "contains" | "regex";
455
+ readonly operator: "contains" | "ends_with" | "regex" | "starts_with";
1371
456
  readonly pattern: string;
457
+ readonly name?: string | undefined;
1372
458
  readonly negate?: boolean | undefined;
1373
459
  }[] | undefined;
1374
460
  readonly commit_author_email?: readonly {
1375
- readonly name?: string | undefined;
1376
- readonly operator: "starts_with" | "ends_with" | "contains" | "regex";
461
+ readonly operator: "contains" | "ends_with" | "regex" | "starts_with";
1377
462
  readonly pattern: string;
463
+ readonly name?: string | undefined;
1378
464
  readonly negate?: boolean | undefined;
1379
465
  }[] | undefined;
1380
466
  readonly committer_email?: readonly {
467
+ readonly operator: "contains" | "ends_with" | "regex" | "starts_with";
468
+ readonly pattern: string;
1381
469
  readonly name?: string | undefined;
1382
- readonly operator: "starts_with" | "ends_with" | "contains" | "regex";
470
+ readonly negate?: boolean | undefined;
471
+ }[] | undefined;
472
+ readonly type: "branch";
473
+ readonly pull_requests?: {
474
+ readonly approvals: number;
475
+ readonly dismiss_stale_reviews: boolean;
476
+ readonly code_owner_review: boolean;
477
+ readonly last_push_approval: boolean;
478
+ readonly resolve_threads: boolean;
479
+ readonly merge_methods?: readonly ("merge" | "rebase" | "squash")[] | undefined;
480
+ readonly reviewers?: readonly {
481
+ readonly file_patterns: readonly string[];
482
+ readonly minimum_approvals: number;
483
+ readonly reviewer: {
484
+ readonly id: number;
485
+ readonly type: "Team";
486
+ };
487
+ }[] | undefined;
488
+ } | undefined;
489
+ readonly merge_queue?: {
490
+ readonly check_timeout: number;
491
+ readonly grouping: "ALLGREEN" | "HEADGREEN";
492
+ readonly max_build: number;
493
+ readonly max_merge: number;
494
+ readonly merge_method: "MERGE" | "REBASE" | "SQUASH";
495
+ readonly min_merge: number;
496
+ readonly min_wait: number;
497
+ } | undefined;
498
+ readonly copilot_review?: {
499
+ readonly draft_prs?: boolean | undefined;
500
+ readonly on_push?: boolean | undefined;
501
+ } | undefined;
502
+ readonly code_scanning?: readonly {
503
+ readonly tool: string;
504
+ readonly alerts: "all" | "errors" | "errors_and_warnings" | "none";
505
+ readonly security_alerts: "all" | "critical" | "high_or_higher" | "medium_or_higher" | "none";
506
+ }[] | undefined;
507
+ readonly workflows?: {
508
+ readonly on_creation?: boolean | undefined;
509
+ readonly required: readonly {
510
+ readonly path: string;
511
+ readonly ref?: string | undefined;
512
+ readonly repository_id: number | {
513
+ readonly resolved: string;
514
+ };
515
+ readonly sha?: string | undefined;
516
+ }[];
517
+ } | undefined;
518
+ readonly branch_name?: readonly {
519
+ readonly operator: "contains" | "ends_with" | "regex" | "starts_with";
1383
520
  readonly pattern: string;
521
+ readonly name?: string | undefined;
1384
522
  readonly negate?: boolean | undefined;
1385
523
  }[] | undefined;
1386
524
  } | {
1387
525
  readonly name: string;
1388
- readonly type: "tag";
1389
- readonly enforcement: "disabled" | "active" | "evaluate";
526
+ readonly enforcement: "active" | "disabled" | "evaluate";
1390
527
  readonly conditions?: {
1391
528
  readonly ref_name?: {
1392
529
  readonly include: readonly string[];
@@ -1397,8 +534,8 @@ declare const ReposetsConfigFile: import("effect/Context").Tag<import("xdg-effec
1397
534
  readonly actor_id?: number | {
1398
535
  readonly resolved: string;
1399
536
  } | undefined;
1400
- readonly actor_type: "Integration" | "OrganizationAdmin" | "RepositoryRole" | "Team" | "DeployKey";
1401
- readonly bypass_mode: "always" | "pull_request" | "exempt";
537
+ readonly actor_type: "DeployKey" | "Integration" | "OrganizationAdmin" | "RepositoryRole" | "Team";
538
+ readonly bypass_mode: "always" | "exempt" | "pull_request";
1402
539
  }[] | undefined;
1403
540
  readonly creation?: boolean | undefined;
1404
541
  readonly update?: boolean | undefined;
@@ -1407,7 +544,7 @@ declare const ReposetsConfigFile: import("effect/Context").Tag<import("xdg-effec
1407
544
  readonly required_signatures?: boolean | undefined;
1408
545
  readonly non_fast_forward?: boolean | undefined;
1409
546
  readonly deployments?: readonly string[] | undefined;
1410
- readonly targets?: "default" | "all" | readonly ({
547
+ readonly targets?: "all" | "default" | readonly ({
1411
548
  readonly include: string;
1412
549
  } | {
1413
550
  readonly exclude: string;
@@ -1426,72 +563,44 @@ declare const ReposetsConfigFile: import("effect/Context").Tag<import("xdg-effec
1426
563
  }[];
1427
564
  } | undefined;
1428
565
  readonly commit_message?: readonly {
1429
- readonly name?: string | undefined;
1430
- readonly operator: "starts_with" | "ends_with" | "contains" | "regex";
566
+ readonly operator: "contains" | "ends_with" | "regex" | "starts_with";
1431
567
  readonly pattern: string;
568
+ readonly name?: string | undefined;
1432
569
  readonly negate?: boolean | undefined;
1433
570
  }[] | undefined;
1434
571
  readonly commit_author_email?: readonly {
1435
- readonly name?: string | undefined;
1436
- readonly operator: "starts_with" | "ends_with" | "contains" | "regex";
572
+ readonly operator: "contains" | "ends_with" | "regex" | "starts_with";
1437
573
  readonly pattern: string;
574
+ readonly name?: string | undefined;
1438
575
  readonly negate?: boolean | undefined;
1439
576
  }[] | undefined;
1440
577
  readonly committer_email?: readonly {
1441
- readonly name?: string | undefined;
1442
- readonly operator: "starts_with" | "ends_with" | "contains" | "regex";
578
+ readonly operator: "contains" | "ends_with" | "regex" | "starts_with";
1443
579
  readonly pattern: string;
580
+ readonly name?: string | undefined;
1444
581
  readonly negate?: boolean | undefined;
1445
582
  }[] | undefined;
583
+ readonly type: "tag";
1446
584
  readonly tag_name?: readonly {
1447
- readonly name?: string | undefined;
1448
- readonly operator: "starts_with" | "ends_with" | "contains" | "regex";
585
+ readonly operator: "contains" | "ends_with" | "regex" | "starts_with";
1449
586
  readonly pattern: string;
587
+ readonly name?: string | undefined;
1450
588
  readonly negate?: boolean | undefined;
1451
589
  }[] | undefined;
1452
590
  };
1453
591
  };
1454
- readonly owner?: string | undefined;
1455
- readonly settings: {
592
+ readonly environments: {
1456
593
  readonly [x: string]: {
1457
- readonly [x: string]: unknown;
1458
- readonly is_template?: boolean | undefined;
1459
- readonly has_wiki?: boolean | undefined;
1460
- readonly has_issues?: boolean | undefined;
1461
- readonly has_projects?: boolean | undefined;
1462
- readonly has_discussions?: boolean | undefined;
1463
- readonly has_sponsorships?: boolean | undefined;
1464
- readonly has_pull_requests?: boolean | undefined;
1465
- readonly allow_forking?: boolean | undefined;
1466
- readonly allow_merge_commit?: boolean | undefined;
1467
- readonly allow_squash_merge?: boolean | undefined;
1468
- readonly allow_rebase_merge?: boolean | undefined;
1469
- readonly allow_auto_merge?: boolean | undefined;
1470
- readonly allow_update_branch?: boolean | undefined;
1471
- readonly squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE" | undefined;
1472
- readonly squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK" | undefined;
1473
- readonly merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE" | undefined;
1474
- readonly merge_commit_message?: "PR_TITLE" | "PR_BODY" | "BLANK" | undefined;
1475
- readonly delete_branch_on_merge?: boolean | undefined;
1476
- readonly web_commit_signoff_required?: boolean | undefined;
1477
- readonly security_and_analysis?: {
1478
- readonly advanced_security?: "enabled" | "disabled" | undefined;
1479
- readonly code_security?: "enabled" | "disabled" | undefined;
1480
- readonly secret_scanning?: "enabled" | "disabled" | undefined;
1481
- readonly secret_scanning_push_protection?: "enabled" | "disabled" | undefined;
1482
- readonly secret_scanning_ai_detection?: "enabled" | "disabled" | undefined;
1483
- readonly secret_scanning_non_provider_patterns?: "enabled" | "disabled" | undefined;
1484
- readonly secret_scanning_delegated_alert_dismissal?: "enabled" | "disabled" | undefined;
1485
- readonly secret_scanning_delegated_bypass?: "enabled" | "disabled" | undefined;
1486
- readonly delegated_bypass_reviewers?: readonly ({
1487
- readonly team: string;
1488
- readonly mode?: "ALWAYS" | "EXEMPT" | undefined;
1489
- } | {
1490
- readonly mode?: "ALWAYS" | "EXEMPT" | undefined;
1491
- readonly role: string;
1492
- })[] | undefined;
1493
- readonly dependabot_security_updates?: "enabled" | "disabled" | undefined;
1494
- } | undefined;
594
+ readonly wait_timer?: number | undefined;
595
+ readonly prevent_self_review?: boolean | undefined;
596
+ readonly reviewers?: readonly {
597
+ readonly type: "Team" | "User";
598
+ readonly id: number;
599
+ }[] | undefined;
600
+ readonly deployment_branches?: "all" | "protected" | readonly {
601
+ readonly name: string;
602
+ readonly type: "branch" | "tag";
603
+ }[] | undefined;
1495
604
  };
1496
605
  };
1497
606
  readonly security: {
@@ -1507,13 +616,15 @@ declare const ReposetsConfigFile: import("effect/Context").Tag<import("xdg-effec
1507
616
  readonly languages?: readonly ("actions" | "c-cpp" | "csharp" | "go" | "java-kotlin" | "javascript-typescript" | "python" | "ruby" | "swift")[] | undefined;
1508
617
  readonly query_suite?: "default" | "extended" | undefined;
1509
618
  readonly threat_model?: "remote" | "remote_and_local" | undefined;
1510
- readonly runner_type?: "standard" | "labeled" | undefined;
619
+ readonly runner_type?: "labeled" | "standard" | undefined;
1511
620
  readonly runner_label?: string | undefined;
1512
621
  };
1513
622
  };
1514
- readonly log_level: "silent" | "info" | "verbose" | "debug";
1515
623
  readonly groups: {
1516
624
  readonly [x: string]: {
625
+ readonly repos: readonly string[];
626
+ readonly credentials: string;
627
+ readonly settings?: readonly string[] | undefined;
1517
628
  readonly environments?: readonly string[] | undefined;
1518
629
  readonly secrets?: {
1519
630
  readonly actions?: readonly string[] | undefined;
@@ -1530,16 +641,9 @@ declare const ReposetsConfigFile: import("effect/Context").Tag<import("xdg-effec
1530
641
  } | undefined;
1531
642
  } | undefined;
1532
643
  readonly rulesets?: readonly string[] | undefined;
1533
- readonly owner?: string | undefined;
1534
- readonly repos: readonly string[];
1535
- readonly credentials?: string | undefined;
1536
- readonly settings?: readonly string[] | undefined;
1537
644
  readonly security?: readonly string[] | undefined;
1538
645
  readonly code_scanning?: readonly string[] | undefined;
1539
646
  readonly cleanup?: {
1540
- readonly environments: boolean | {
1541
- readonly preserve: readonly string[];
1542
- };
1543
647
  readonly secrets: {
1544
648
  readonly actions: boolean | {
1545
649
  readonly preserve: readonly string[];
@@ -1565,186 +669,54 @@ declare const ReposetsConfigFile: import("effect/Context").Tag<import("xdg-effec
1565
669
  readonly rulesets: boolean | {
1566
670
  readonly preserve: readonly string[];
1567
671
  };
1568
- } | undefined;
1569
- };
1570
- };
1571
- }>>;
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 file?: {
1579
- readonly [x: string]: string;
1580
- } | undefined;
1581
- readonly value?: {
1582
- readonly [x: string]: string | {
1583
- readonly [x: string]: unknown;
1584
- };
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 file?: {
1599
- readonly [x: string]: string;
1600
- } | undefined;
1601
- readonly value?: {
1602
- readonly [x: string]: string | {
1603
- readonly [x: string]: unknown;
1604
- };
1605
- } | undefined;
1606
- readonly op?: {
1607
- readonly [x: string]: string;
1608
- } | undefined;
672
+ readonly environments: boolean | {
673
+ readonly preserve: readonly string[];
674
+ };
1609
675
  } | undefined;
1610
676
  };
1611
677
  };
1612
678
  }>>;
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, CredentialResolver | GitHubClient | SyncLogger>;
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