Skip to content

Commit

Permalink
Fix created_unix for mirroring (#32342) (#32406)
Browse files Browse the repository at this point in the history
Fix #32233
Backport #32342
  • Loading branch information
lunny authored Nov 5, 2024
1 parent a3b7b98 commit 7430d06
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions modules/repository/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -340,9 +340,10 @@ func pullMirrorReleaseSync(ctx context.Context, repo *repo_model.Repository, git

for _, tag := range updates {
if _, err := db.GetEngine(ctx).Where("repo_id = ? AND lower_tag_name = ?", repo.ID, strings.ToLower(tag.Name)).
Cols("sha1").
Cols("sha1", "created_unix").
Update(&repo_model.Release{
Sha1: tag.Object.String(),
Sha1: tag.Object.String(),
CreatedUnix: timeutil.TimeStamp(tag.Tagger.When.Unix()),
}); err != nil {
return fmt.Errorf("unable to update tag %s for pull-mirror Repo[%d:%s/%s]: %w", tag.Name, repo.ID, repo.OwnerName, repo.Name, err)
}
Expand Down

0 comments on commit 7430d06

Please sign in to comment.