mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-21 15:55:40 +00:00
JENKINS-56057 Support update site warnings with Configuration as Code (#6203)
Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com>
This commit is contained in:
1 parent
565faf28f4
commit
c2cb1969af
1 file changed
+6
@@ -39,6 +39,7 @@ import jenkins.model.Jenkins;
|
||||
import net.sf.json.JSONObject;
|
||||
import org.kohsuke.accmod.Restricted;
|
||||
import org.kohsuke.accmod.restrictions.NoExternalUse;
|
||||
import org.kohsuke.stapler.DataBoundSetter;
|
||||
import org.kohsuke.stapler.StaplerRequest;
|
||||
|
||||
/**
|
||||
@@ -64,6 +65,11 @@ public class UpdateSiteWarningsConfiguration extends GlobalConfiguration impleme
|
||||
return Collections.unmodifiableSet(ignoredWarnings);
|
||||
}
|
||||
|
||||
@DataBoundSetter // unused; for CasC support only
|
||||
public void setIgnoredWarnings(Set<String> ignoredWarnings) {
|
||||
this.ignoredWarnings = new HashSet<>(ignoredWarnings);
|
||||
}
|
||||
|
||||
public boolean isIgnored(@NonNull UpdateSite.Warning warning) {
|
||||
return ignoredWarnings.contains(warning.id);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user