diff options
Diffstat (limited to 'git-gmi')
-rw-r--r-- | git-gmi/git.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/git-gmi/git.py b/git-gmi/git.py index ca8be4b..79a59c4 100644 --- a/git-gmi/git.py +++ b/git-gmi/git.py @@ -34,6 +34,15 @@ class GitGmiRepo: def view_summary(self) -> str: response = f"{STATUS_SUCCESS} {META_GEMINI}\n" + self.generate_header() + # show 3 recent commits + recent_commits = self.get_commit_log()[:3] + for cmt in recent_commits: + time = str(datetime.utcfromtimestamp(cmt["time"])) + " UTC" + response += ( + f"### {cmt['short_id']} - {cmt['author']} - {time}\n" + f"{cmt['msg'].splitlines()[0]}\n\n" + ) # TODO: link to commit view + # find and display readme(.*) tree = self.get_tree(MAIN_BRANCH) trls = self.list_tree(tree) found_readme = False |