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

Feature Request: Support Github Enterprise Server #56

Closed
Warashi opened this issue Nov 16, 2020 · 7 comments
Closed

Feature Request: Support Github Enterprise Server #56

Warashi opened this issue Nov 16, 2020 · 7 comments
Labels
enhancement New feature or request

Comments

@Warashi
Copy link

Warashi commented Nov 16, 2020

Hi, thank you so much to provide this nice action.

I use Github Enterprise Server, so I want this action to support it.

@EnricoMi
Copy link
Owner

Hi, I am not sure what it requires to run on Enterprise Server, I presume all it needs is to use the correct API URL provided by GITHUB_API_URL: https://docs.github.com/en/free-pro-team@latest/actions/reference/environment-variables#default-environment-variables

I can add this and you can try if this then works for you. Are there any errors when you run it as is?

@EnricoMi EnricoMi added the enhancement New feature or request label Nov 17, 2020
@Warashi
Copy link
Author

Warashi commented Nov 17, 2020

I want to try it.

When I run this action as is, I get this error.

2020-11-17 09:20:33 +0000 - publish-unit-test-results -  INFO - reading example.xml: ['example.xml']
Traceback (most recent call last):
  File "/action/publish_unit_test_results.py", line 855, in <module>
    report_individual_runs, dedup_classes_by_file_name)
  File "/action/publish_unit_test_results.py", line 801, in main
    comment_on_pr, report_individual_runs)
  File "/action/publish_unit_test_results.py", line 531, in publish
    repo = gh.get_repo(repo_name)
  File "/usr/local/lib/python3.6/site-packages/github/MainClass.py", line 334, in get_repo
    "GET", "%s%s" % (url_base, full_name_or_id)
  File "/usr/local/lib/python3.6/site-packages/github/Requester.py", line 319, in requestJsonAndCheck
    verb, url, parameters, headers, input, self.__customConnection(url)
  File "/usr/local/lib/python3.6/site-packages/github/Requester.py", line 342, in __check
    raise self.__createException(status, responseHeaders, output)
github.GithubException.BadCredentialsException: 401 {"message": "Bad credentials", "documentation_url": "https://docs.github.com/rest"}

@EnricoMi
Copy link
Owner

The action in master uses the URL provided via GITHUB_API_URL (automatically provided to the action by the workflow). Can you please run the action from master to test if this fixes it?

@Warashi
Copy link
Author

Warashi commented Nov 18, 2020

worked successfully 🎉
Thank you so much 😄

@EnricoMi
Copy link
Owner

That was easy. I presume your Enterprise Server has its own URL, not the public https://api.github.com?

@Warashi
Copy link
Author

Warashi commented Nov 18, 2020

Yes, has own URL, not github.com.

@EnricoMi
Copy link
Owner

Excellent, thanks for raising this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants