mkdocs-git-committers-plugin-2 icon indicating copy to clipboard operation
mkdocs-git-committers-plugin-2 copied to clipboard

Excluded files should not be logged as warning

Open dstockhammer opened this issue 1 year ago • 3 comments

Excluding files results in a warning, which causes the build to fail with strict mode. Please change the log level to info.

Example:

plugins:
  - git-committers:
      # ...
      exclude:
        - index.md
> mkdocs build --strict

INFO    -  git-committers plugin ENABLED
INFO    -  git-committers: found page authors cache file - loading it
INFO    -  Cleaning site directory
INFO    -  Building documentation to directory: /app/site
WARNING -  git-committers: index.md is excluded
INFO    -  git-committers: fetching contributors for docs/xxx.md
INFO    -  git-committers: saving page authors cache file

Aborted with 1 warnings in strict mode!

dstockhammer avatar Feb 15 '24 11:02 dstockhammer

In addition to this, the new pages/404 issue that's described on the readme also triggers similar issues with strict build.

Getting the contributors relies on what is available on GitHub. This means that for new files, the build will report no contributors (and informed you with a 404 error which can be ignored) When the file is merged, the contributors will be added normally.

Would appreciate some log level configuration in the plugin so I can mark missing pages as INFO level for builds. Currently unable to use the plugin due to the requirement to have strict builds enabled in our CI.

danielloader avatar Feb 22 '24 09:02 danielloader

Thanks @dstockhammer - fixed with your PR. @danielloader, in contrary to what is written in the README, this does not fail (anymore?) on GitHub. The API returns a 200 OK with empty body when asking for the list of commits. I changed the API call a couple of time to get to what I wanted. Can you confirm you have the issue, and maybe give me steps to reproduce?

ojacques avatar Feb 24 '24 08:02 ojacques

Fixed with #53

ojacques avatar Feb 24 '24 08:02 ojacques