1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-02 19:52:44 +01:00
phorge-phorge/src/applications/diffusion/herald/DiffusionCommitMergeHeraldField.php
epriestley 2353121dee Add "Is merge commit?" to commit fields in Herald
Summary: Fixes T5788. We already have this as a pre-commit field, add it as a post-commit field too.

Test Plan: Ran this rule on a merge commit. Also ran it on a non-merge commit. Both got the correct value.

Reviewers: avivey, chad

Reviewed By: avivey, chad

Subscribers: avivey

Maniphest Tasks: T5788

Differential Revision: https://secure.phabricator.com/D14685
2015-12-05 13:07:56 -08:00

20 lines
425 B
PHP

<?php
final class DiffusionCommitMergeHeraldField
extends DiffusionCommitHeraldField {
const FIELDCONST = 'diffusion.commit.merge';
public function getHeraldFieldName() {
return pht('Is merge commit');
}
public function getHeraldFieldValue($object) {
return $this->getAdapter()->loadIsMergeCommit();
}
protected function getHeraldFieldStandardType() {
return HeraldField::STANDARD_BOOL;
}
}