Skip to content

Add api_url as input#135

Merged
ncalteen merged 2 commits intomainfrom
ncalteen/api-url
Jul 3, 2025
Merged

Add api_url as input#135
ncalteen merged 2 commits intomainfrom
ncalteen/api-url

Conversation

@ncalteen
Copy link
Copy Markdown
Contributor

@ncalteen ncalteen commented Jul 3, 2025

This pull request introduces a new input parameter, api_url, to allow customization of the GitHub API URL, updates the package version to 2.5.0, and modifies the code to use the new input parameter for API requests. These changes enhance flexibility and ensure compatibility with alternative GitHub API endpoints.

@ncalteen ncalteen self-assigned this Jul 3, 2025
Copilot AI review requested due to automatic review settings July 3, 2025 14:30
@ncalteen ncalteen requested a review from a team as a code owner July 3, 2025 14:30
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 adds flexibility to the GitHub Actions by introducing an api_url input for configuring the GitHub API endpoint, updates Octokit initialization to use it, and documents the new parameter.

  • Introduces api_url input and default value in action.yml
  • Updates Octokit calls in src/messages.ts to pass baseUrl from api_url
  • Updates README to document the new api_url input

Reviewed Changes

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

File Description
src/messages.ts Passes api_url input as baseUrl to Octokit client
action.yml Declares api_url input with default
README.md Documents api_url input in usage table
Files not reviewed (1)
  • package.json: Language not supported
Comments suppressed due to low confidence (2)

action.yml:15

  • The api_url input is declared as optional, but code treats it as required. Consider making this input required or providing a reliable default to avoid runtime errors.
  api_url:

src/messages.ts:14

  • [nitpick] Add or update tests to verify that providing a custom api_url causes Octokit to send requests to the configured baseUrl.
      baseUrl: core.getInput('api_url', { required: true })

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jul 3, 2025

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ ACTION actionlint 5 0 0 0.05s
✅ JSON jsonlint 9 0 0 0.33s
✅ JSON prettier 9 0 0 1.22s
✅ JSON v8r 9 0 0 14.47s
✅ MARKDOWN markdownlint 1 0 0 0.92s
✅ MARKDOWN markdown-link-check 1 0 0 1.84s
✅ REPOSITORY checkov yes no no 16.69s
✅ REPOSITORY gitleaks yes no no 1.06s
✅ REPOSITORY git_diff yes no no 0.02s
✅ REPOSITORY grype yes no no 35.29s
✅ REPOSITORY secretlint yes no no 1.26s
✅ REPOSITORY syft yes no no 4.47s
✅ REPOSITORY trivy-sbom yes no no 1.82s
✅ REPOSITORY trufflehog yes no no 17.03s
✅ TYPESCRIPT prettier 14 0 0 1.78s
✅ XML xmllint 2 0 0 0.03s
✅ YAML prettier 19 0 0 0.83s
✅ YAML v8r 19 0 0 8.38s
✅ YAML yamllint 19 0 0 0.3s

See detailed report in MegaLinter reports

MegaLinter is graciously provided by OX Security

@ncalteen ncalteen merged commit 04eb8e2 into main Jul 3, 2025
5 checks passed
@ncalteen ncalteen deleted the ncalteen/api-url branch July 3, 2025 15:46
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.

3 participants