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)
Sun, Oct 27, 08:33
Unknown Object (File)
Sat, Oct 26, 04:19
Unknown Object (File)
Sun, Oct 20, 00:32
Unknown Object (File)
Sat, Oct 19, 11:08
Unknown Object (File)
Wed, Oct 16, 03:19
Unknown Object (File)
Mon, Oct 14, 06:21
Unknown Object (File)
Fri, Oct 11, 00:49
Unknown Object (File)
Fri, Oct 11, 00:49
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.