-
Notifications
You must be signed in to change notification settings - Fork 47
Expand file tree
/
Copy pathGitHubChecksGlobalConfig.java
More file actions
46 lines (35 loc) · 1.27 KB
/
GitHubChecksGlobalConfig.java
File metadata and controls
46 lines (35 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package io.jenkins.plugins.checks.github;
import hudson.Extension;
import jenkins.model.GlobalConfiguration;
import net.sf.json.JSONObject;
import org.kohsuke.stapler.StaplerRequest;
@Extension
public class GitHubChecksGlobalConfig extends GlobalConfiguration {
private boolean skipProgressUpdates = false;
private boolean enforceSkipProgressUpdates = false;
public static GitHubChecksGlobalConfig get() {
return GlobalConfiguration.all().get(GitHubChecksGlobalConfig.class);
}
public GitHubChecksGlobalConfig() {
load();
}
public synchronized boolean isSkipProgressUpdates() {
return skipProgressUpdates;
}
public synchronized void setSkipProgressUpdates(boolean skipProgressUpdates) {
this.skipProgressUpdates = skipProgressUpdates;
save();
}
public synchronized boolean isEnforceSkipProgressUpdates() {
return enforceSkipProgressUpdates;
}
public synchronized void setEnforceSkipProgressUpdates(boolean enforceSkipProgressUpdates) {
this.enforceSkipProgressUpdates = enforceSkipProgressUpdates;
save();
}
@Override
public boolean configure(StaplerRequest req, JSONObject json) throws FormException {
req.bindJSON(this, json);
return true;
}
}