From ee37cf2f4e7e2ca4186eb86d90bc569c626acb48 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Fri, 16 May 2014 14:19:54 -0400 Subject: [PATCH 1/2] - Default to private repo in new repo view - Make it even more clear when you choose public vs private --- static/js/controllers.js | 5 +---- static/partials/new-repo.html | 3 ++- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/static/js/controllers.js b/static/js/controllers.js index 555356993..e063630df 100644 --- a/static/js/controllers.js +++ b/static/js/controllers.js @@ -1901,7 +1901,7 @@ function NewRepoCtrl($scope, $location, $http, $timeout, UserService, ApiService $scope.githubClientId = KeyService.githubClientId; $scope.repo = { - 'is_public': 1, + 'is_public': 0, 'description': '', 'initialize': '' }; @@ -1920,9 +1920,6 @@ function NewRepoCtrl($scope, $location, $http, $timeout, UserService, ApiService // Determine whether private repositories are allowed for the namespace. checkPrivateAllowed(); - - // Default to private repos for organizations. - $scope.repo.is_public = isUserNamespace ? '1' : '0'; }); $scope.changeNamespace = function(namespace) { diff --git a/static/partials/new-repo.html b/static/partials/new-repo.html index e4f74c639..d2cd8941a 100644 --- a/static/partials/new-repo.html +++ b/static/partials/new-repo.html @@ -166,7 +166,8 @@
From 62930aa9b53ee10242f399a5f4879b342bd2428a Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Fri, 16 May 2014 15:45:13 -0400 Subject: [PATCH 2/2] Make sure we have a head_commit in the payload from Github --- endpoints/trigger.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/endpoints/trigger.py b/endpoints/trigger.py index 8114278d4..8a844a13c 100644 --- a/endpoints/trigger.py +++ b/endpoints/trigger.py @@ -315,8 +315,8 @@ class GithubBuildTrigger(BuildTrigger): def handle_trigger_request(self, request, auth_token, config): payload = request.get_json() - if not payload: - raise SkipRequestException() + if not payload or not 'head_commit' in payload: + raise SkipRequestException() if 'zen' in payload: raise ValidationRequestException()