Homec4science

Extend all "ManagementWorkflow" classes from a base class

Authored by epriestley <git@epriestley.com> on Dec 27 2013, 22:15.

Description

Extend all "ManagementWorkflow" classes from a base class

Summary:
Ref T2015. Not directly related to Drydock, but I've wanted to do this for a bit.

Introduce a common base class for all the workflows in the scripts in bin/*. This slightly reduces code duplication by moving isExecutable() to the base, but also provides getViewer(). This is a little nicer than PhabricatorUser::getOmnipotentUser() and gives us a layer of indirection if we ever want to introduce more general viewer mechanisms in scripts.

Test Plan: Lint; ran some of the scripts.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2015

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

Details

Committed
epriestley <git@epriestley.com>Dec 27 2013, 22:15
Pushed
aubortJan 31 2017, 17:16
Parents
rPH1ba52fac865f: Introduce DrydockQuery to slightly reduce code duplication
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHe397103bf211: Extend all "ManagementWorkflow" classes from a base class (authored by epriestley <git@epriestley.com>).Dec 27 2013, 22:15