Backend Issue 7: Add Issue Sync Service And Manual Sync API #8

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

Goal

Fetch issues from Forgejo and upsert them into Pipeline's local issue cache.

Scope

  • Add a sync service that uses the Forgejo API client.
  • Add admin-only manual sync endpoint for one tracked repository.
  • Upsert issues into forgejo_issues.
  • Update repository sync metadata.

Suggested Endpoint

  • POST /api/v1/forgejo/repositories/{repository_id}/sync

Acceptance Criteria

  • Sync paginates through Forgejo issues using page and limit.
  • Sync stores open and closed issues.
  • Sync excludes pull requests from MVP issue counts and views.
  • Sync returns created, updated, open, closed, and total counts.
  • Sync updates last_sync_at on success.
  • Sync updates last_sync_error on failure without leaking token values.
  • Tests cover pagination, idempotent upsert, and Forgejo failure.

Out Of Scope

  • Human issue list API, agent issue API, Frontend UI.
## Goal Fetch issues from Forgejo and upsert them into Pipeline's local issue cache. ## Scope - Add a sync service that uses the Forgejo API client. - Add admin-only manual sync endpoint for one tracked repository. - Upsert issues into `forgejo_issues`. - Update repository sync metadata. ## Suggested Endpoint - `POST /api/v1/forgejo/repositories/{repository_id}/sync` ## Acceptance Criteria - Sync paginates through Forgejo issues using `page` and `limit`. - Sync stores open and closed issues. - Sync excludes pull requests from MVP issue counts and views. - Sync returns created, updated, open, closed, and total counts. - Sync updates `last_sync_at` on success. - Sync updates `last_sync_error` on failure without leaking token values. - Tests cover pagination, idempotent upsert, and Forgejo failure. ## Out Of Scope - Human issue list API, agent issue API, Frontend UI.
null closed this issue 2026-05-19 03:17:08 -05:00
null added the
api
backend
forgejo
issues
labels 2026-05-19 03:32:00 -05:00
Sign in to join this conversation.
No description provided.