-
Notifications
You must be signed in to change notification settings - Fork 40
Closed
Description
As an enterprise user i want to have the API url not hardcoded so i can use this action in a different environment.
Problem: Action cannot be used in a enterprise install
Cause: Hardcoded URL's
Containment: None
Solution: Use default github environment variables
https://docs.github.com/en/codespaces/developing-in-a-codespace/default-environment-variables-for-your-codespace
GITHUB_SERVER_URL
GITHUB_API_URL
Example:
https://github.com/py-cov-action/python-coverage-comment-action/blob/main/coverage_comment/main.py
github_session = httpx.Client(
base_url="https://api.github.com",
follow_redirects=True,
headers={"Authorization": f"token {config.GITHUB_TOKEN}"},
)
Proposed:
github_session = httpx.Client(
base_url="{config.GITHUB_API_URL}",
follow_redirects=True,
headers={"Authorization": f"token {config.GITHUB_TOKEN}"},
)
Please investigate for more hardcoded URLs
Metadata
Metadata
Assignees
Labels
No labels