Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

action can not be used on an enterprise installation #498

Open
asml-ropeeter opened this issue Nov 5, 2024 · 2 comments
Open

action can not be used on an enterprise installation #498

asml-ropeeter opened this issue Nov 5, 2024 · 2 comments

Comments

@asml-ropeeter
Copy link

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

@ewjoachim
Copy link
Member

Hey :)

I have no way to test such a change, I don't have access to an deploy of GH enterprise. I'll be happy to merge a PR you'd provide if you can validate on your side that it works, but I'm not sure if I can be in a position to ensure that it doesn't break in the future, so it will likely not be official support, but best effort. If that's ok with you, then feel free to submit a PR, I'll gladly merge it. (or maybe someone else interested by the change would like to implement it)

@asml-ropeeter
Copy link
Author

asml-ropeeter commented Nov 19, 2024

Hi, thanks for your fast response. Let me check if we can help you with the validation.

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

No branches or pull requests

2 participants