Homec4science

Allow Herald pre-commit rules to act on repository projects

Authored by epriestley <git@epriestley.com> on Jan 3 2014, 21:24.

Description

Allow Herald pre-commit rules to act on repository projects

Summary:
Fixes T4264. Adds:

  • New "Repository's projects" field to Herald pre-commit rules, so you can write global rules which act based on projects.
  • Allows pre-ref/pre-content rules to bind to projects, and fire for all repositories in that project, so users with limited power can write rules which apply to many repositories.
  • The pre-ref and pre-content classes were starting to share a fair amount of code, so I made them both extend an abstract base class.

Test Plan: Wrote new pre-ref and pre-content rules bound to projects, then pushed commits into repositories in those projects and not in those projects. The "repository projects" field populated, and the rules fired for repositories in the relevant projects.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T4264

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

Details

Committed
epriestley <git@epriestley.com>Jan 3 2014, 21:24
Pushed
aubortJan 31 2017, 17:16
Parents
rPHee2680794f75: Recognize "#project" as a formal object name
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH2cfc3acf3234: Allow Herald pre-commit rules to act on repository projects (authored by epriestley <git@epriestley.com>).Jan 3 2014, 21:24