Page MenuHomeDevCentral

Refactor PhabricatorListener
ClosedPublic

Authored by dereckson on Jul 22 2016, 02:32.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 10, 00:40
Unknown Object (File)
Sun, Nov 10, 00:39
Unknown Object (File)
Sat, Nov 9, 16:15
Unknown Object (File)
Fri, Nov 8, 09:12
Unknown Object (File)
Fri, Nov 8, 09:12
Unknown Object (File)
Fri, Nov 8, 09:12
Unknown Object (File)
Fri, Nov 8, 08:49
Unknown Object (File)
Fri, Nov 8, 08:26
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.