Skip to content

Commit ba31f22

Browse files
committed
Adds GITHUB_BASE_URL input
1 parent d9ea433 commit ba31f22

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Diff for: action.yml

+7
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ description: >
66
Publish diff coverage report as PR comment, and create a coverage badge
77
to display on the readme.
88
inputs:
9+
GITHUB_BASE_URL:
10+
description: >
11+
The base URL for the GitHub API, typically used to specify custom endpoints
12+
for GitHub Enterprise Server (e.g., `https://github.mycompany.com/api/v3`).
13+
Defaults to `https://api.github.com` for GitHub.com.
14+
default: "https://api.github.com"
15+
required: false
916
GITHUB_TOKEN:
1017
description: >
1118
A GitHub token to write comments and write the badge & coverage data

Diff for: coverage_comment/main.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def main():
3434
config = settings.Config.from_environ(environ=os.environ)
3535

3636
github_session = httpx.Client(
37-
base_url="https://api.github.com",
37+
base_url=config.GITHUB_BASE_URL,
3838
follow_redirects=True,
3939
headers={"Authorization": f"token {config.GITHUB_TOKEN}"},
4040
)

0 commit comments

Comments
 (0)