Skip to content

Commit 685f5b6

Browse files
committed
[FIXED JENKINS-12487] Global configuration not saved since Jenkins 1.445
1 parent 5b6d514 commit 685f5b6

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<parent>
44
<groupId>org.jenkins-ci.plugins</groupId>
55
<artifactId>plugin</artifactId>
6-
<version>1.424</version>
6+
<version>1.445</version>
77
</parent>
88

99
<groupId>com.coravy.hudson.plugins.github</groupId>

src/main/java/com/cloudbees/jenkins/GitHubPushTrigger.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,13 +239,13 @@ public List<Credential> getCredentials() {
239239
public boolean configure(StaplerRequest req, JSONObject json) throws FormException {
240240
JSONObject hookMode = json.getJSONObject("hookMode");
241241
manageHook = "auto".equals(hookMode.getString("value"));
242-
JSONObject o = json.getJSONObject("hookUrl");
242+
JSONObject o = hookMode.getJSONObject("hookUrl");
243243
if (o!=null && !o.isNullObject()) {
244244
hookUrl = o.getString("url");
245245
} else {
246246
hookUrl = null;
247247
}
248-
credentials = req.bindJSONToList(Credential.class,json.get("credentials"));
248+
credentials = req.bindJSONToList(Credential.class,hookMode.get("credentials"));
249249
save();
250250
return true;
251251
}

0 commit comments

Comments
 (0)