Skip to content

Commit d21f44b

Browse files
committed
fix: v0.7.8 - GitHub API error handling + quote format
- Fixed KeyError when GitHub payload missing commits field - Updated Wisdom Drop format: [Category] Wisdom of the day - Improved error resilience for GitHub event parsing
1 parent f781090 commit d21f44b

File tree

5 files changed

+6
-5
lines changed

5 files changed

+6
-5
lines changed

commit_checker/checker.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,8 @@ def check_github_commits(username, token=None, use_cache=True):
167167
results = []
168168
for event in pushes_today:
169169
repo = event["repo"]["name"]
170-
count = len(event["payload"]["commits"])
170+
commits = event.get("payload", {}).get("commits", [])
171+
count = len(commits) if commits else 1
171172
results.append((repo, count))
172173

173174
if use_cache:

commit_checker/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ def main():
553553
sys.exit(0)
554554

555555
if args.version:
556-
print("🚀 commit-checker v0.7.7")
556+
print("🚀 commit-checker v0.7.8")
557557
print("💡 AI Commit Mentor with Wisdom Drop Integration")
558558
print("🔗 https://github.com/AmariahAK/commit-checker")
559559
sys.exit(0)

commit_checker/wisdom.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ def format_wisdom_quote(quote_data, emoji_mode=True):
199199
author = quote_data['author']
200200
category = quote_data['category']
201201

202-
return f"{icon} Wisdom Drop: \"{quote}\"{author}, {category}"
202+
return f"{icon} [{category}] Wisdom of the day: \"{quote}\"{author}"
203203

204204
def refresh_wisdom_quote():
205205
try:

scripts/commit-checker-standalone.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ def main():
265265
sys.exit(0)
266266
267267
if args.version:
268-
print("🚀 commit-checker v0.7.7")
268+
print("🚀 commit-checker v0.7.8")
269269
print("💡 AI Commit Mentor with Wisdom Drop Integration")
270270
print("🔗 https://github.com/AmariahAK/commit-checker")
271271
sys.exit(0)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
setup(
44
name="commit-checker",
5-
version="0.7.7",
5+
version="0.7.8",
66
description="AI-powered commit mentor CLI tool with Wisdom Drop integration, contextual commit suggestions, smart profile system, advanced analytics, and TIL logging",
77
author="Amariah Kamau",
88
packages=find_packages(),

0 commit comments

Comments
 (0)