diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index 44bf8afe24..9373d989fe 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -1542,6 +1542,7 @@ phutil_register_library_map(array( 'PhabricatorCommitBranchesField' => 'applications/repository/customfield/PhabricatorCommitBranchesField.php', 'PhabricatorCommitCustomField' => 'applications/repository/customfield/PhabricatorCommitCustomField.php', 'PhabricatorCommitMergedCommitsField' => 'applications/repository/customfield/PhabricatorCommitMergedCommitsField.php', + 'PhabricatorCommitRepositoryField' => 'applications/repository/customfield/PhabricatorCommitRepositoryField.php', 'PhabricatorCommitSearchEngine' => 'applications/audit/query/PhabricatorCommitSearchEngine.php', 'PhabricatorCommitTagsField' => 'applications/repository/customfield/PhabricatorCommitTagsField.php', 'PhabricatorCommonPasswords' => 'applications/auth/constants/PhabricatorCommonPasswords.php', @@ -4908,6 +4909,7 @@ phutil_register_library_map(array( 'PhabricatorCommitBranchesField' => 'PhabricatorCommitCustomField', 'PhabricatorCommitCustomField' => 'PhabricatorCustomField', 'PhabricatorCommitMergedCommitsField' => 'PhabricatorCommitCustomField', + 'PhabricatorCommitRepositoryField' => 'PhabricatorCommitCustomField', 'PhabricatorCommitSearchEngine' => 'PhabricatorApplicationSearchEngine', 'PhabricatorCommitTagsField' => 'PhabricatorCommitCustomField', 'PhabricatorCommonPasswords' => 'Phobject', diff --git a/src/applications/diffusion/config/PhabricatorDiffusionConfigOptions.php b/src/applications/diffusion/config/PhabricatorDiffusionConfigOptions.php index 89a20fac68..31b3c358e7 100644 --- a/src/applications/diffusion/config/PhabricatorDiffusionConfigOptions.php +++ b/src/applications/diffusion/config/PhabricatorDiffusionConfigOptions.php @@ -23,6 +23,7 @@ final class PhabricatorDiffusionConfigOptions $custom_field_type = 'custom:PhabricatorCustomFieldConfigOptionType'; $fields = array( + new PhabricatorCommitRepositoryField(), new PhabricatorCommitBranchesField(), new PhabricatorCommitTagsField(), new PhabricatorCommitMergedCommitsField(), @@ -142,10 +143,11 @@ final class PhabricatorDiffusionConfigOptions $this->newOption('diffusion.fields', $custom_field_type, $default_fields) ->setCustomData( id(new PhabricatorRepositoryCommit()) - ->getCustomFieldBaseClass()) - ->setDescription(pht( - "Select and reorder diffusion fields.\n\n". - "These will primarily show up in Mail Notifications.")), + ->getCustomFieldBaseClass()) + ->setDescription( + pht( + "Select and reorder diffusion fields.\n\n". + "These will primarily show up in Mail Notifications.")), ); } diff --git a/src/applications/repository/customfield/PhabricatorCommitRepositoryField.php b/src/applications/repository/customfield/PhabricatorCommitRepositoryField.php new file mode 100644 index 0000000000..1a69bd5f62 --- /dev/null +++ b/src/applications/repository/customfield/PhabricatorCommitRepositoryField.php @@ -0,0 +1,30 @@ +getObject()->getRepository(); + + $body->addTextSection( + pht('REPOSITORY'), + $repository->getMonogram().' '.$repository->getName()); + } + +}