From d765cb2aecdd57cf0f116ef1b522d0a66c772e1f Mon Sep 17 00:00:00 2001 From: pomidorry Date: Fri, 8 May 2026 21:16:54 +0300 Subject: [PATCH] naming --- modules/structs/repo.go | 2 +- services/convert/repository.go | 2 +- templates/swagger/v1_json.tmpl | 10 +++++----- templates/swagger/v1_openapi3_json.tmpl | 10 +++++----- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/modules/structs/repo.go b/modules/structs/repo.go index 44486cd9cd..c33aea8a8d 100644 --- a/modules/structs/repo.go +++ b/modules/structs/repo.go @@ -127,7 +127,7 @@ type Repository struct { // swagger:strfmt date-time MirrorUpdated time.Time `json:"mirror_updated"` // swagger:strfmt date-time - LastSync time.Time `json:"last_sync"` + MirrorLastSyncAt time.Time `json:"mirror_last_sync_at"` RepoTransfer *RepoTransfer `json:"repo_transfer,omitempty"` Topics []string `json:"topics"` Licenses []string `json:"licenses"` diff --git a/services/convert/repository.go b/services/convert/repository.go index 1976a78e1b..ec010ee375 100644 --- a/services/convert/repository.go +++ b/services/convert/repository.go @@ -249,7 +249,7 @@ func innerToRepo(ctx context.Context, repo *repo_model.Repository, permissionInR DefaultTargetBranch: defaultTargetBranch, AvatarURL: repo.AvatarLink(ctx), Internal: !repo.IsPrivate && repo.Owner.Visibility == api.VisibleTypePrivate, - LastSync: lastSync, + MirrorLastSyncAt: lastSync, MirrorInterval: mirrorInterval, MirrorUpdated: mirrorUpdated, RepoTransfer: transfer, diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index 697999c0d1..8b21b53dc6 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -29020,11 +29020,6 @@ "type": "string", "x-go-name": "LanguagesURL" }, - "last_sync": { - "type": "string", - "format": "date-time", - "x-go-name": "LastSync" - }, "licenses": { "type": "array", "items": { @@ -29044,6 +29039,11 @@ "type": "string", "x-go-name": "MirrorInterval" }, + "mirror_last_sync_at": { + "type": "string", + "format": "date-time", + "x-go-name": "MirrorLastSyncAt" + }, "mirror_updated": { "type": "string", "format": "date-time", diff --git a/templates/swagger/v1_openapi3_json.tmpl b/templates/swagger/v1_openapi3_json.tmpl index bacb1f8821..ec04a0a1ee 100644 --- a/templates/swagger/v1_openapi3_json.tmpl +++ b/templates/swagger/v1_openapi3_json.tmpl @@ -9273,11 +9273,6 @@ "type": "string", "x-go-name": "LanguagesURL" }, - "last_sync": { - "format": "date-time", - "type": "string", - "x-go-name": "LastSync" - }, "licenses": { "items": { "type": "string" @@ -9297,6 +9292,11 @@ "type": "string", "x-go-name": "MirrorInterval" }, + "mirror_last_sync_at": { + "format": "date-time", + "type": "string", + "x-go-name": "MirrorLastSyncAt" + }, "mirror_updated": { "format": "date-time", "type": "string",