From 2c2ec0e20f92fd7d6d10907303208bb4d30d6b57 Mon Sep 17 00:00:00 2001 From: Johnson Sun Date: Thu, 11 Jul 2024 23:02:55 +0800 Subject: [PATCH] Include committers in GitHub repos --- mkdocs_git_committers_plugin_2/plugin.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mkdocs_git_committers_plugin_2/plugin.py b/mkdocs_git_committers_plugin_2/plugin.py index faca5a4..d96ed84 100644 --- a/mkdocs_git_committers_plugin_2/plugin.py +++ b/mkdocs_git_committers_plugin_2/plugin.py @@ -115,6 +115,12 @@ def get_contributors_to_file(self, path): 'url': commit['author']['html_url'], 'avatar': commit['author']['avatar_url'] }) + if commit['committer'] and commit['committer']['login'] and commit['committer']['login'] not in [author['login'] for author in authors]: + authors.append({'login': commit['committer']['login'], + 'name': commit['committer']['login'], + 'url': commit['committer']['html_url'], + 'avatar': commit['committer']['avatar_url'] + }) else: # GitLab if commit['author_name']: