3 final class ReleephDefaultFieldSelector
extends ReleephFieldSelector
{
6 * Determine if this install is Facebook.
8 * TODO: This is a giant hacky mess because I am dumb and moved forward on
9 * Releeph changes with partial information. Recover from this as gracefully
10 * as possible. This obviously is an abomination. -epriestley
12 public static function isFacebook() {
13 return class_exists('ReleephFacebookKarmaFieldSpecification');
17 * @phutil-external-symbol class ReleephFacebookKarmaFieldSpecification
18 * @phutil-external-symbol class ReleephFacebookSeverityFieldSpecification
19 * @phutil-external-symbol class ReleephFacebookTagFieldSpecification
20 * @phutil-external-symbol class ReleephFacebookTasksFieldSpecification
22 public function getFieldSpecifications() {
23 if (self
::isFacebook()) {
25 new ReleephCommitMessageFieldSpecification(),
26 new ReleephSummaryFieldSpecification(),
27 new ReleephReasonFieldSpecification(),
28 new ReleephAuthorFieldSpecification(),
29 new ReleephRevisionFieldSpecification(),
30 new ReleephRequestorFieldSpecification(),
31 new ReleephFacebookKarmaFieldSpecification(),
32 new ReleephFacebookSeverityFieldSpecification(),
33 new ReleephOriginalCommitFieldSpecification(),
34 new ReleephDiffMessageFieldSpecification(),
35 new ReleephIntentFieldSpecification(),
36 new ReleephBranchCommitFieldSpecification(),
37 new ReleephDiffSizeFieldSpecification(),
38 new ReleephDiffChurnFieldSpecification(),
39 new ReleephDependsOnFieldSpecification(),
40 new ReleephFacebookTagFieldSpecification(),
41 new ReleephFacebookTasksFieldSpecification(),
45 new ReleephCommitMessageFieldSpecification(),
46 new ReleephSummaryFieldSpecification(),
47 new ReleephReasonFieldSpecification(),
48 new ReleephAuthorFieldSpecification(),
49 new ReleephRevisionFieldSpecification(),
50 new ReleephRequestorFieldSpecification(),
51 new ReleephSeverityFieldSpecification(),
52 new ReleephOriginalCommitFieldSpecification(),
53 new ReleephDiffMessageFieldSpecification(),
54 new ReleephIntentFieldSpecification(),
55 new ReleephBranchCommitFieldSpecification(),
56 new ReleephDiffSizeFieldSpecification(),
57 new ReleephDiffChurnFieldSpecification(),
62 public function sortFieldsForCommitMessage(array $fields) {
63 return self
::selectFields($fields, array(
64 'ReleephCommitMessageFieldSpecification',
65 'ReleephRequestorFieldSpecification',
66 'ReleephIntentFieldSpecification',
67 'ReleephReasonFieldSpecification',