custom trigger: initial setup wizard
This commit is contained in:
parent
c5272f3545
commit
7d1d53ebcb
8 changed files with 86 additions and 31 deletions
|
@ -2,8 +2,8 @@
|
|||
* Helper service for defining the various kinds of build triggers and retrieving information
|
||||
* about them.
|
||||
*/
|
||||
angular.module('quay').factory('TriggerService', ['UtilService', '$sanitize', 'KeyService', 'Features', 'CookieService',
|
||||
function(UtilService, $sanitize, KeyService, Features, CookieService) {
|
||||
angular.module('quay').factory('TriggerService', ['UtilService', '$sanitize', 'KeyService', 'Features', 'CookieService', 'Config',
|
||||
function(UtilService, $sanitize, KeyService, Features, CookieService, Config) {
|
||||
var triggerService = {};
|
||||
|
||||
var triggerTypes = {
|
||||
|
@ -37,6 +37,7 @@ angular.module('quay').factory('TriggerService', ['UtilService', '$sanitize', 'K
|
|||
return authorize_url + 'client_id=' + client_id +
|
||||
'&scope=repo,user:email&redirect_uri=' + redirect_uri;
|
||||
},
|
||||
'target': '',
|
||||
'is_enabled': function() {
|
||||
return Features.GITHUB_BUILD;
|
||||
},
|
||||
|
@ -71,8 +72,9 @@ angular.module('quay').factory('TriggerService', ['UtilService', '$sanitize', 'K
|
|||
}
|
||||
],
|
||||
'get_redirect_url': function(namespace, repository) {
|
||||
return KeyService['customRedirectUri'] + '/trigger/' + namespace + '/' + repository;
|
||||
return Config.getUrl('/customtrigger/setup/' + namespace + '/' + repository);
|
||||
},
|
||||
'target': '_self',
|
||||
'is_enabled': function() { return true; },
|
||||
'icon': 'fa-git',
|
||||
'title': function() { return 'Custom Git Repository Push'; }
|
||||
|
|
Reference in a new issue