Merge branch 'master' of gitee.com:oschina/Gitee-Jenkins-Plugin
This commit is contained in:
commit
e6f321b1f1
|
@ -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=''");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue