You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+67Lines changed: 67 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -212,12 +212,78 @@ Update jobs with warnings (missing commands or unknown execution time):
212
212
gh slimify fix --force
213
213
```
214
214
215
+
### JSON Output
216
+
217
+
Use `--json` to output results in machine-readable JSON format. This is useful for CI/CD pipelines, AI agents, or other tools that need to parse the results programmatically.
218
+
219
+
```bash
220
+
gh slimify --json --all
221
+
gh slimify fix --json --all
222
+
```
223
+
224
+
**Example scan output:**
225
+
226
+
```json
227
+
{
228
+
"jobs": [
229
+
{
230
+
"workflow_path": ".github/workflows/ci.yml",
231
+
"job_id": "lint",
232
+
"job_name": "Lint",
233
+
"line_number": 8,
234
+
"status": "safe",
235
+
"status_description": "Safe to migrate to ubuntu-slim. No missing commands and execution time is known.",
236
+
"recommended_action": "migrate",
237
+
"duration_seconds": 143
238
+
},
239
+
{
240
+
"workflow_path": ".github/workflows/ci.yml",
241
+
"job_id": "build",
242
+
"job_name": "Build",
243
+
"line_number": 25,
244
+
"status": "warning",
245
+
"status_description": "Can migrate but requires attention. Setup may be required for: docker.",
246
+
"recommended_action": "review_before_migrate",
247
+
"duration_seconds": 230,
248
+
"missing_commands": ["docker"]
249
+
}
250
+
],
251
+
"summary": {
252
+
"safe": 1,
253
+
"warning": 1,
254
+
"ineligible": 0,
255
+
"already_slim": 0,
256
+
"total": 2
257
+
}
258
+
}
259
+
```
260
+
261
+
**Scan job statuses:**
262
+
263
+
| Status | Recommended Action | Description |
264
+
|---|---|---|
265
+
|`safe`|`migrate`| Safe to migrate, no issues found |
266
+
|`warning`|`review_before_migrate`| Can migrate but has missing commands or unknown duration |
267
+
|`ineligible`|`do_not_migrate`| Cannot migrate to ubuntu-slim |
268
+
|`already_slim`|`no_action_needed`| Already using ubuntu-slim |
269
+
270
+
**Fix job statuses:**
271
+
272
+
| Status | Recommended Action | Description |
273
+
|---|---|---|
274
+
|`updated`|`verify_workflow`| Successfully updated to ubuntu-slim |
275
+
|`updated` (with warnings) |`verify_workflow_carefully`| Updated but requires careful verification |
276
+
|`skipped`|`review_then_force`| Skipped due to warnings, use `--force` to update |
277
+
|`error`|`investigate_error`| Failed to update |
278
+
|`not_found`|`investigate_error`| Job not found in workflow file |
0 commit comments