-
Notifications
You must be signed in to change notification settings - Fork 53
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
update pipeline-stage-view hook to adapt the use of incrementals in new versions #232
Conversation
@@ -37,6 +37,6 @@ public static boolean isPipelineStageViewPlugin(Map<String, Object> moreInfo) { | |||
} | |||
|
|||
public static boolean isPipelineStageViewPlugin(PomData data) { | |||
return data.artifactId.contains("pipeline-rest-api"); | |||
return data.groupId.equals("org.jenkins-ci.plugins.pipeline-stage-view") || data.artifactId.contains("pipeline-rest-api"); |
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.
nit: I'd either add another case for data.artifactId.contains("pipeline-stage-view")
or drop the case for data.artifactId.contains("pipeline-rest-api")
for clarity. I think the groupId check by itself is good enough.
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 groupId works for version 2.13 but not for previous one, so the idea is to leave current behaviour until 2.12 and this versions and future one use the new logic in the hook
@@ -23,7 +23,7 @@ protected String getParentProjectName() { | |||
|
|||
@Override | |||
protected String getPluginFolderName(UpdateSite.Plugin currentPlugin){ | |||
return "rest-api"; | |||
return (currentPlugin.getDisplayName() == "pipeline-rest-api") ? "rest-api" : "ui"; |
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.
Are you sure you want .getDisplayName
here instead of .name
? I think the display name is something like "Pipeline Stage View", whereas .name
is the artifactId, but I'm not sure.
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.
Oh, also you shouldn't compare String
s using ==
, you should use .equals()
. I think the check is always false right now.
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.
Changed!! I was reviewing and the proper way to get the name is using the getDisplayName(), it is returned properly like pipeline-rest-api
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
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
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.
you didn't pick correctly changes from #231 .. Java source file PipelineRestApiHook rename to PipelineStageViewHook but you didn't change the class name in the java source file so the pr do not compile
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.
ok I updated the pr
This updates the pipeline-stage-view to adapt the Hook to make PCT works with version 2.13 od the plugin
This Hook is also compatible with lower versions cc/ @olamy @dwnusbaum @oleg-nenashev @raul-arabaolaza
This PR supersede #231 unless it is adapted properly (in that case this PR can be closed). I tried to update the PR but I am not having permissions to do it, that's the reason why I have to create a new one.