Page MenuHomePhabricator

Add output-json option to arc feature
ClosedPublic

Authored by cdentel on Nov 25 2013, 7:12 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Dec 15, 6:36 AM
Unknown Object (File)
Thu, Dec 12, 12:16 AM
Unknown Object (File)
Wed, Dec 11, 2:07 PM
Unknown Object (File)
Sat, Dec 7, 11:25 AM
Unknown Object (File)
Tue, Dec 3, 1:03 AM
Unknown Object (File)
Fri, Nov 29, 3:04 AM
Unknown Object (File)
Nov 25 2024, 10:02 PM
Unknown Object (File)
Nov 19 2024, 1:32 PM

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.