-
Notifications
You must be signed in to change notification settings - Fork 19
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
automate skill label in skills.json #122
Conversation
spelling correction
minuscule whitespace fix
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.
Please do:
- Add Black and Flake8 (and use them to update code)
- Add support for
ADMIN_GITHUB_TOKEN
environment variable - Ensure all files have an end of file newline
Please consider:
- pretty formatting
skills.json
(maybe all you have to do is includeindent=2
)
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 script still needs authentication.
Also, I think it would be better if it used PyGithub instead of requests.
here is a starting point:
#!/usr/bin/env python3
# vim: set fileencoding=utf-8:
# Standard library
import json
import os
# Third party
from github import Github
GITHUB_ORGANIZATION = "creativecommons"
GITHUB_TOKEN = os.environ["ADMIN_GITHUB_TOKEN"]
github_client = Github(GITHUB_TOKEN)
cc = github_client.get_organization(GITHUB_ORGANIZATION)
repos = list(cc.get_repos())
repos.sort(key=lambda repo: repo.name)
data = []
for repo in repos:
data.append({"name": repo.name, "languages": repo.get_languages()})
print(json.dumps(data, indent=2, sort_keys=True))
Please also consider:
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.
Good work! See comments for requested changes
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.
this is great work! thank you!
i changed it so that it won't close the issue as i need to determine how i want the system as a whole to function. i expect this code will probably be integrated into push_data_to_ccos.
Fixes
Related to #86 by @dhruvkb
Description
Technical details
Tests
Screenshots
Checklist
Update index.md
).main
ormaster
).visible errors.
Developer Certificate of Origin
Developer Certificate of Origin