Skip to content

Add a GitHub App auth client to hackbot using githubkit - #7333

Open
Foxbolts wants to merge 1 commit into
mozilla:masterfrom
Foxbolts:ml/hackbot-github-client
Open

Foxbolts wants to merge 1 commit into
mozilla:masterfrom
Foxbolts:ml/hackbot-github-client

Conversation

@Foxbolts

Copy link
Copy Markdown
Contributor

Fixes #7051

Description

Add libs/github-client, a shared lib for authenticating to GitHub as a GitHub App, built on githubkit

It mints installation tokens downscoped to the permissions each caller asks for (e.g. read-only for the broker and read/write for hackbot-api), and refreshes them automatically. Settings come from GITHUB_* env vars, (like PhabricatorSettings).

Notes

  • permissions is required: a token minted without them gets everything the App has.
  • Not wired into hackbot-api yet: a required setting would stop it from starting until the App's secrets exist (Configure the @hackbot-mozilla GitHub App and secrets #7050). It'll be added with the first issue that uses it.
  • Tested manually against a test GitHub App: a read-only token can read a PR but gets a 403 when commenting; a read/write token can comment.

@Foxbolts
Foxbolts requested a review from a team as a code owner October 27, 2026 19:34

This branch has not been deployed

No deployments
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

Successfully merging this pull request may close these issues.

Add a GitHub client to hackbot using githubkit

1 participant