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
[JENKINS-31482] Be able to use HTTP/HTTPS for new GH API Endpoints #9
Conversation
This pull request originates from a CloudBees employee. At CloudBees, we require that all pull requests be reviewed by other CloudBees employees before we seek to have the change accepted. If you want to learn more about our process please see this explanation. |
@@ -82,13 +82,14 @@ | |||
|
|||
protected AbstractGitHubSCMSource(String id, String apiUri, String checkoutCredentialsId, String scanCredentialsId, String repoOwner, String repository) { | |||
super(id); | |||
this.apiUri = apiUri; | |||
this.apiUri = Util.fixEmpty(apiUri); |
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.
🐛 this directly contradicts the stated intent of the PR.
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.
Still contradicts the annotation a few lines below.
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.
Done.
🐛 |
Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests |
…nch-source-plugin into reviewOf-JENKINS-31445
I forget that the method |
return endpoint.getHost(); | ||
} catch (MalformedURLException e) { | ||
// ignore |
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.
So, if apiUri
is not a well formed URL then github.com
is returned. It's a weird behaviour from a UX point of view IMO (if the user sets something wrong then it must be notified back somehow).
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.
This happens when the logic (backend) defines a behavior and the UI other different 😵
The idea is to include input data validation to avoid this kind of checks here.
@jglick I've changed the PoV of this PR. The title has been changed. |
🐝 |
If you can verify that #6 introduced the regression I think I saw ( |
@jglick Let me check it. |
@jglick I've tested:
I could not try with GH Enterprise Server (HTTPs) because the certificate generated in the installation process has a different IP (No subject alternative names matching IP address X.X.X.X found). |
@jglick I've repeated the same tests using the current
|
🐝 |
[JENKINS-31482] Be able to use HTTP/HTTPS for new GH API Endpoints
@reviewbybees done |
Thanks. I released this as |
[JENKINS-57892] Remove synchronized
[JENKINS-58481] reuse fetchOwner for doCheckProjectOwner
JENKINS-31482
This PR is a second part (review) of #6
@reviewbybees