Implement #yoloswag

Summary:
Ref T3190. #shipit

Likely future work:

  - Extract project mentions from remarkup for ApplicationTransactions; this isn't relevant in any apps right now (but will be in Pholio before tooo long). Ref T3189.
  - Allow projects to have alternate short names. As written, this is fine for most projects ("Differential" is `#differential`) but not so great for other projects ("Phabricator Public & Media Relations" is `#phabricator_public_media_relations`). This also breaks refs when you rename a project. Better would be letting long project names have short aliases (`#pr`) as permitted alternatives.

Since this mention uses `#` instead of a letter, I needed to do a small amount of regexp gymnastics.

Test Plan:
you only #yolo once

{F43615}

Reviewers: btrahan, chad

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3189, T3190

Differential Revision: https://secure.phabricator.com/D5954
This commit is contained in:
epriestley
2013-05-18 02:46:39 -07:00
parent 0ade49fbe4
commit 79fa8e40cb
4 changed files with 71 additions and 1 deletions

View File

@@ -26,6 +26,12 @@ final class PhabricatorApplicationProject extends PhabricatorApplication {
return self::GROUP_ORGANIZATION;
}
public function getRemarkupRules() {
return array(
new ProjectRemarkupRule(),
);
}
public function getRoutes() {
return array(
'/project/' => array(