ljharb / repo-report

CLI to list all repos a user has access to, and report on their configuration in aggregate.
MIT License
24 stars 11 forks source link

add metric: "include in the home page" #65

Open ljharb opened 2 years ago

ljharb commented 2 years ago

On the home page of a repo, click the gear by "about" - there's three checkboxes (releases, packages, environment).

For example, I want to make sure all my repos have "packages" disabled, since I'll never use Github Packages for anything.

thehanimo commented 2 years ago

Not sure if this is supported in the API. Afaik, We can get info about releases, packages, and environments, but not their visibility on the home page.

ljharb commented 2 years ago

Even if it’s not in the api, if it’s trivially curl-able from GitHub.com without triggering rate limits, that might suffice for now.

thehanimo commented 2 years ago

Interesting. curling ljharb/repo-report downloads 229KB of data. We could parse the html response and check for the presence of the three sections (checked for packages, seems doable). But again, we're usually dealing with a large number of repos per run so I'm not sure if this solution is worth it. Caching comes to mind but not sure how we'll deal with a "per-metric" cache. Also, there's private repos to consider and token management and potentially, rate limits associated with that. Oh and, captchas? Does GitHub have those pop up on repeated bot-like requests?

ljharb commented 2 years ago

ha, all good points :-)

there doesn't seem to be any ajax requests made that we could call, so this might indeed have to wait til it's added to the API.