Page MenuHomeDevCentral

Refactor PhabricatorListener
ClosedPublic

Authored by dereckson on Jul 22 2016, 02:32.
Tags
None
Referenced Files
F3914584: D531.diff
Thu, Dec 19, 15:44
Unknown Object (File)
Tue, Dec 10, 12:04
Unknown Object (File)
Tue, Dec 10, 09:52
Unknown Object (File)
Tue, Dec 10, 09:16
Unknown Object (File)
Tue, Dec 10, 09:00
Unknown Object (File)
Sun, Dec 8, 17:23
Unknown Object (File)
Wed, Dec 4, 13:22
Unknown Object (File)
Wed, Dec 4, 13:21
Subscribers
None

Details

Summary

This change moves the responsibility to perform the task
from the event listener to a dedicated job class.

The job class NotifyNewCommitsToDiffusion allows to call the
Phabricator API for any repository, not only for GitHub ones.

As a preparation for T851, we provide a getPhabricatorProject
method to allow to map source project and Phabricator project.

Ref. T851.

Test Plan
  • With artisan tinker, prepare a notification for rTOMMY
  • Minimal test to check job wants a Phabricator API

Diff Detail

Repository
rNOTIF Notifications center
Lint
Lint Passed
Unit
Tests Passed
Branch
T851

Event Timeline

dereckson retitled this revision from to Refactor PhabricatorListener.
dereckson updated this object.
dereckson edited the test plan for this revision. (Show Details)
dereckson added a reviewer: dereckson.
dereckson added inline comments.
app/Jobs/NotifyNewCommitsToDiffusion.php
148

This block should be before helper methods, as the class is rather dense.

tests/Jobs/NotifyNewCommitsToDiffusionTest.php
45

\n

dereckson marked 2 inline comments as done.
dereckson edited edge metadata.

Per previous comment

dereckson edited edge metadata.
This revision is now accepted and ready to land.Jul 22 2016, 02:37
This revision was automatically updated to reflect the committed changes.