mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-05 16:15:54 +00:00
Enable labels/categories with deprecated to show a warning for plugins
This commit is contained in:
5 files changed
+102
No files matched your search
@@ -362,6 +362,15 @@ public class PluginWrapper implements Comparable<PluginWrapper>, ModelObject {
|
||||
return dependencies.stream().anyMatch(d -> !d.optional);
|
||||
}
|
||||
|
||||
/**
|
||||
* Is this plugin labeled deprecated?
|
||||
* @return {@code true} when plugin contains deprecated in categories, otherwise {@code false}.
|
||||
*/
|
||||
public boolean isDeprecated() {
|
||||
UpdateSite.Plugin info = getInfo();
|
||||
return info != null && Arrays.asList(info.categories).contains("deprecated");
|
||||
}
|
||||
|
||||
@ExportedBean
|
||||
public static final class Dependency {
|
||||
@Exported
|
||||
|
||||
Reference in new issue
Block a user