Page MenuHomeDevCentral

Refactor GitHubPayloadAnalyzer into payloads individual rules
ClosedPublic

Authored by dereckson on Feb 6 2016, 05:36.
Tags
None
Referenced Files
F2743682: D274.id643.diff
Thu, Mar 28, 11:30
F2741050: D274.diff
Wed, Mar 27, 22:55
Unknown Object (File)
Fri, Mar 22, 12:29
Unknown Object (File)
Mon, Mar 18, 14:37
Unknown Object (File)
Mon, Mar 18, 13:14
Unknown Object (File)
Sun, Mar 17, 10:22
Unknown Object (File)
Fri, Mar 15, 14:08
Unknown Object (File)
Wed, Mar 13, 17:49
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.