Merge branch 'master' of gitee.com:oschina/Gitee-Jenkins-Plugin

This commit is contained in:
yashin 2020-06-18 09:33:47 +08:00
commit e6f321b1f1
2 changed files with 3 additions and 3 deletions

View File

@ -605,11 +605,11 @@ public class GiteePushTrigger extends Trigger<Job<?, ?>> {
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=''");
}
}
}

View File

@ -78,7 +78,7 @@
</f:entry>
<f:entry title="${%Secret.Token}" help="/plugin/gitee/help/help-secretToken.html">
<table>
<f:readOnlyTextbox field="secretToken" id="secretToken"/>
<f:readOnlyTextbox field="secretToken" id="giteeSecretToken"/>
<f:validateButton title="${%Generate}" method="generateSecretToken"/>
<f:validateButton title="${%Clear}" method="clearSecretToken"/>
</table>