You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-1Lines changed: 6 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,6 +54,11 @@ unless you access private repositories.
54
54
55
55
For private GitHub repositories, you only need to allow read-only access to `Contents` and `Metadata` on the target repository. This could be done by setting `Read-only` access of `Permissions > Repository permissions > Contents`.
56
56
57
+
## Counting Contributors
58
+
59
+
* In GitHub repositories, the commit authors, [committers](https://stackoverflow.com/a/18754896), and [co-authors](https://docs.github.com/en/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors) are counted as contributors. However, the plugin requires a GitHub token to fetch the list of co-authors. If co-authors exist but no token is provided, the plugin will show a warning and will only display the commit authors and committers.
60
+
* In GitLab repositories, only the commit authors are counted as contributors.
61
+
57
62
## Config
58
63
59
64
- `enabled` - Disables plugin if set to `False` for e.g. local builds (default: `True`)
@@ -79,7 +84,7 @@ For private GitHub repositories, you only need to allow read-only access to `Con
79
84
gitlab.com (self-hosted).
80
85
- `api_version`- For GitHub and GitLab self-hosted, the API version part that needs to be appended to the URL.
81
86
Defaults to v4 for GitLab, and nothing for GitHub Enterprise (you may need `v3`).
82
-
- `docs_path`- the path to the documentation folder. Defaults to `docs`.
87
+
- `docs_path`- the path to the documentation folder. Defaults to `docs/`.
83
88
- `cache_dir`- The path which holds the authors cache file to speed up
84
89
documentation builds. Defaults to `.cache/plugin/git-committers/`. The cache
# Get co-authors info through the GraphQL API, which is not available in the REST API
166
+
ifself.auth_headerisNone:
167
+
LOG.warning("git-committers: Co-authors exist in commit messages but will not be added, since no GitHub token is provided. Set it under 'token' mkdocs.yml config or MKDOCS_GIT_COMMITTERS_APIKEY environment variable.")
168
+
else:
169
+
LOG.info("git-committers: fetching contributors for "+path+" using GraphQL API")
170
+
# Query GraphQL API, and get a list of unique authors
0 commit comments