Page MenuHomeDevCentral

Avoid Phabricator URL in classes constructors
ClosedPublic

Authored by dereckson on Aug 24 2016, 00:30.
Tags
None
Referenced Files
F3114597: D633.diff
Mon, Jun 17, 09:42
F3111991: D633.id1580.diff
Sun, Jun 16, 20:37
Unknown Object (File)
Sat, Jun 15, 18:29
Unknown Object (File)
Sat, Jun 15, 15:23
Unknown Object (File)
Fri, Jun 14, 23:40
Unknown Object (File)
Wed, Jun 12, 17:59
Unknown Object (File)
Wed, Jun 12, 16:41
Unknown Object (File)
Tue, Jun 11, 20:16
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.