Skip to content

update_claude_comment tool Bad credentials Error on GitHub Enterprise Server due to missing baseUrl in Octokit #156

@takada-at

Description

@takada-at

Describe the bug
A Bad credentials error occurs when running on GitHub Enterprise Server because the Octokit client is initialized without specifying a baseUrl. By default, Octokit targets https://api.github.com, which is not valid for GHE environments.
The baseUrl is specified in other locations, but it is missing in the following place:

const octokit = new Octokit({

Related Issue: #107

To Reproduce

  1. Run the GitHub Action on a GitHub Enterprise Server instance
  2. Have Claude use update_claude_comment

Expected behavior
Octokit should make authenticated requests to the GitHub Enterprise Server's API endpoint when GITHUB_API_URL is provided.

Screenshots
N/A

Workflow yml file
N/A (This issue is related to runtime Octokit initialization, not the workflow file itself)

API Provider

[ ] Anthropic First-Party API (default)
[ ] AWS Bedrock
[ ] GCP Vertex

Additional context
N/A

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions