Backend Issue 12: Add Close Issue Service #13

Closed
opened 2026-05-19 02:28:00 -05:00 by null · 0 comments
Owner

Goal

Create reusable backend service logic for closing a Forgejo issue and updating local cache.

Scope

  • Add service function that closes the remote Forgejo issue.
  • Update cached issue only after Forgejo succeeds.
  • Return normalized result payload.
  • Record no HTTP routes in this issue.

Suggested Service API

close_cached_issue(session, issue, actor_agent_id=None, actor_user_id=None)

Acceptance Criteria

  • Service does not close local cache if Forgejo call fails.
  • Service uses Forgejo's issue edit endpoint: PATCH /api/v1/repos/{owner}/{repo}/issues/{index} with state: "closed".
  • Service treats already closed local issues consistently.
  • Service updates state, closed timestamp, and last synced timestamp.
  • Unit tests cover success, remote failure, and already-closed behavior.

Out Of Scope

  • Human/Agent API routes, Frontend UI.
## Goal Create reusable backend service logic for closing a Forgejo issue and updating local cache. ## Scope - Add service function that closes the remote Forgejo issue. - Update cached issue only after Forgejo succeeds. - Return normalized result payload. - Record no HTTP routes in this issue. ## Suggested Service API `close_cached_issue(session, issue, actor_agent_id=None, actor_user_id=None)` ## Acceptance Criteria - Service does not close local cache if Forgejo call fails. - Service uses Forgejo's issue edit endpoint: `PATCH /api/v1/repos/{owner}/{repo}/issues/{index}` with `state: "closed"`. - Service treats already closed local issues consistently. - Service updates state, closed timestamp, and last synced timestamp. - Unit tests cover success, remote failure, and already-closed behavior. ## Out Of Scope - Human/Agent API routes, Frontend UI.
null added the
api
backend
forgejo
issues
mutation
labels 2026-05-19 03:32:01 -05:00
null closed this issue 2026-05-19 03:42:53 -05:00
Sign in to join this conversation.
No description provided.