Page MenuHomePhabricator

Allow Doorkeeper references to have multiple display variations (full, short, etc.)
ClosedPublic

Authored by epriestley on Mar 13 2018, 6:15 PM.
Tags
None
Referenced Files
F14785238: D19215.diff
Fri, Jan 24, 12:08 PM
Unknown Object (File)
Fri, Jan 17, 1:59 AM
Unknown Object (File)
Sun, Jan 5, 2:05 PM
Unknown Object (File)
Tue, Dec 31, 6:20 PM
Unknown Object (File)
Tue, Dec 31, 6:20 PM
Unknown Object (File)
Tue, Dec 31, 6:19 PM
Unknown Object (File)
Dec 24 2024, 3:06 AM
Unknown Object (File)
Dec 19 2024, 4:17 PM
Subscribers
None

Details

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.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision was not accepted when it landed; it landed in state Needs Review.Mar 13 2018, 6:29 PM
This revision was automatically updated to reflect the committed changes.