Skip to content

Use Octokit instead of calling gh#9

Merged
neilvcarvalho merged 3 commits into
mainfrom
nc/octokit
May 25, 2026
Merged

Use Octokit instead of calling gh#9
neilvcarvalho merged 3 commits into
mainfrom
nc/octokit

Conversation

@neilvcarvalho
Copy link
Copy Markdown
Member

No description provided.

@neilvcarvalho neilvcarvalho force-pushed the nc/octokit branch 6 times, most recently from 64e1510 to 45a21e8 Compare May 25, 2026 12:59
We're calling `gh` directly, which needs a lot of extra set up to test
the action. GitHub has its own gem that wraps its API, `octokit`. It's
much easier to test `octokit` calls instead of a CLI.

This commit swaps the shell-based GhClient for one backed by the octokit
gem. `GithubClient` now takes `token` and an optional `client` instead
of `runner`. The exe reads `GITHUB_TOKEN` and passes it through.
This action has its own Ruby dependencies that may or may not be
included in the consumer Gemfile. To avoid colliding dependencies, we
should run within the same Ruby setup as the consumer application, but
run our own `bundle install`, running anything that redirects to the
consumer application using `Bundler.with_unbundled_env` to opt out of
our Gemfile.
@neilvcarvalho neilvcarvalho marked this pull request as ready for review May 25, 2026 13:14
@neilvcarvalho neilvcarvalho merged commit 43a1092 into main May 25, 2026
7 checks passed
@neilvcarvalho neilvcarvalho deleted the nc/octokit branch May 25, 2026 13:29
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.

1 participant