timvink / mkdocs-git-revision-date-localized-plugin

MkDocs plugin to add a last updated date to your site pages
https://timvink.github.io/mkdocs-git-revision-date-localized-plugin/index.html
MIT License
193 stars 39 forks source link

Add ignored commits feature #114

Open allanlw opened 1 year ago

allanlw commented 1 year ago

This addresses #113 by adding a new option "ignored_commits_file" that points to a file to contain commit hashes in the same format as blame.ignoreRevsFile that will be ignored during calculation of the most recent update. To the best of my knowledge, it is not possible to ask git log to ignore commits, so this must be done by the plugin.

I've added a basic unit test for the file parser, and an integration test to validate the commit ignoring behavior.

I've tested this on my own repository and verified that it behaves as expected.

pyflakes shows no new issues. pytest shows no changed lines without coverage.

timvink commented 1 year ago

Thanks! Well done on figuring this one out. Too bad we couldn't find something more elegant with using git internals like what is possible for git log.

I have some comments, and there are some failing unit tests. Please have a look :)

allanlw commented 1 year ago

I believe that the tests failed because of this codecov issue: https://about.codecov.io/blog/message-regarding-the-pypi-package/

Could you please re-run them? Then I can address any test failures along with the refactoring you requested all at once.