Explorar o código

tag 无按时间排序方法

walle-web.io %!s(int64=6) %!d(string=hai) anos
pai
achega
7df64467a1
Modificáronse 1 ficheiros con 1 adicións e 2 borrados
  1. 1 2
      walle/service/git/repo.py

+ 1 - 2
walle/service/git/repo.py

@@ -102,8 +102,7 @@ class Repo:
         @param kwargs:
         @return:
         '''
-        tags = PyRepo(self.path).git.tag(sort="taggerdate").split('\n')
-        return tags[::-1]
+        return [str(tag) for tag in PyRepo(self.path).tags][-10:]
 
     def commits(self, branch):
         '''