@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

add committer as supported field for herald rules

Summary: Allows building Herald rules against committer, similar to author. Useful for monitoring cherry-picked commits.

Test Plan: Applied patch, restarted php-fpm and phd daemons to ensure code changes took effect. Added a new herald rule to trigger audit when committer was me. Cherry-picked someone else's commit (author=them, committer=me) and pushed to origin. Audit was triggered.

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6838

authored by

Eric Stern and committed by
epriestley
9a95b1e7 d06129b8

+6
+3
src/applications/herald/adapter/HeraldAdapter.php
··· 10 10 const FIELD_AUTHOR = 'author'; 11 11 const FIELD_REVIEWER = 'reviewer'; 12 12 const FIELD_REVIEWERS = 'reviewers'; 13 + const FIELD_COMMITTER = 'committer'; 13 14 const FIELD_CC = 'cc'; 14 15 const FIELD_TAGS = 'tags'; 15 16 const FIELD_DIFF_FILE = 'diff-file'; ··· 95 96 self::FIELD_TITLE => pht('Title'), 96 97 self::FIELD_BODY => pht('Body'), 97 98 self::FIELD_AUTHOR => pht('Author'), 99 + self::FIELD_COMMITTER => pht('Committer'), 98 100 self::FIELD_REVIEWER => pht('Reviewer'), 99 101 self::FIELD_REVIEWERS => pht('Reviewers'), 100 102 self::FIELD_CC => pht('CCs'), ··· 147 149 self::CONDITION_REGEXP, 148 150 ); 149 151 case self::FIELD_AUTHOR: 152 + case self::FIELD_COMMITTER: 150 153 case self::FIELD_REPOSITORY: 151 154 case self::FIELD_REVIEWER: 152 155 return array(
+3
src/applications/herald/adapter/HeraldCommitAdapter.php
··· 52 52 return array( 53 53 self::FIELD_BODY, 54 54 self::FIELD_AUTHOR, 55 + self::FIELD_COMMITTER, 55 56 self::FIELD_REVIEWER, 56 57 self::FIELD_REPOSITORY, 57 58 self::FIELD_DIFF_FILE, ··· 241 242 return $data->getCommitMessage(); 242 243 case self::FIELD_AUTHOR: 243 244 return $data->getCommitDetail('authorPHID'); 245 + case self::FIELD_COMMITTER: 246 + return $data->getCommitDetail('committerPHID'); 244 247 case self::FIELD_REVIEWER: 245 248 return $data->getCommitDetail('reviewerPHID'); 246 249 case self::FIELD_DIFF_FILE: