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

hardcoded API url leads to bad credentials error on GitHub Enterprise server #90

Closed
Th3S4mur41 opened this issue Sep 6, 2023 · 6 comments · Fixed by #91
Closed

hardcoded API url leads to bad credentials error on GitHub Enterprise server #90

Th3S4mur41 opened this issue Sep 6, 2023 · 6 comments · Fixed by #91
Assignees
Labels
bug Something isn't working

Comments

@Th3S4mur41
Copy link

Running the conventional-pr action on an on premise GitHub Enterprise server results in a bad crendentials error.
The error is misleading though and results from the fact that the action is trying to fetch the pull request data from github.com instead of the actual GitHub server.

Run Namchee/[email protected]
2023/09/06 06:23:14 [INFO] Initializing conventional-pr
2023/09/06 06:23:14 [INFO] Reading configuration from environment variables
2023/09/06 06:23:14 [INFO] Reading repository metadata
2023/09/06 06:23:14 [INFO] Initializing GitHub Client
2023/09/06 06:23:14 [INFO] Reading pull request metadata
2023/09/06 06:23:14 [INFO] Validating pull request sub-events
Error: /06 06:23:14 [ERROR] Failed to fetch pull request data: GET https://api.github.com/repos/***/***/pulls/20: 401 Bad credentials []

All references to https://api.github.com should be replaced through ${{github.api_url}} to allow the action to work on Enterprise server

@Namchee Namchee self-assigned this Sep 6, 2023
@Namchee Namchee added the bug Something isn't working label Sep 6, 2023
@Namchee
Copy link
Owner

Namchee commented Sep 6, 2023

Thanks for filing an issue!

I never used this for Enterprise accounts, so I didn't know that this issue exists. I'll see what I can do.

@Namchee
Copy link
Owner

Namchee commented Sep 6, 2023

@Th3S4mur41, I have merged potential fix for this on #91, could you please try to use the master branch version of conventional-pr and see if it fixed the issue? I'll release a new version as soon as this issue has been confirmed to be fixed.

To use the master branch version, please change the action version in the workflow file to @master

- name: Check PR semantics
  uses: Namchee/conventional-pr@master

@userjoergjakoby
Copy link

With Namchee/conventional-pr@master we don't have the mentioned error anymore

@Namchee
Copy link
Owner

Namchee commented Sep 7, 2023

Thanks for confirming! WIll release a new version soon.

UPDATE: I have release v0.14 that contain fix for this issue. If the issue still persist, feel free to create a new issue

@Namchee
Copy link
Owner

Namchee commented Sep 7, 2023

@all-contributors please add @Th3S4mur41 for bug

@allcontributors
Copy link
Contributor

@Namchee

I've put up a pull request to add @Th3S4mur41! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants