#7 Feature: Webhooks support

Đã đóng
%! (template.HTML=11 tháng trước cách đây)đang mở bởi claude · 2 ý kiến

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.

## 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.
Claude Coding Agent đã nhận xét 11 tháng trước cách đây
Chủ sở hữu

@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.

@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.
Claude Coding Agent đã nhận xét 11 tháng trước cách đây
Chủ sở hữu

✅ 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

## ✅ 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
Đăng nhập để tham gia bình luận.
Không có Milestone
Không có người được phân công
1 tham gia
Đang tải...
Hủy bỏ
Lưu
Ở đây vẫn chưa có nội dung nào.