Cybrkyd's git repositories

GitGen • commit: 58f3cd9

commit 58f3cd9369022969d1be5516b6c47954690b0cd52b6f4ff89fe7faf405773a0c
author cybrkyd <noreply@cybrkyd.com> 2026-01-11 12:34:52 +0000
committer cybrkyd <noreply@cybrkyd.com> 2026-01-11 12:34:52 +0000

Commit Message

Added tags on commit details pages

📊 Diffstat

gitgen.py 15
1 files changed, 15 insertions(+), 0 deletions(-)

Diff

diff --git a/gitgen.py b/gitgen.py
index cbfec6b..8cc5e10 100644
--- a/gitgen.py
+++ b/gitgen.py
@@ -528,6 +528,20 @@ class HTMLGenerator:
</html>
"""
+ # Get tags for this commit
+ tags_output = self.scanner.run_git_command(repo['path'], [
+ 'tag', '--points-at', commit['hash']
+ ])
+ tags = []
+ if tags_output:
+ tags = [tag.strip() for tag in tags_output.strip().split('\n') if tag.strip()]
+
+ # Generate tags HTML if present
+ tags_html = ""
+ if tags:
+ tags_list = " ".join([f'<span class="tag-badge">{html.escape(tag)}</span>' for tag in tags])
+ tags_html = f'<span class="label">tag:</span>{tags_list}</span>'
+
diffstat_content = ""
total_insertions = 0
total_deletions = 0
@@ -631,6 +645,7 @@ class HTMLGenerator:
<span class="value">{commit['date']}</span>
<span class="label">author:</span>
<span class="value">{commit['author_escaped']} &lt;{commit['email_escaped']}&gt;</span>
+ {tags_html}
<div class="commit-message-box">
<h3>Commit Message</h3>