Page MenuHomeDevCentral

Detect default branch change in repository GitHub event
ClosedPublic

Authored by dereckson on Apr 24 2022, 11:25.
Tags
None
Referenced Files
F2747050: D2680.id6817.diff
Fri, Mar 29, 04:08
F2743775: D2680.id.diff
Thu, Mar 28, 12:15
Unknown Object (File)
Wed, Mar 27, 15:11
Unknown Object (File)
Wed, Mar 27, 04:22
Unknown Object (File)
Thu, Mar 21, 10:52
Unknown Object (File)
Thu, Mar 21, 06:19
Unknown Object (File)
Mon, Mar 18, 04:18
Unknown Object (File)
Sat, Mar 16, 04:35
Subscribers
None

Details

Summary

The repository GitHub event has now in the API a new action "edited",
for example when the repository default branch is changed.

This change assigns to a default branch change payload a new event
"default_branch" overriding the GitHub "repository" one, to avoid
raising too much the complexity of RepositoryEvent.

Fixes T1729.

Test Plan

Unit test provided.

Diff Detail

Repository
rNOTIF Notifications center
Lint
Lint Passed
Unit
Test Failures
Branch
github-default-branch-change
Build Status
Buildable 4213
Build 4465: arc lint + arc unit

Unit TestsBroken

TimeTest
0 ms/usr/home/dereckson/dev/nasqueron/notifications/notifications/tests/Analyzers/GitHub/GitHubPayloadAnalyzerTest.php
Fatal error: Declaration of Nasqueron\Notifications\Tests\Analyzers\GitHubPayloadAnalyzerTest::setUp() must be compatible with Illuminate\Foundation\Testing\TestCase::setUp(): void in /usr/home/dereckson/dev/nasqueron/notifications/notifications/tests/Analyzers/GitHub/GitHubPayloadAnalyzerTest.php on line 33
44 msNasqueron\Notifications\Tests\Analyzers\GitHub\Events\DefaultBranchEventTest