feat: implement advanced issue interactions (reactions, lock, pin, subscribe) #4

Open
opened 2026-06-02 06:56:54 +00:00 by a-limasov · 0 comments
Owner

Context

Beyond basic CRUD, issues support rich interactions: emoji reactions express sentiment
without comments, locking prevents further discussion, pinning highlights important issues,
and subscriptions control notifications. All are standard GitHub/Gitea UI features.

Endpoints to implement

Method Path Tool name Description
GET /repos/{owner}/{repo}/issues/{index}/reactions list_issue_reactions List reactions on issue
POST /repos/{owner}/{repo}/issues/{index}/reactions add_issue_reaction Add reaction
DELETE /repos/{owner}/{repo}/issues/{index}/reactions remove_issue_reaction Remove reaction
GET /repos/{owner}/{repo}/issues/comments/{id}/reactions list_comment_reactions List reactions on comment
POST /repos/{owner}/{repo}/issues/comments/{id}/reactions add_comment_reaction Add reaction to comment
DELETE /repos/{owner}/{repo}/issues/comments/{id}/reactions remove_comment_reaction Remove reaction from comment
POST /repos/{owner}/{repo}/issues/{index}/lock lock_issue Lock issue conversation
DELETE /repos/{owner}/{repo}/issues/{index}/lock unlock_issue Unlock issue conversation
POST /repos/{owner}/{repo}/issues/{index}/pin pin_issue Pin issue to top of list
DELETE /repos/{owner}/{repo}/issues/{index}/pin unpin_issue Unpin issue
GET /repos/{owner}/{repo}/issues/{index}/subscriptions list_issue_subscribers List subscribers
PUT /repos/{owner}/{repo}/issues/{index}/subscriptions/{user} subscribe_to_issue Subscribe user
DELETE /repos/{owner}/{repo}/issues/{index}/subscriptions/{user} unsubscribe_from_issue Unsubscribe user

Acceptance Criteria

  • Reaction tools accept content param: +1 | -1 | laugh | confused | heart | hooray | rocket | eyes
  • lock_issue accepts optional lock_reason: off-topic | too heated | resolved | spam
  • pin_issue / unpin_issue return {"success": true} on 204
  • subscribe_to_issue / unsubscribe_from_issue work for any user (not just authenticated)
  • All 204 responses handled correctly via _req

Technical Notes

  • Reactions body: {"content": "+1"}
  • Lock body: {"lock_reason": "resolved"} — lock_reason is optional
  • Pin/lock/subscribe are all idempotent — calling twice should not error
## Context Beyond basic CRUD, issues support rich interactions: emoji reactions express sentiment without comments, locking prevents further discussion, pinning highlights important issues, and subscriptions control notifications. All are standard GitHub/Gitea UI features. ## Endpoints to implement | Method | Path | Tool name | Description | |--------|------|-----------|-------------| | GET | `/repos/{owner}/{repo}/issues/{index}/reactions` | `list_issue_reactions` | List reactions on issue | | POST | `/repos/{owner}/{repo}/issues/{index}/reactions` | `add_issue_reaction` | Add reaction | | DELETE | `/repos/{owner}/{repo}/issues/{index}/reactions` | `remove_issue_reaction` | Remove reaction | | GET | `/repos/{owner}/{repo}/issues/comments/{id}/reactions` | `list_comment_reactions` | List reactions on comment | | POST | `/repos/{owner}/{repo}/issues/comments/{id}/reactions` | `add_comment_reaction` | Add reaction to comment | | DELETE | `/repos/{owner}/{repo}/issues/comments/{id}/reactions` | `remove_comment_reaction` | Remove reaction from comment | | POST | `/repos/{owner}/{repo}/issues/{index}/lock` | `lock_issue` | Lock issue conversation | | DELETE | `/repos/{owner}/{repo}/issues/{index}/lock` | `unlock_issue` | Unlock issue conversation | | POST | `/repos/{owner}/{repo}/issues/{index}/pin` | `pin_issue` | Pin issue to top of list | | DELETE | `/repos/{owner}/{repo}/issues/{index}/pin` | `unpin_issue` | Unpin issue | | GET | `/repos/{owner}/{repo}/issues/{index}/subscriptions` | `list_issue_subscribers` | List subscribers | | PUT | `/repos/{owner}/{repo}/issues/{index}/subscriptions/{user}` | `subscribe_to_issue` | Subscribe user | | DELETE | `/repos/{owner}/{repo}/issues/{index}/subscriptions/{user}` | `unsubscribe_from_issue` | Unsubscribe user | ## Acceptance Criteria - [ ] Reaction tools accept `content` param: `+1` | `-1` | `laugh` | `confused` | `heart` | `hooray` | `rocket` | `eyes` - [ ] `lock_issue` accepts optional `lock_reason`: `off-topic` | `too heated` | `resolved` | `spam` - [ ] `pin_issue` / `unpin_issue` return `{"success": true}` on 204 - [ ] `subscribe_to_issue` / `unsubscribe_from_issue` work for any user (not just authenticated) - [ ] All 204 responses handled correctly via `_req` ## Technical Notes - Reactions body: `{"content": "+1"}` - Lock body: `{"lock_reason": "resolved"}` — lock_reason is optional - Pin/lock/subscribe are all idempotent — calling twice should not error
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: a-limasov/gitea-platform-mcp#4