callbacks: add proper custom git callback
This commit is contained in:
parent
da15eda2bf
commit
fba61d96dc
4 changed files with 29 additions and 12 deletions
|
@ -14,6 +14,7 @@ angular.module('quay').factory('KeyService', ['$location', 'Config', function($l
|
|||
|
||||
keyService['githubRedirectUri'] = Config.getUrl('/oauth2/github/callback');
|
||||
keyService['googleRedirectUri'] = Config.getUrl('/oauth2/google/callback');
|
||||
keyService['customRedirectUri'] = Config.getUrl('/oauth2/custom/callback');
|
||||
|
||||
keyService['githubLoginUrl'] = oauth['GITHUB_LOGIN_CONFIG']['AUTHORIZE_ENDPOINT'];
|
||||
keyService['googleLoginUrl'] = oauth['GOOGLE_LOGIN_CONFIG']['AUTHORIZE_ENDPOINT'];
|
||||
|
@ -60,4 +61,4 @@ angular.module('quay').factory('KeyService', ['$location', 'Config', function($l
|
|||
};
|
||||
|
||||
return keyService;
|
||||
}]);
|
||||
}]);
|
||||
|
|
|
@ -70,7 +70,9 @@ angular.module('quay').factory('TriggerService', ['UtilService', '$sanitize', 'K
|
|||
'name': 'commit_sha'
|
||||
}
|
||||
],
|
||||
'get_redirect_url': function() {},
|
||||
'get_redirect_url': function(namespace, repository) {
|
||||
return KeyService['customRedirectUri'] + '/trigger/' + namespace + '/' + repository;
|
||||
},
|
||||
'is_enabled': function() { return true; },
|
||||
'icon': 'fa-git',
|
||||
'title': function() { return 'Custom Git Repository Push'; }
|
||||
|
|
Reference in a new issue