Merged
Conversation
🦙 MegaLinter status: ✅ SUCCESS
See detailed report in MegaLinter reports |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds a new api_url input to allow users to customize the GitHub API endpoint, and threads that value through to the Octokit client. It also updates tests and documentation to cover the new parameter.
- Introduced
api_urlinput inaction.yml - Retrieved
api_urlinsrc/main.tsand passed it asbaseUrlto Octokit - Updated tests to mock and assert
api_url, and updated README
Reviewed Changes
Copilot reviewed 4 out of 7 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/main.ts | Read api_url input and set baseUrl on Octokit initialization |
| action.yml | Added api_url input metadata |
| tests/main.test.ts | Mocked api_url input and added call assertions |
| README.md | Documented the api_url input and its default value |
Files not reviewed (1)
- package.json: Language not supported
Comments suppressed due to low confidence (2)
src/main.ts:7
- The
api_urlinput is marked as required in code but declared as optional in action.yml. Consider aligning these by settingrequired: falseor updating the action metadata torequired: true.
const apiUrl = core.getInput('api_url', { required: true })
tests/main.test.ts:56
- The test asserts that
getInputwas called, but doesn't verify that Octokit was initialized with the providedapiUrl. Add an assertion likeexpect(Octokit).toHaveBeenCalledWith({ auth: token, baseUrl: 'https://api.github.com' })(with proper mocking) to ensure the new parameter is used correctly.
expect(core.getInput).toHaveBeenCalledWith('api_url', { required: true })
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
scottluskcis
approved these changes
Jul 3, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This pull request introduces support for customizing the GitHub API URL in the
releaseraction. The change adds a new input parameter,api_url, and updates the relevant files to handle this input. Additionally, the version of the package has been incremented to reflect the new functionality.