feat: support .mailmap for git co-authors and author exclusions in au… - #34
Open
luminoso wants to merge 2 commits into
Open
feat: support .mailmap for git co-authors and author exclusions in au…#34luminoso wants to merge 2 commits into
luminoso wants to merge 2 commits into
Conversation
…thors.yml - Resolve Co-Authored-By trailers with git check-mailmap against .mailmap - Match authors.yml entries by key, name, and email - Support ignore/exclude flags in authors.yml to omit bots or system accounts - Deduplicate authors by canonical name in _load_author_cached
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Git applies
.mailmapto%aNand%aEauthor fields, but leaves the commit message body (%B) untouched. Becausemkdocs-document-datesparsesCo-Authored-By:trailers directly from the body text, co-authors bypass.mailmaprules.This pull request resolves co-authors through
git check-mailmap, adds author exclusion support toauthors.yml, and prevents duplicate author avatars on the rendered page.What changed
utils.py):parse_commit_authorsnow passes extractedCo-Authored-By:pairs throughgit check-mailmap, mapping variations and aliases to their canonical name and email.authors.ymllookup (plugin.py):_load_authors_from_yamlindexes entries by dictionary key, configuredname, andemailso metadata attaches regardless of which identifier git returns.plugin.py): settingignore: trueorexclude: trueon an author inauthors.ymldrops them from the rendered footer. This lets sites omit bots and service accounts without disabling git author tracking.plugin.py):_load_author_cacheddeduplicates entries by canonical author name, avoiding duplicate avatars when multiple aliases appear in history.How to test
.mailmapentry pointing alias co-authors to a single identity:Co-Authored-By: Jane Dev <jane.dev@example.com>.mkdocs build.Jane Doe <jane@example.com>instead of the raw trailer value.ignore: trueto an author inauthors.ymland rebuild: the author is omitted from the page footer.