Skip to content

Fixes 329#332

Merged
joaopapereira merged 4 commits intocarvel-dev:developfrom
joaopapereira:fixes-329
Apr 27, 2026
Merged

Fixes 329#332
joaopapereira merged 4 commits intocarvel-dev:developfrom
joaopapereira:fixes-329

Conversation

@joaopapereira
Copy link
Copy Markdown
Member

fixes #329

The approach here is to force the URL used to always be api.github.com, allowing for the users to define a different one if they want to have the carvel repositories in their own instance.

The more important thing to have into account is that the github token used has to be valid in the github instance you are retrieving the releases of the carvel tools from.

Ex: In the following case the github token used HAS to be valid in github.com

steps:
- uses: carvel-dev/setup-action@v3
  with:
    token: TOKEN-FROM-GITHUB.COM
- run: |
    ytt version
    kbld version

Ex: In the following case the github token used HAS to be valid in acme.github.com

steps:
- uses: carvel-dev/setup-action@v3
  with:
    endpoint: https://acme.github.com/api/v3
    token: TOKEN-FROM-GITHUB.COM
- run: |
    ytt version
    kbld version

Signed-off-by: Joao Pereira <joaopapereira@gmail.com>
Signed-off-by: Joao Pereira <joaopapereira@gmail.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses issue #329 (“Issues running in Enterprise GitHub”) by making the GitHub API base URL configurable (defaulting to https://api.github.com) so the action can fetch Carvel releases from GitHub.com even when running on GHES, while still allowing users to target a GHES API when hosting the repos there.

Changes:

  • Add a new endpoint input and use it as the Octokit baseUrl when creating the GitHub client.
  • Upgrade @actions/core / @actions/github dependencies and adjust Jest configuration/mocks accordingly.
  • Update docs/examples (including bumping usage examples to @v3).

Reviewed changes

Copilot reviewed 6 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/main.ts Reads endpoint input and passes it to Octokit baseUrl when a token is provided.
action.yml Introduces the new endpoint input (default https://api.github.com).
README.md Updates examples to @v3 and adds GHES/GitHub.com usage guidance.
package.json / package-lock.json Bumps Actions toolkit dependencies and updates lockfile.
jest.config.js + test/__mocks__/* Adds module mapping/mocks for updated Actions toolkit packages.
tsconfig.json Adjusts include/exclude and enables allowJs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread action.yml Outdated
Comment thread src/main.ts Outdated
Comment thread README.md Outdated
Signed-off-by: Joao Pereira <joaopapereira@gmail.com>
Signed-off-by: Joao Pereira <joaopapereira@gmail.com>
@joaopapereira
Copy link
Copy Markdown
Member Author

@jbrunton We have an issue with github@6.0.1 that is +- a year old, but not sure if upgrading to the latest version of the library is going to impact any other code on the libraries that you built underneath, so I kept it around 6.*

@joaopapereira
Copy link
Copy Markdown
Member Author

If I do not get any more feedback will merge it next monday

@aron-muon
Copy link
Copy Markdown

Can't wait for this to land!

@joaopapereira joaopapereira merged commit efbf262 into carvel-dev:develop Apr 27, 2026
11 of 12 checks passed
@joaopapereira joaopapereira deleted the fixes-329 branch April 27, 2026 14:31
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.

Issues running in Enterprise GitHub

3 participants