-
Notifications
You must be signed in to change notification settings - Fork 41
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
Create Github plugin #907
Create Github plugin #907
Comments
@manushak please take a look through the AC to confirm you're happy with it |
yeah, it seems clear |
@jmcook1186 can you provide me the dedicated repo for this plugin (in SoW |
@jmcook1186 we can't get repo clones for a month; the maximum range is 14 days. According to the GitHub API: We can skip the What do you think? |
Hi @manushak ok interesting - could we do 2 week max, but infer an actual time range from the timesteps and duration? Making you a repo now. |
thanks @jmcook1186 for the repo |
Minor update required to update the IF core version if there are no new comments |
Manifest examples need to be updated after phased execution release |
sub of #898
what
A plugin that requests data about Github repositories using the Github API using personal authorization tokens stored in environment variables.
context
Code storage and distribution is an important component of quantifying the environmental impacts of software projects. Github is the industry standard platform for hosting code. They expose an API that serves repository metrics incuding repo size and frequency of clones etc that can be used to assess the environmental impacts of the project storage and distribution.
Specifically, the plugin should return the following:
curl -L \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/repos/OWNER/REPO/traffic/clones
curl -L \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/orgs/ORG/repos
SoW
Acceptance criteria
size
andclones
data from the Github API.size
should be converted fromkb
toGB
for consistency with other IF plugins.Note that the traffic metrics only extend back as far as the most recent four weeks. You can request the total for any of those weeks or the whole preceding month. I think the right way to handle this in IF is to offer two options: last week or last month.
GIVEN the plugin works as expected and I have a valid auth token in
.env
WHEN I run the following manifest:
Then I get the following output (the last week's clones and the current repo size converted from kb to GB:
Note to be listed it has to meet some basic standards for documentation and repository structure.
The text was updated successfully, but these errors were encountered: