Make the new repo page support all the trigger types automatically.
This commit is contained in:
parent
07b4fb9105
commit
af5fc42f27
2 changed files with 17 additions and 11 deletions
|
@ -19,6 +19,7 @@
|
|||
UserService.updateUserIn($scope);
|
||||
|
||||
$scope.Features = Features;
|
||||
$scope.TriggerService = TriggerService;
|
||||
|
||||
$scope.repo = {
|
||||
'is_public': 0,
|
||||
|
@ -95,9 +96,10 @@
|
|||
return;
|
||||
}
|
||||
|
||||
// Conduct the Github redirect if applicable.
|
||||
if ($scope.repo.initialize == 'github') {
|
||||
window.location = TriggerService.getRedirectUrl('github', repo.namespace, repo.name);
|
||||
// Conduct the SCM redirect if applicable.
|
||||
var redirectUrl = TriggerService.getRedirectUrl($scope.repo.initialize, repo.namespace, repo.name);
|
||||
if (redirectUrl) {
|
||||
window.location = redirectUrl;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue