From 1aaef56e5b3c3f4ba6e479c809bd77bc585c716b Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Wed, 23 Jun 2021 23:52:19 +0200 Subject: update_mtime(): Set the mtime to the repo's `pushed_at` time Use `pushed_at` instead of `updated_at`. This mtime is used to sort repositories on CGit's repository index page. Prevent things like GitHub stars from changing the sort order. The sort should instead be influenced by repository changes. --- src/github.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/github.rs') diff --git a/src/github.rs b/src/github.rs index 5289a0d..a3bb74e 100644 --- a/src/github.rs +++ b/src/github.rs @@ -47,6 +47,7 @@ pub struct Repo { pub default_branch: String, pub size: u64, pub updated_at: String, + pub pushed_at: String, } impl Repo { -- cgit v1.2.3