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
feat(cli): support custom github API hosts #181
Conversation
@patrickhulce will try this tomorrow! Thank you! |
@thedaviddias any chance you've had time to try this out? :) |
I'm really sorry, I didn't have yet time to try it. This week has been pretty busy... Will keep you posted when I would have tested out. |
Just tested this PR against our github enterprise server. First run with with my personal token got this output:
Looked for the log message and noticed I had to set the env var The Hope this helps, looking forward to have this in my PRs status checks. |
Awesome thank you for the info @jalerg! We'll fix that up great catch 👍 |
3a3c819
to
2a7950a
Compare
aight @jalerg I think we fixed this so you don't need to manually specify the slug, would you be willing to give it one more try? if it doesn't work a sample of your |
I didn't have time today to test again, will do as soon as I can tomorrow and get back to you. |
Thanks @jalerg! No rush, we really appreciate your help! |
packages/cli/src/upload/upload.js
Outdated
const hash = getCurrentHash(); | ||
const slug = getGitHubRepoSlug(); | ||
const {githubToken, githubAppToken} = options; | ||
const {githubToken, githubAppToken, githubApiHost} = options; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The getGitHubRepoSlug()
still returned undefined because the githubApiHost
parameter wasn't passed in, I still got the No GitHub remote found, skipping.
message in the console.
Making this change made it work:
const hash = getCurrentHash(); | |
const slug = getGitHubRepoSlug(); | |
const {githubToken, githubAppToken} = options; | |
const {githubToken, githubAppToken, githubApiHost} = options; | |
const {githubToken, githubAppToken, githubApiHost} = options; | |
const hash = getCurrentHash(); | |
const slug = getGitHubRepoSlug(githubApiHost); |
I noticed the urlLabel
in the status check message is undefined, probably unrelated to this, but posting here:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doh! thanks @jalerg! at some point we just need to get a mock github API into our test suite.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
everything worked as expected when making this change, I've run it a few times now, and changed the token to our service account instead of mine and it updated the owner smoothly.
LGTM!
closes #92
@thedaviddias or anyone else with a github enterprise server would you be able to give this a try? I don't actually have access to a GH enterprise server to test for realz :)