Skip to content
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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

kailinxGitHub
Copy link

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.

@ghutchis
Copy link
Member

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",
Copy link
Member

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```",
Copy link
Member

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:

https://two.avogadro.cc/contrib/credits.html

for contributor in contributors:
username = contributor.login
unique_contributors.add(username)
contributors_file.write(f"- {username}\n")
Copy link
Member

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)
Copy link
Member

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.

@ASK-03 ASK-03 mentioned this pull request Mar 5, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants