Page MenuHomePhabricator

Add output-json option to arc feature
ClosedPublic

Authored by cdentel on Nov 25 2013, 7:12 PM.
Tags
None
Referenced Files
F19051715: D7647.id17270.diff
Fri, Nov 28, 1:34 AM
F19049365: D7647.id.diff
Thu, Nov 27, 4:58 PM
F19034742: D7647.diff
Tue, Nov 25, 2:48 PM
F19017738: D7647.diff
Sun, Nov 23, 9:02 AM
F18998245: D7647.diff
Thu, Nov 20, 6:30 PM
F18822863: D7647.id17268.diff
Oct 23 2025, 8:58 AM
F18600863: D7647.id17268.diff
Sep 13 2025, 10:49 AM
F18596598: D7647.diff
Sep 13 2025, 1:05 AM

Details

Summary

The current format of arc feature is not very friendly to parsing. This adds a json output
format.

Test Plan

Run the command and ensure output is valid

Diff Detail

Branch
master
Lint
Lint Passed
Unit
No Test Coverage

Event Timeline

Let's make this --output json to align with arc unit --output json, for consistency. Looks good otherwise.

src/workflow/ArcanistFeatureWorkflow.php
353

This is kind of sketchy, let's just populate it explicitly above.

355

Prefer:

$dictionary = ipull($dictionary, null, 'name');

..after the loop. Otherwise, this will produce the wrong results if you have branches named 3, etc.

Awesome - will diff with --output json

src/workflow/ArcanistFeatureWorkflow.php
353

Sounds good.

355

Good to know.

cdentel updated this revision to Unknown Object (????).Nov 25 2013, 7:46 PM

Add parameter to 'output' option, add 'epoch' as key, and use ipull

Thanks! GitHub is no longer the authoritative master, so I'll just pull this.