Page MenuHomeDevCentral

Refactor GitHubPayloadAnalyzer into payloads individual rules
ClosedPublic

Authored by dereckson on Feb 6 2016, 05:36.
Tags
None
Referenced Files
F3755076: D274.id642.diff
Mon, Nov 18, 12:23
Unknown Object (File)
Fri, Nov 15, 05:42
Unknown Object (File)
Tue, Nov 12, 08:16
Unknown Object (File)
Mon, Nov 11, 02:15
Unknown Object (File)
Sun, Nov 10, 14:02
Unknown Object (File)
Sun, Nov 10, 06:04
Unknown Object (File)
Sun, Nov 10, 03:44
Unknown Object (File)
Sun, Nov 10, 03:43
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 Not Applicable
Unit
Tests Not Applicable

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.