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
[FIX JENKINS-42784] Fix creation optimization and empty repo #916
Conversation
These tests were passing by luck. Fixed to refer to existing repo inside jenkinsci repo.
Fixes issue where credentials attached to the org folder was not discovered by github scm source during github api calls. Makes simpleOrgTest to work only with github access token to avoid flackyness related to github api rate limit and subsequent read time outs.
🐝 especially if ATH is happy |
@cliffmeyers @vivek able to give your blessing? |
@vivek @cliffmeyers I would love if you could give this a look, but probably important to get it in quickly |
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.
LGTM. Couple minor comments. Will let @vivek have final say as he's way more knowledgeable on Java side.
|
||
StringBuilder sb = new StringBuilder(); | ||
if (gitHubSCMNavigator != null) { | ||
Matcher matcher = Pattern.compile("\\((.*?)\\\\b\\)\\?").matcher(gitHubSCMNavigator.getPattern()); |
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 might benefit from a comment - it's clear to me because I'm familiar w/ how the repo names are put in the regexp, but others might be confused by this.
} | ||
if (sb.length() > 0) { | ||
gitHubSCMNavigator.setPattern(sb.toString()); | ||
} |
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.
In general maybe some of this regexp handling code would benefit from method extraction but that's just a style thing, no biggie.
🐝 |
Already included by #919 |
Description
See JENKINS-42784.
To test this, use cases where no Jenkinsfile exists, or creating from a completely empty repo.
Submitter checklist
Reviewer checklist