HomePhorge

Respect repository identities when figuring out authors/committers in Herald…

Description

Respect repository identities when figuring out authors/committers in Herald pre-commit hook rules

Summary:
Ref T13480. Currently, Herald commit hook rules use a raw address resolution query to identify the author and committer for a commit. This will get the wrong answer when the raw identity string has been explicitly bound to some non-default user (most often, it will fail to identify an author when one exists).

Instead, use the "IdentityEngine" to properly resolve identities.

Test Plan: Authored a commit as X <y@example.com>, a raw identity with no "natural" matches to users (e.g., no user with that email or username). Bound the identity to a particular user in Diffusion. Wrote a Herald pre-commit content rule, pushed the commit. Saw Herald recognize the correct user when evaluating rules.

Maniphest Tasks: T13480

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

Details

Provenance
epriestleyAuthored on Jan 23 2020, 5:04 PM
themackabuPushed on Mar 25 2025, 8:07 PM
Parents
rPa0a346be347e: In Herald transcripts, render some field values in a more readable way
Branches
Unknown
Tags
Unknown

Event Timeline