add Slack API webhook support
This commit is contained in:
parent
5e6091a30a
commit
2bce24068d
15 changed files with 485 additions and 79 deletions
|
@ -359,6 +359,22 @@ function initRepoSetting() {
|
|||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
// web hook type change
|
||||
$('select#hook-type').on("change", function () {
|
||||
hookTypes = ['Gogs','Slack'];
|
||||
|
||||
var curHook = $(this).val();
|
||||
hookTypes.forEach(function(hookType) {
|
||||
if (curHook === hookType) {
|
||||
$('div#'+hookType.toLowerCase()).toggleShow();
|
||||
}
|
||||
else {
|
||||
$('div#'+hookType.toLowerCase()).toggleHide();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#transfer-button').click(function () {
|
||||
$('#transfer-form').show();
|
||||
});
|
||||
|
@ -594,4 +610,4 @@ function homepage() {
|
|||
}
|
||||
$('#promo-form').attr('action', '/user/sign_up');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue