-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue #70 Add automated contributors #73
base: main
Are you sure you want to change the base?
Conversation
Thanks - I think the only request I'd make is to get the access token from an environment variable so this can be run from GitHub actions. It's not safe to store tokens in plaintext in the repo. |
"openchemistry/avogenerators", | ||
"openchemistry/avogadro-commands", | ||
"openchemistry/avogadro-cclib", | ||
"cryos/avogadro", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The cryos/avogadro repository is now closed, so I moved the contributors to a separate list already. That way we don't continue to query for the same response.
credits_content = credits_file.read() | ||
|
||
updated_credits_content = credits_content.replace( | ||
"```{include} contributors.md```", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need to do this - the Sphinx / Myst build will include the credits.md
file automatically - here's the built file:
for contributor in contributors: | ||
username = contributor.login | ||
unique_contributors.add(username) | ||
contributors_file.write(f"- {username}\n") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be great to get the full name if available .. something like:
user = g.get_user(username)
if user.name is not None:
contributors_file.write(f"- [{user.name}](https://github.com/{username})")
else:
contributors_file.write(f"- [{username}](https://github.com/{username})")
unique_contributors.add(username) | ||
contributors_file.write(f"- {username}\n") | ||
|
||
sorted_contributors = sorted(unique_contributors) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But you already wrote the contributors_file
.. so you want to write the file after sorting.
My first contribute.
for Issue #70 Add automated contributors, I added the automated_contributors.py script to automate the addition of contributors from contributors.md.
please check if that's what you wanted.