mona-actions / gh-repo-stats

GH CLI extension to pull statistics on repository metadata used in GitHub migrations
MIT License
146 stars 76 forks source link

Refactor extension to allow use of GitHub App token for higher rate limiting #34

Closed andyfeller closed 1 year ago

andyfeller commented 1 year ago

Problem

While working on a customer engagement, I made a recommendation for the extension to be used with a token create from a GitHub App. It turns out that gh-repo-stats fails because it designed around the idea the PAT belongs to a user.

The error revolves around getting the user identity and checking admin rights in https://github.com/mona-actions/gh-repo-stats/blob/main/gh-repo-stats#L537

Suggestion

I think there are use cases where this extension needs higher rate limits than PATs, so I'd love to see it get updated to include information and changes necessary to use a GitHub App token instead.