Page MenuHomeDevCentral

Refactor PhabricatorListener
ClosedPublic

Authored by dereckson on Jul 22 2016, 02:32.
Tags
None
Referenced Files
F3327489: D531.id1295.diff
Mon, Jul 8, 15:22
F3325234: D531.id1297.diff
Mon, Jul 8, 07:03
Unknown Object (File)
Sun, Jul 7, 14:14
Unknown Object (File)
Sun, Jul 7, 06:46
Unknown Object (File)
Sat, Jul 6, 00:38
Unknown Object (File)
Thu, Jul 4, 12:09
Unknown Object (File)
Thu, Jul 4, 11:29
Unknown Object (File)
Thu, Jul 4, 06:52
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 Not Applicable
Unit
Tests Not Applicable

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.