1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-15 03:12:41 +01:00
phorge-phorge/src/applications/phid
epriestley 3ea47d967a Allow monogrammed objects to be parsed from the arc command line in "Reviewers" and similar fields
Summary:
Ref T10939. This allows the CLI to parse reviewers and subscribers like this:

```Reviewers: epriestley, O123 Some Package Name```

The rule goes:

  - If a reviewer or subscriber starts with a monogram (like `X111`), just look that up and ignore everything until the next comma.
  - Otherwise, split it on spaces and look up each part.

This means that these are valid:

```
alincoln htaft
alincoln, htaft
#a #b epriestley
O123 Some Package, epriestley, #b
```

I think the only real downside is that this:

```
O123 Some Package epriestley
```

...ignores the "epriestley" part. However, I don't expect users to be typing package monograms manually -- they just need to be representable by `arc land` and `arc diff --edit` and such. Those flows will always add commas and make the parse unambiguous.

Test Plan:
  - Added test coverage.
  - `amend --show`'d a revision with a package subscriber (this isn't currently possible to produce using the web UI, it came from a future change) and saw `Subscribers: O123 package name, usera, userb`.
  - Updated a revision with a package subscriber.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10939

Differential Revision: https://secure.phabricator.com/D15911
2016-05-13 17:18:35 -07:00
..
conduit phtize all the things 2015-05-22 21:16:39 +10:00
handle Extend from Phobject 2015-06-15 18:02:27 +10:00
interface Work around a bug in PHP 5.3-ish with abstract methods in interfaces 2013-10-25 15:58:17 -07:00
query Allow monogrammed objects to be parsed from the arc command line in "Reviewers" and similar fields 2016-05-13 17:18:35 -07:00
remarkup Remarkup rule for rendering PHIDs as handles 2016-03-17 20:24:03 +00:00
resolver Provide formal Users/Projects/Mailable fields for EditEngine 2015-11-04 12:05:41 -08:00
storage Remove some unused properties 2015-06-17 20:41:52 +10:00
type Move FontIcon calls to Icon 2016-01-28 08:48:45 -08:00
view Fix tag limit logic in PHUIHandleTagListView 2016-03-22 09:29:14 -07:00
PhabricatorMetaMTAApplicationEmailPHIDType.php Mark PhabricatorPHIDType::getPHIDTypeApplicationClass() as abstract 2015-11-03 06:47:12 +11:00
PhabricatorObjectHandle.php Allow monogrammed objects to be parsed from the arc command line in "Reviewers" and similar fields 2016-05-13 17:18:35 -07:00
PhabricatorPHIDConstants.php Bridge GitHub users into Phabricator and attribute actions to them 2016-03-28 13:10:32 -07:00
utils.php Use Application PHIDs in Projects 2013-07-22 12:17:53 -07:00