Page MenuHomeDevCentral

Refactor GitHubPayloadAnalyzer into payloads individual rules
ClosedPublic

Authored by dereckson on Feb 6 2016, 05:36.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Dec 14, 19:15
Unknown Object (File)
Fri, Dec 13, 06:12
Unknown Object (File)
Fri, Dec 13, 05:20
Unknown Object (File)
Thu, Dec 12, 17:26
Unknown Object (File)
Thu, Dec 12, 06:56
Unknown Object (File)
Thu, Dec 12, 05:13
Unknown Object (File)
Tue, Dec 10, 21:19
Unknown Object (File)
Tue, Dec 10, 17:23
Subscribers

Details

Summary

Instead of trying to parse every payload in GitHubPayloadAnalyzer,
we split the processing into several rules class, one class per type.
They are located in app/Analyzers/GitHub/Events.

So, if GitHub introduces a new event type, the only thing to do is
to create a new class for this event, provide sensible return values
for getDescription and getLink. The class will then be autoloaded.

Test Plan

phpunit

Code coverage at 100% for the new classes and the
modified parts of GitHubPayloadAnalyzer.

Diff Detail

Repository
rNOTIF Notifications center
Lint
Lint Passed
Unit
Tests Passed
Branch
refactoring/GitHubPayloadAnalyzer

Event Timeline

dereckson retitled this revision from to [WIP] Refactor GitHubPayloadAnalyzer.
dereckson updated this object.
dereckson edited the test plan for this revision. (Show Details)
dereckson added a reviewer: dereckson.
dereckson edited edge metadata.

Whitespace issues

dereckson edited edge metadata.

More tests: WithCommit, DeleteEvent

Previous diff 638 overwrote the UnknownEvent class with the test class.

  • More tests
  • Fixed a l10n issue in PushEvent::getDescriptionMessageKey

RepositoryEventTest coverage

  • GitHubPayloadAnalyzerTest code coverage for our refactoring
  • Tidy up a little these files
dereckson retitled this revision from [WIP] Refactor GitHubPayloadAnalyzer to Refactor GitHubPayloadAnalyzer into payloads individual rules .Feb 9 2016, 16:52
dereckson updated this object.
dereckson edited the test plan for this revision. (Show Details)
dereckson updated this object.
dereckson retitled this revision from Refactor GitHubPayloadAnalyzer into payloads individual rules to Refactor GitHubPayloadAnalyzer into payloads individual rules.
dereckson updated this object.

Final tweaks, renamed DockerHubPush… by GitHubPush…

dereckson edited edge metadata.
This revision is now accepted and ready to land.Feb 9 2016, 17:18
This revision was automatically updated to reflect the committed changes.