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)
Fri, Apr 19, 06:38
Unknown Object (File)
Fri, Apr 19, 03:29
Unknown Object (File)
Thu, Apr 18, 00:10
Unknown Object (File)
Mon, Apr 15, 21:44
Unknown Object (File)
Sun, Apr 14, 22:15
Unknown Object (File)
Sun, Apr 14, 22:10
Unknown Object (File)
Sun, Apr 14, 09:34
Unknown Object (File)
Sat, Apr 13, 04:57
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 Not Applicable
Unit
Tests Not Applicable

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.