Expose last mirror sync timestamp through the API #8352

Closed
opened 2025-11-02 08:03:25 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @petergardfjall on GitHub (Jan 14, 2022).

Feature Description

One can queue up a sync operation for a mirror repo via POST /api/v1/{owner}/{repo}/mirror-sync.
However, there is no way for an API client of learning of completion (the UI does expose this information in the Last update mirror setting field, but not the REST API).

This issue proposes to add a mirror_updated field to the repository type (as returned by GET /api/v1/{owner}/{repo}).
For example, this allows API clients to determine if an initiated sync has completed, or take decisions on if a mirror repo should be synced (given some client-side policy on freshness).

Originally created by @petergardfjall on GitHub (Jan 14, 2022). ### Feature Description One can queue up a sync operation for a mirror repo via `POST /api/v1/{owner}/{repo}/mirror-sync`. However, there is no way for an API client of learning of completion (the _UI_ does expose this information in the `Last update` mirror setting field, but not the REST API). This issue proposes to add a `mirror_updated` field to the repository type (as returned by `GET /api/v1/{owner}/{repo}`). For example, this allows API clients to determine if an initiated sync has completed, or take decisions on if a mirror repo should be synced (given some client-side policy on freshness).
GiteaMirror added the type/featuremodifies/api labels 2025-11-02 08:03:25 -06:00
Author
Owner

@petergardfjall commented on GitHub (Jan 14, 2022):

PR in https://github.com/go-gitea/gitea/pull/18267

@petergardfjall commented on GitHub (Jan 14, 2022): PR in https://github.com/go-gitea/gitea/pull/18267
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#8352