Skip to content

action can not be used on an enterprise installation #498

@asml-ropeeter

Description

@asml-ropeeter

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions