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

Add new AutoPkg command to validate GitHub API limits #900

Open
jgstew opened this issue Sep 28, 2023 · 0 comments
Open

Add new AutoPkg command to validate GitHub API limits #900

jgstew opened this issue Sep 28, 2023 · 0 comments

Comments

@jgstew
Copy link
Contributor

jgstew commented Sep 28, 2023

Enhancement Request:

add a new AutoPkg command to output info about GitHub Token, API limits, etc.

github-token-info is what I would propose. Usage: autopkg github-token-info

What I would want as output is first what path is currently being used to find the github token, which would either be what is defined in the currently used preferences, or if not defined then the default path.

Then it would also validate if that configured file is found or not, perhaps also report it's size and absolute path.

Then autopkg should reach out to GitHub and get it's current API limits (regardless of if an actual token is found or not, if not found, then it would report the unauthenticated API limits. ) by querying this URL: https://api.github.com/rate_limit and providing the output. (just the raw JSON at first is good enough, but eventually maybe something more friendly?)

See this example recipe: https://github.com/jgstew/jgstew-recipes/blob/main/Test-Recipes/ExampleGitHubTokenAPI.test.recipe.yaml

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

No branches or pull requests

1 participant