bazel-contrib / publish-to-bcr

A GitHub app that mirrors releases of your Bazel ruleset to the Central Registry
Apache License 2.0
21 stars 9 forks source link

refactor: decouple github auth from api calls #130

Closed kormide closed 8 months ago

kormide commented 8 months ago

Prefactor for #120.

I had an awkward coupling between how the github client (octokit) is authorized and the api calls it can make, when really they should be separate. There are several different ways we need to authorize: as one of the two GitHub apps, as an installation of those apps on the ruleset repo, bcr fork, and canonical bcr. This decoupling will help me fix #120 in a clean way.