Page MenuHomeDevCentral

Avoid Phabricator URL in classes constructors
ClosedPublic

Authored by dereckson on Aug 24 2016, 00:30.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 19, 12:58
Unknown Object (File)
Tue, Nov 19, 05:02
Unknown Object (File)
Mon, Nov 18, 18:19
Unknown Object (File)
Sun, Nov 17, 18:40
Unknown Object (File)
Fri, Nov 8, 16:27
Unknown Object (File)
Thu, Nov 7, 20:11
Unknown Object (File)
Thu, Nov 7, 19:38
Unknown Object (File)
Sun, Oct 27, 08:33
Subscribers

Details

Summary

The notifications center works with gates (services)
and doors (services instances).

b42260e53626 introduced a notifications:payload command to
output a notification from a payload and those information.

To use this command with Phabricator too, we need to be able
to build the classes Phabricator want from only the instance
name, not from the full URL.

This refactoring allows to simplify constructors when handling
a Phabricator payload.

Test Plan
$ php artisan config:show

+-------------+-----------+----------------------------------+--------------------------+
| Gate        | Door      | Instance                         | Status                   |
+-------------+-----------+----------------------------------+--------------------------+
| GitHub      | Nasqueron | ø                                | ✓                        |
| Phabricator | Nasqueron | https://devcentral.nasqueron.org | Projects map not cached. |
+-------------+-----------+----------------------------------+--------------------------+
$ php artisan phabricator:projectsmap
Querying projects map for https://devcentral.nasqueron.org
+--------------------------------+-------------------------------------+
| PHID                           | Project name                        |
+--------------------------------+-------------------------------------+
| PHID-PROJ-6dg6ogx5pjmk24ur4tp4 | Accounts                            |
| PHID-PROJ-cztcgpvqr6smnnekotq7 | Agora                               |
| PHID-PROJ-3iew3cqf3htpazfyzb5a | architecture                        |
| PHID-PROJ-ypzex6tkmmv7tt44nknw | assets.nasqueron.org                |
| PHID-PROJ-yxslhjbugwycl2ul4n6n | Auth Grove                          |

$ php artisan config:show

+-------------+-----------+----------------------------------+--------+
| Gate        | Door      | Instance                         | Status |
+-------------+-----------+----------------------------------+--------+
| GitHub      | Nasqueron | ø                                | ✓      |
| Phabricator | Nasqueron | https://devcentral.nasqueron.org | ✓      |
+-------------+-----------+----------------------------------+--------+

Diff Detail

Repository
rNOTIF Notifications center
Lint
Lint Passed
Unit
Tests Passed
Branch
PhabricatorStory-constructor

Event Timeline

dereckson retitled this revision from to Let construct PhabricatorStory without URL.
dereckson updated this object.
dereckson edited the test plan for this revision. (Show Details)
dereckson added a reviewer: dereckson.
dereckson edited edge metadata.

Revert use change in PhabricatorGateController, as we handle if the service exists or not in GateController parent class.

dereckson retitled this revision from Let construct PhabricatorStory without URL to Avoid Phabricator URL in classes constructors.
dereckson updated this object.
dereckson edited edge metadata.
dereckson edited edge metadata.
This revision is now accepted and ready to land.Aug 24 2016, 00:38
This revision was automatically updated to reflect the committed changes.