Page MenuHomePhabricator

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

Authored by epriestley on Jan 24 2020, 1:16 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 20, 8:52 PM
Unknown Object (File)
Wed, Nov 20, 10:34 AM
Unknown Object (File)
Sat, Nov 16, 12:25 PM
Unknown Object (File)
Mon, Nov 11, 6:41 PM
Unknown Object (File)
Fri, Nov 8, 4:04 PM
Unknown Object (File)
Oct 23 2024, 5:36 AM
Unknown Object (File)
Oct 9 2024, 12:49 PM
Unknown Object (File)
Sep 27 2024, 1:50 AM
Subscribers
None

Details

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.

Diff Detail

Repository
rP Phabricator
Branch
author6
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 23745
Build 32655: Run Core Tests
Build 32654: arc lint + arc unit

Event Timeline

This revision was not accepted when it landed; it landed in state Needs Review.Jan 29 2020, 11:15 PM
This revision was automatically updated to reflect the committed changes.