From 4466147fd0d1f0dbf49cf3fae89fab4255bda3b5 Mon Sep 17 00:00:00 2001 From: NaccOll Date: Thu, 11 Jun 2020 01:52:39 +0800 Subject: [PATCH] fix: reset gitee dom id --- src/main/java/com/gitee/jenkins/trigger/GiteePushTrigger.java | 4 ++-- .../com/gitee/jenkins/trigger/GiteePushTrigger/config.jelly | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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 @@ - +