1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-27 17:22:42 +01:00
phorge-phorge/src/applications/doorkeeper
epriestley 2b19f91936 Allow Doorkeeper references to have multiple display variations (full, short, etc.)
Summary:
Ref T13102. An install has a custom rule for bridging JIRA references via Doorkeeper and would like to be able to render them as `JIRA-123` instead of `JIRA JIRA-123 Full JIRA title`.

I think it's reasonable to imagine future support upstream for `JIRA-123`, `{JIRA-123}`, and so on, although we do not support these today. We can take a small step toward eventual support by letting the rendering pipeline understand different view modes.

This adds an optional `name` (the default text rendered before we do the OAuth sync) and an optional `view`, which can be `short` or `full`.

Test Plan:
I tested this primarily with Asana, since it's less of a pain to set up than JIRA. The logic should be similar, hopefully.

I changed `DoorkeeperAsanaRemarkupRule` to specify `name` and `view`, e.g `'view' => (mt_rand(0, 1) ? 'short' : 'full')`. Then I made a bunch of Asana references in a comment and saw them randomly go short or long.

Maniphest Tasks: T13102

Differential Revision: https://secure.phabricator.com/D19215
2018-03-13 11:29:52 -07:00
..
application Move FontIcon calls to Icon 2016-01-28 08:48:45 -08:00
bridge Allow Doorkeeper references to have multiple display variations (full, short, etc.) 2018-03-13 11:29:52 -07:00
controller Allow Doorkeeper references to have multiple display variations (full, short, etc.) 2018-03-13 11:29:52 -07:00
edge Modernize remaining edge types 2015-01-03 10:58:20 +11:00
engine Allow Doorkeeper references to have multiple display variations (full, short, etc.) 2018-03-13 11:29:52 -07:00
engineextension When an object has been imported from an external source, show a curtain panel 2016-03-25 14:05:27 -07:00
exception Apply some autofix linter rules 2014-09-10 06:55:05 +10:00
option Update to use PHUIRemarkupView everywhere possible 2016-02-16 14:05:53 -08:00
phid Bridge GitHub users into Phabricator and attribute actions to them 2016-03-28 13:10:32 -07:00
query Bridge GitHub users into Phabricator and attribute actions to them 2016-03-28 13:10:32 -07:00
remarkup Allow Doorkeeper references to have multiple display variations (full, short, etc.) 2018-03-13 11:29:52 -07:00
storage Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
view Use PhutilInvalidStateException 2015-05-14 07:53:52 +10:00
worker JIRA Integration: Link and/or Comment 2015-11-12 19:30:43 +00:00