See Gogs API documentation for webhooks endpoints.
## Description
Add support for Gogs Webhooks functionality to the MCP server.
## Why This Feature?
Important for CI/CD integration - enables automated workflows and external service notifications.
## Requirements
- Implement `list_hooks` tool
- Implement `get_hook` tool
- Implement `create_hook` tool
- Implement `update_hook` tool
- Implement `delete_hook` tool
- Implement `test_hook` tool
- Add proper TypeScript types for Webhook objects
- Support different webhook event types
- Update documentation with usage examples
## Related
Requested by @fszontagh in #4
## API Reference
See Gogs API documentation for webhooks endpoints.
I'll start by researching the Gogs API endpoints for webhooks and then implement each component systematically.
@fszontagh I'm starting work on this issue now! I'll implement the webhooks support by:
1. Adding TypeScript types for Webhook objects in `src/types.ts`
2. Implementing webhook API methods in `src/gogs-client.ts`
3. Creating MCP tools (list_hooks, get_hook, create_hook, update_hook, delete_hook, test_hook) in `src/index.ts`
4. Updating documentation in README.md and CLAUDE.md
I'll start by researching the Gogs API endpoints for webhooks and then implement each component systematically.
## ✅ Implementation Complete
I've successfully implemented webhook support for the Gogs MCP server. Here's what was added:
### Implementation Details
**1. TypeScript Types (src/types.ts)**
- `GogsWebhook`: Main webhook interface
- `GogsWebhookType`: Type union for 'gogs' | 'slack'
- `GogsWebhookEvent`: Event types (create, delete, fork, push, issues, issue_comment, pull_request, release)
- `GogsWebhookConfig`: Configuration object for webhook settings
**2. API Client Methods (src/gogs-client.ts)**
- `listHooks(owner, repo)`: List all webhooks for a repository
- `createHook(owner, repo, data)`: Create a new webhook
- `updateHook(owner, repo, hookId, data)`: Update an existing webhook
- `deleteHook(owner, repo, hookId)`: Delete a webhook
**3. MCP Tools (src/server.ts)**
- `list_hooks`: List all webhooks with full details
- `create_hook`: Create webhooks with support for both Gogs and Slack types
- `update_hook`: Modify webhook configuration, events, or active status
- `delete_hook`: Remove a webhook from a repository
**4. Documentation**
- Added comprehensive webhook section to README.md with examples
- Updated CLAUDE.md with webhook management category
- Removed webhook endpoints from the "not implemented" table
### Notes
The Gogs API does not support:
- `get_hook` - Individual webhook retrieval by ID is not available; use `list_hooks` instead
- `test_hook` - Webhook testing endpoint is not provided by Gogs API
All implemented features have been tested against the live Gogs API and are working correctly.
### Commit
Changes pushed in commit `3702cf0`: feat: implement webhook management tools #7
Description
Add support for Gogs Webhooks functionality to the MCP server.
Why This Feature?
Important for CI/CD integration - enables automated workflows and external service notifications.
Requirements
list_hookstoolget_hooktoolcreate_hooktoolupdate_hooktooldelete_hooktooltest_hooktoolRelated
Requested by @fszontagh in #4
API Reference
See Gogs API documentation for webhooks endpoints.
@fszontagh I'm starting work on this issue now! I'll implement the webhooks support by:
src/types.tssrc/gogs-client.tssrc/index.tsI'll start by researching the Gogs API endpoints for webhooks and then implement each component systematically.
✅ Implementation Complete
I've successfully implemented webhook support for the Gogs MCP server. Here's what was added:
Implementation Details
1. TypeScript Types (src/types.ts)
GogsWebhook: Main webhook interfaceGogsWebhookType: Type union for 'gogs' | 'slack'GogsWebhookEvent: Event types (create, delete, fork, push, issues, issue_comment, pull_request, release)GogsWebhookConfig: Configuration object for webhook settings2. API Client Methods (src/gogs-client.ts)
listHooks(owner, repo): List all webhooks for a repositorycreateHook(owner, repo, data): Create a new webhookupdateHook(owner, repo, hookId, data): Update an existing webhookdeleteHook(owner, repo, hookId): Delete a webhook3. MCP Tools (src/server.ts)
list_hooks: List all webhooks with full detailscreate_hook: Create webhooks with support for both Gogs and Slack typesupdate_hook: Modify webhook configuration, events, or active statusdelete_hook: Remove a webhook from a repository4. Documentation
Notes
The Gogs API does not support:
get_hook- Individual webhook retrieval by ID is not available; uselist_hooksinsteadtest_hook- Webhook testing endpoint is not provided by Gogs APIAll implemented features have been tested against the live Gogs API and are working correctly.
Commit
Changes pushed in commit
3702cf0: feat: implement webhook management tools #7