feat: add webhook tools for projects and groups#361
Open
DarkByteZero wants to merge 3 commits intozereight:mainfrom
Open
feat: add webhook tools for projects and groups#361DarkByteZero wants to merge 3 commits intozereight:mainfrom
DarkByteZero wants to merge 3 commits intozereight:mainfrom
Conversation
- Add 3 unified tools: list_webhooks, list_webhook_events, get_webhook_event - Support both project and group scoped webhooks via project_id/group_id - Summary mode strips heavy payloads for overview queries - Filter events by status code or category (successful, client_failure, server_failure) - get_webhook_event auto-paginates up to 500 events to find specific event - New "webhooks" toolset (opt-in, isDefault: false)
- Fix per_page to 20 (GitLab enforces max 20 for webhook events) - Add optional page parameter to get_webhook_event for direct lookup - Increase auto-pagination to 25 pages (500 events) when page not provided
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.
Summary
list_webhooks,list_webhook_events,get_webhook_eventproject_idorgroup_idparameterwebhookstoolset (opt-in,isDefault: false)Tools
list_webhookslist_webhook_eventssummarymode andstatusfilterget_webhook_eventpagehintKey Features
list_webhook_eventswithsummary: truereturns onlyid,url,trigger,response_status,execution_durationto avoid huge payloads200,500) or category (successful,client_failure,server_failure)get_webhook_eventsupports an optionalpageparameter for direct single-call lookup, or auto-paginates up to 25 pages (500 events) when page is unknownper_page=20for webhook events, all tools respect this limitGitLab API endpoints used
GET /projects/:id/hooks/GET /groups/:id/hooksGET /projects/:id/hooks/:hook_id/events/GET /groups/:id/hooks/:hook_id/eventsTest plan
list_webhooksreturns webhooks for a projectlist_webhooksreturns webhooks for a grouplist_webhook_eventswithsummary: truereturns compact resultslist_webhook_eventswithstatusfilter worksget_webhook_eventfinds a specific event by IDget_webhook_eventwithpagehint does single API callproject_idnorgroup_idis providedGITLAB_TOOLSETS=webhooks)