Page MenuHomePhabricator

Add output-json option to arc feature
ClosedPublic

Authored by cdentel on Nov 25 2013, 7:12 PM.
Tags
None
Referenced Files
F14035869: D7647.diff
Sun, Nov 10, 7:50 AM
F14022447: D7647.diff
Wed, Nov 6, 5:37 PM
F14006025: D7647.diff
Sun, Oct 27, 11:33 PM
F14003160: D7647.id17268.diff
Sat, Oct 26, 2:59 AM
Unknown Object (File)
Sep 30 2024, 5:21 PM
Unknown Object (File)
Sep 27 2024, 8:33 AM
Unknown Object (File)
Sep 20 2024, 11:34 AM
Unknown Object (File)
Sep 18 2024, 9:22 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

Lint
Lint Skipped
Unit
Tests Skipped

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.