HomeDevCentral

Refactor the projects list storage in PhabricatorStory

Description

Refactor the projects list storage in PhabricatorStory

Summary:
To get the projects attached to a story, up to 3 API calls are needed.

In the previous code iteration, we stored the list of projects in the
event, and then in the notification, but this doesn't respect the
single responsability principle.

We so provide two new methods, getProjects() and attachProjects() to
maintain the current way of querying only once the projects list, and
to store once queried the list inside PhabricatorStory.

Cleaning code where the projects array were copied and passed along.

Test Plan: Replay Phabricator former requests in Runscope

Reviewers: dereckson

Differential Revision: http://devcentral.nasqueron.org/D124

Details