-
-
Notifications
You must be signed in to change notification settings - Fork 9k
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-30785] Generalize some CLI stuff to AbstractItem #2694
Conversation
@pjanouse PTAL |
grumbles stupid tests… |
@@ -78,11 +79,10 @@ protected int run() throws Exception { | |||
} | |||
|
|||
if(job == null) { | |||
// TODO: JENKINS-30785 | |||
AbstractProject project = AbstractProject.findNearest(job_s); | |||
AbstractItem project = Items.findNearest(AbstractItem.class, job_s, jenkins); |
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.
Why not Item
then?
// TODO can this (and its pseudo-override in AbstractProject) share code with GenericItemOptionHandler, used for explicit CLICommand’s rather than CLIMethod’s? | ||
AbstractItem item = Jenkins.getInstance().getItemByFullName(name, AbstractItem.class); | ||
if (item==null) { | ||
AbstractProject project = AbstractProject.findNearest(name); | ||
AbstractItem project = Items.findNearest(AbstractItem.class, name, Jenkins.getInstance()); |
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.
Uh. IMHO should be reported as a separate bug
Will cover the |
Actually nah, I will just merge yours in, looks good to me. |
GitHub would have automatically marked this as merged if @oleg-nenashev had not squashed commits, losing history of what was actually included. |
@jglick Yes, I caused some mess in this case. squashing was not intentional this time since I didn't want to deal with mess in downstream PRs. But yeah, now it's my responsibility to deal with it |
JENKINS-30785