-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschema.json
More file actions
558 lines (558 loc) · 18.8 KB
/
Copy pathschema.json
File metadata and controls
558 lines (558 loc) · 18.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://shipkit.dev/schemas/shipkit.json",
"title": "ShipKit Configuration",
"description": "Schema for .shipkit.json configuration files used by the ShipKit plugin.",
"type": "object",
"additionalProperties": false,
"properties": {
"schemaVersion": {
"type": "integer",
"default": 1,
"description": "The schema version of this configuration file. Default: 1"
},
"build": {
"type": "object",
"description": "Build configuration for automatic trigger-based builds.",
"additionalProperties": false,
"properties": {
"triggers": {
"type": "array",
"description": "List of build triggers that watch file patterns and run commands.",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["watch", "run", "stage"],
"properties": {
"watch": {
"type": "array",
"description": "Glob patterns of files to watch for changes.",
"items": {
"type": "string"
}
},
"run": {
"type": "string",
"description": "The command to run when watched files change."
},
"stage": {
"type": "array",
"description": "Glob patterns of output files to stage after the build command runs.",
"items": {
"type": "string"
}
}
}
}
}
}
},
"validation": {
"type": "object",
"description": "Validation commands to run during pre-commit or CI checks.",
"additionalProperties": false,
"properties": {
"commands": {
"type": "array",
"description": "List of validation commands.",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["name", "run"],
"properties": {
"name": {
"type": "string",
"description": "Human-readable name for this validation step."
},
"run": {
"type": "string",
"description": "The shell command to execute for validation."
}
}
}
}
}
},
"sensitive": {
"type": "object",
"description": "Configuration for detecting sensitive content that should not be committed.",
"additionalProperties": false,
"properties": {
"patterns": {
"type": "array",
"description": "Regex patterns to match sensitive content in file contents.",
"items": {
"type": "string"
}
},
"keywords": {
"type": "array",
"description": "Keywords that indicate sensitive data (e.g., 'password', 'secret').",
"items": {
"type": "string"
}
},
"files": {
"type": "array",
"description": "Glob patterns for files that are always considered sensitive (e.g., '.env').",
"items": {
"type": "string"
}
}
}
},
"commit": {
"type": "object",
"description": "Configuration for commit message formatting and attribution.",
"additionalProperties": false,
"properties": {
"conventionalPrefixes": {
"type": "array",
"description": "Allowed conventional commit prefixes (e.g., 'feat', 'fix', 'chore').",
"items": {
"type": "string"
}
},
"coAuthor": {
"type": ["string", "null"],
"description": "Co-author line to append to commit messages, or null to disable. Default: null"
}
}
},
"checksums": {
"type": "object",
"description": "Configuration for file checksum tracking to detect unintended changes.",
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean",
"description": "Whether checksum tracking is enabled. Default: false"
},
"file": {
"type": "string",
"description": "Path to the checksums file. Default: '.checksums'"
},
"files": {
"type": "array",
"description": "Glob patterns of files to track checksums for.",
"items": {
"type": "string"
}
}
}
},
"docs": {
"type": "object",
"description": "Configuration for automatic documentation generation and dependency mapping.",
"additionalProperties": false,
"properties": {
"dependencyMap": {
"type": "array",
"description": "Mappings from source files to their corresponding documentation files.",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["sources", "docs"],
"properties": {
"sources": {
"type": "array",
"description": "Glob patterns for source files.",
"items": {
"type": "string"
}
},
"docs": {
"type": "array",
"description": "Glob patterns for documentation files that depend on the sources.",
"items": {
"type": "string"
}
}
}
}
},
"autoDetect": {
"type": "boolean",
"description": "Whether to automatically detect documentation dependencies. Default: false"
}
}
},
"release": {
"type": "object",
"description": "Configuration for release management, changelogs, and version bumping.",
"additionalProperties": false,
"properties": {
"changelog": {
"type": "string",
"description": "Path to the changelog file. Default: 'CHANGELOG.md'"
},
"versionFiles": {
"type": "array",
"description": "Files that contain version strings to update during a release.",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["path", "type"],
"properties": {
"path": {
"type": "string",
"description": "Path to the version file."
},
"type": {
"type": "string",
"enum": ["json", "toml", "text"],
"description": "The format of the version file."
},
"jsonPath": {
"type": "string",
"description": "JSON path expression to the version field (only for type 'json')."
},
"tomlPath": {
"type": "string",
"description": "TOML path expression to the version field (only for type 'toml')."
},
"pattern": {
"type": "string",
"description": "Regex pattern to locate and replace the version string (only for type 'text')."
}
}
}
},
"preRelease": {
"type": "array",
"description": "Commands to run before creating a release.",
"items": {
"type": "string"
}
},
"releaseBranch": {
"type": "string",
"description": "The branch from which releases are created. Default: 'main'"
},
"tagPrefix": {
"type": "string",
"description": "Prefix for release tags. Default: 'v'"
}
}
},
"pr": {
"type": "object",
"description": "Configuration for pull request creation and management.",
"additionalProperties": false,
"properties": {
"template": {
"type": "string",
"description": "Path to the pull request template file."
},
"baseBranch": {
"type": "string",
"description": "Default base branch for pull requests. Default: 'main'"
},
"branchPrefix": {
"type": "string",
"description": "Prefix for feature branches created for PRs (e.g., 'feature/')."
},
"allowExistingUnpushedCommits": {
"type": "boolean",
"description": "Whether to allow creating a PR when there are existing unpushed commits on the branch. Default: false"
}
}
},
"ci": {
"type": "object",
"description": "Configuration for CI integration and automated failure recovery.",
"additionalProperties": false,
"properties": {
"provider": {
"type": "string",
"description": "The CI provider name (e.g., 'github-actions', 'gitlab-ci', 'circleci')."
},
"maxFixCycles": {
"type": "integer",
"description": "Maximum number of automated fix attempts before giving up. Default: 3"
},
"failureHints": {
"type": "array",
"description": "Pattern-based hints for automatically resolving CI failures.",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["pattern", "fix", "description"],
"properties": {
"pattern": {
"type": "string",
"description": "Regex pattern to match against CI failure output."
},
"fix": {
"type": "string",
"description": "Command or action to run to fix the matched failure."
},
"description": {
"type": "string",
"description": "Human-readable description of what this hint addresses."
}
}
}
}
}
},
"resolve": {
"type": "object",
"description": "Configuration for automatic merge conflict resolution.",
"additionalProperties": false,
"properties": {
"autoMode": {
"type": "boolean",
"description": "Whether to automatically resolve conflicts without prompting. Default: false"
},
"resolutionStrategy": {
"type": "string",
"enum": ["balanced", "ours", "theirs"],
"description": "Default strategy for resolving conflicts. 'balanced' attempts intelligent merging. Default: 'balanced'"
},
"autoSkipLowConfidence": {
"type": "boolean",
"description": "Whether to skip conflicts where auto-resolution confidence is low. Default: false"
},
"continueAfterResolve": {
"type": "boolean",
"description": "Whether to automatically continue the rebase/merge after resolving conflicts. Default: false"
},
"allowedOperations": {
"type": "array",
"description": "List of git operations that auto-resolve is allowed for (e.g., 'rebase', 'merge', 'cherry-pick').",
"items": {
"type": "string"
}
},
"ignorePatterns": {
"type": "array",
"description": "Glob patterns for files to skip during conflict resolution.",
"items": {
"type": "string"
}
}
}
},
"review": {
"type": "object",
"description": "Configuration for automated code review.",
"additionalProperties": false,
"properties": {
"focusAreas": {
"type": "array",
"description": "Areas to focus on during review (e.g., 'security', 'performance', 'readability').",
"items": {
"type": "string"
}
},
"severityThreshold": {
"type": "string",
"enum": ["error", "warning", "suggestion"],
"description": "Minimum severity level to report. Default: 'suggestion'"
},
"ignorePaths": {
"type": "array",
"description": "Glob patterns for file paths to exclude from review.",
"items": {
"type": "string"
}
},
"maxFileSize": {
"type": "integer",
"description": "Maximum file size in bytes to include in review. Larger files are skipped. Default: 100000"
},
"customRules": {
"type": "array",
"description": "Custom review rules defined by regex patterns.",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["pattern", "severity", "message"],
"properties": {
"pattern": {
"type": "string",
"description": "Regex pattern to match in code."
},
"severity": {
"type": "string",
"description": "Severity level for matches (e.g., 'error', 'warning', 'suggestion')."
},
"message": {
"type": "string",
"description": "Message to display when the pattern is matched."
}
}
}
},
"autoPost": {
"type": "boolean",
"description": "Whether to automatically post review comments to the PR. Default: false"
}
}
},
"hotfix": {
"type": "object",
"description": "Configuration for hotfix branch management and cherry-picking.",
"additionalProperties": false,
"properties": {
"branchPrefix": {
"type": "string",
"description": "Prefix for hotfix branches. Default: 'hotfix/'"
},
"targetBranches": {
"type": "array",
"description": "Branches to cherry-pick the hotfix onto.",
"items": {
"type": "string"
}
},
"skipCherryPick": {
"type": "boolean",
"description": "Whether to skip automatic cherry-picking to target branches. Default: false"
},
"requireCleanCherryPick": {
"type": "boolean",
"description": "Whether to abort if cherry-pick results in conflicts. Default: true"
}
}
},
"sync": {
"type": "object",
"description": "Configuration for branch synchronization with upstream.",
"additionalProperties": false,
"properties": {
"strategy": {
"type": "string",
"enum": ["rebase", "merge"],
"description": "Strategy to use when syncing branches. Default: 'rebase'"
},
"baseBranch": {
"type": "string",
"description": "The base branch to sync from. Default: 'main'"
},
"syncUpstream": {
"type": "boolean",
"description": "Whether to fetch and sync from the upstream remote. Default: false"
},
"preferUpstream": {
"type": "boolean",
"description": "Whether to prefer upstream changes over origin when syncing. Default: false"
},
"runValidationAfterSync": {
"type": "boolean",
"description": "Whether to run validation commands after syncing. Default: false"
},
"autoStash": {
"type": "boolean",
"description": "Whether to automatically stash and restore local changes during sync. Default: true"
}
}
},
"cleanup": {
"type": "object",
"description": "Configuration for branch cleanup and stale branch management.",
"additionalProperties": false,
"properties": {
"protectedBranches": {
"type": "array",
"description": "Branch names or patterns that should never be deleted.",
"items": {
"type": "string"
}
},
"deleteRemote": {
"type": "boolean",
"description": "Whether to also delete remote branches during cleanup. Default: false"
},
"staleDays": {
"type": "integer",
"description": "Number of days of inactivity before a branch is considered stale. Default: 30"
},
"autoConfirmLocal": {
"type": "boolean",
"description": "Whether to skip confirmation when deleting local branches. Default: false"
}
}
},
"smokeTests": {
"type": "object",
"description": "Configuration for smoke test execution after deployments or releases.",
"additionalProperties": false,
"properties": {
"runner": {
"type": "string",
"description": "The test runner to use (e.g., 'jest', 'vitest', 'pytest')."
},
"command": {
"type": "string",
"description": "The shell command to execute smoke tests."
},
"reportDir": {
"type": "string",
"description": "Directory to store smoke test reports. Default: '.shipkit/reports'"
},
"retries": {
"type": "integer",
"description": "Number of times to retry failed smoke tests. Default: 0"
},
"timeout": {
"type": "integer",
"description": "Timeout in seconds for the smoke test run. Default: 300"
}
}
},
"codeQuality": {
"type": "object",
"description": "Configuration for code quality checks and slop detection.",
"additionalProperties": false,
"properties": {
"slopPatterns": {
"type": "array",
"description": "Regex patterns that indicate low-quality or 'slop' code to flag.",
"items": {
"type": "string"
}
},
"ignoreFiles": {
"type": "array",
"description": "Glob patterns for files to exclude from code quality checks.",
"items": {
"type": "string"
}
},
"autoFix": {
"type": "boolean",
"description": "Whether to automatically apply fixes for detected issues. Default: false"
}
}
},
"worktrees": {
"type": "object",
"description": "Configuration for git worktree management.",
"additionalProperties": false,
"properties": {
"dir": {
"type": "string",
"description": "Base directory for creating worktrees. Default: '.worktrees'"
},
"lockDir": {
"type": "string",
"description": "Directory for worktree lock files. Default: '.worktrees/.locks'"
},
"maxLockAgeDays": {
"type": "integer",
"description": "Maximum age in days for a lock file before it is considered stale. Default: 7"
},
"cleanupOnSuccess": {
"type": "boolean",
"description": "Whether to automatically remove a worktree after its task completes successfully. Default: true"
},
"branchPrefix": {
"type": "string",
"description": "Prefix for branches created within worktrees. Default: 'wt/'"
}
}
}
}
}