mdBook icon indicating copy to clipboard operation
mdBook copied to clipboard

Add the names of all contributors to the documentation

Open rohansx opened this issue 1 year ago • 5 comments

Problem

Screenshot from 2023-04-15 00-01-13

There are only a few names mentioned on the contributor's page while there are 265 contributors.

Proposed Solution

So, adding the names of all the contributors would be better and I would like to take on this task and would love to contribute.

Notes

No response

rohansx avatar Apr 14 '23 18:04 rohansx

I would love to take on this task and would love to contribute.

rohansx avatar Apr 14 '23 18:04 rohansx

Hi!

I just came across this issue and your PR #2072. I think you could use mdbook-cmdrun for this. I checked the GitHub api, you can curl the list of contributors here https://api.github.com/repos/rust-lang/mdBook/contributors.

To display the name of each contributor if it is listed on GitHub, you can also curl the name using https://api.github.com/users/:user_name. When it is defined like ehuss, the name is not null, otherwise like mdinger, the name is null.

Some quick commands:

curl https://api.github.com/repos/rust-lang/mdBook/contributors
curl https://api.github.com/users/ehuss
curl https://api.github.com/users/mdinger

I see multiple drawbacks from this approach:

  • Apparently the github api is not processing results but are caching them, so the list may be inaccurate link
  • Using an external script and fetching all contributors information could be long, especially when someone is working on the book, this could be solved by caching the results locally (in /tmp for example).
  • The book artifact won't be deterministic anymore

FauconFan avatar Apr 19 '23 13:04 FauconFan

https://api.github.com/repos/rust-lang/mdBook/contributors only returns 30 contributors for me.

expikr avatar Apr 20 '23 22:04 expikr

According to the documentation link, only the first 100 contributors that has contributed on default branch (I guess Master) are present. This is a good filter though.

FauconFan avatar Apr 22 '23 14:04 FauconFan

All contributors have been logged by git, and I think it's sufficient to list only the main contributors on the documentation. You can get all contributors by using git shortlog -sne in the git repository, refer to https://git-scm.com/docs/git-shortlog

wc7086 avatar May 14 '23 10:05 wc7086