diff --git a/src/main/java/com/gitee/jenkins/trigger/GiteePushTrigger.java b/src/main/java/com/gitee/jenkins/trigger/GiteePushTrigger.java index fd79c61..e67713d 100644 --- a/src/main/java/com/gitee/jenkins/trigger/GiteePushTrigger.java +++ b/src/main/java/com/gitee/jenkins/trigger/GiteePushTrigger.java @@ -605,11 +605,11 @@ public class GiteePushTrigger extends Trigger> { byte[] random = new byte[16]; // 16x8=128bit worth of randomness, since we use md5 digest as the API token RANDOM.nextBytes(random); String secretToken = Util.toHexString(random); - response.setHeader("script", "document.getElementById('secretToken').value='" + secretToken + "'"); + response.setHeader("script", "document.getElementById('giteeSecretToken').value='" + secretToken + "'"); } public void doClearSecretToken(@AncestorInPath final Job project, StaplerResponse response) {; - response.setHeader("script", "document.getElementById('secretToken').value=''"); + response.setHeader("script", "document.getElementById('giteeSecretToken').value=''"); } } } diff --git a/src/main/resources/com/gitee/jenkins/trigger/GiteePushTrigger/config.jelly b/src/main/resources/com/gitee/jenkins/trigger/GiteePushTrigger/config.jelly index b43065f..60fa584 100644 --- a/src/main/resources/com/gitee/jenkins/trigger/GiteePushTrigger/config.jelly +++ b/src/main/resources/com/gitee/jenkins/trigger/GiteePushTrigger/config.jelly @@ -78,7 +78,7 @@ - +