Add dispatcher routing support for MilestoneWebhookEvent#384
Merged
Conversation
Co-authored-by: flc1125 <14297703+flc1125@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add dispatcher routing for MilestoneWebhookEvent
Add dispatcher routing support for MilestoneWebhookEvent
Mar 9, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 3.x #384 +/- ##
==========================================
+ Coverage 92.55% 92.82% +0.26%
==========================================
Files 1 1
Lines 215 223 +8
==========================================
+ Hits 199 207 +8
Misses 11 11
Partials 5 5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
Pull request overview
Adds dispatcher-level support for GitLab milestone webhooks so *gitlab.MilestoneWebhookEvent no longer falls through to ErrUnsupportedEvent, aligning this repo’s dispatcher with the upstream client’s parsing support.
Changes:
- Introduces
MilestoneListener(OnMilestone) and wires it into the dispatcher registration flow. - Adds dispatcher routing + processing for
*gitlab.MilestoneWebhookEvent. - Adds a milestone webhook fixture and extends dispatcher tests to cover milestone dispatching.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
listeners.go |
Adds MilestoneListener interface for milestone event handling. |
dispatcher.go |
Registers milestone listeners and dispatches milestone webhook events to them. |
dispatcher_test.go |
Extends test listener + dispatch test matrix to validate milestone routing. |
testdata/webhooks/milestone.json |
Adds fixture payload used by the dispatcher tests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
14 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
*gitlab.MilestoneWebhookEventwas already parsed by the upstream client (EventTypeMilestone = "Milestone Hook") but fell through toErrUnsupportedEventin this dispatcher.Changes
listeners.go— newMilestoneListenerinterface withOnMilestonemethoddispatcher.go—milestoneListenersfield,RegisterMilestoneListener,processMilestoneEvent, andDispatchswitch case for*gitlab.MilestoneWebhookEventtestdata/webhooks/milestone.json— fixture for milestone webhook payloaddispatcher_test.go— compile-time assertion,OnMilestoneimpl ontestListener, and test case wired to the new fixtureUsage
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.