Skip to content

Conversation

@dottxado
Copy link
Contributor

Description

Add the filter to customize the branch to elaborate when a webhook is received. Since most of the logic is common between the handlers, it has been extracted to the Base class.

Add the repository name to the existing filter to allow resolving the project inside the filter.

How has this been tested?

I tested this feature locally with some limitations. I tested sending a webhook, and I can see the request is going through without errors.

Types of changes

Bug fix (non-breaking change which fixes an issue)
Fixes #280

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code has proper inline documentation.

@codecov
Copy link

codecov bot commented Nov 21, 2025

Codecov Report

❌ Patch coverage is 95.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.72%. Comparing base (9ee3c19) to head (5e39df7).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
inc/Loader/Git.php 0.00% 1 Missing ⚠️
inc/WebhookHandler/GitHub.php 90.90% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #281      +/-   ##
============================================
+ Coverage     72.35%   72.72%   +0.37%     
- Complexity      410      414       +4     
============================================
  Files            28       28              
  Lines          1248     1265      +17     
============================================
+ Hits            903      920      +17     
  Misses          345      345              
Flag Coverage Δ
feature 12.33% <0.00%> (-0.17%) ⬇️
php 65.60% <95.00%> (+0.47%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dottxado
Copy link
Contributor Author

Hello @ocean90 👋
Sorry for the ping....did you have the chance to review this? 🙇

@swissspidy swissspidy requested a review from ocean90 December 5, 2025 14:19
@swissspidy
Copy link
Collaborator

Looks like some unit tests need updating.

After that I need to defer to @ocean90 for review.

@dottxado
Copy link
Contributor Author

Hi there 👋
The PR is ready for your review @ocean90: I fixed an issue, and the tests 🙇

@ocean90 ocean90 enabled auto-merge (squash) January 16, 2026 11:10
ocean90
ocean90 previously approved these changes Jan 16, 2026
auto-merge was automatically disabled January 16, 2026 11:34

Head branch was pushed to by a user without write access

@dottxado
Copy link
Contributor Author

Oooops sorry, I didn't notice the code sniffer error!

ocean90
ocean90 previously approved these changes Jan 16, 2026
@ocean90 ocean90 enabled auto-merge (squash) January 16, 2026 11:51
auto-merge was automatically disabled January 16, 2026 13:03

Head branch was pushed to by a user without write access

@ocean90 ocean90 merged commit 99709cd into wearerequired:master Jan 16, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support custom branch selection in webhook handlers

3 participants