@@ -121,11 +121,10 @@ def create_build(self, commit_id, project_id):
121121 build_id = result [0 ][0 ]
122122 return build_id
123123
124- def create_job (self , commit_id , clone_url , build_id , project_id , github_private_repo , branch , env = None , fork = False ):
124+ def create_job (self , commit_id , clone_url , build_id , project_id , branch , env = None , fork = False ):
125125 git_repo = {
126126 "commit" : commit_id ,
127127 "clone_url" : clone_url ,
128- "github_private_repo" : github_private_repo ,
129128 "branch" : branch ,
130129 "fork" : fork
131130 }
@@ -168,13 +167,12 @@ def create_push(self, c, repository, branch, tag):
168167 return
169168
170169 result = self .execute ('''
171- SELECT id, project_id, private
170+ SELECT id, project_id
172171 FROM repository
173172 WHERE github_id = %s''' , [repository ['id' ]])[0 ]
174173
175174 repo_id = result [0 ]
176175 project_id = result [1 ]
177- github_repo_private = result [2 ]
178176 commit_id = None
179177
180178 result = self .execute ('''
@@ -226,7 +224,7 @@ def create_push(self, c, repository, branch, tag):
226224
227225 build_id = self .create_build (commit_id , project_id )
228226 self .create_job (c ['id' ], repository ['clone_url' ], build_id ,
229- project_id , github_repo_private , branch )
227+ project_id , branch )
230228
231229 def handle_push (self , event ):
232230 result = self .execute ('''
@@ -275,7 +273,7 @@ def handle_pull_request(self, event):
275273 return res (200 , 'action ignored' )
276274
277275 result = self .execute ('''
278- SELECT id, project_id, private FROM repository WHERE github_id = %s;
276+ SELECT id, project_id FROM repository WHERE github_id = %s;
279277 ''' , [event ['repository' ]['id' ]])
280278
281279 if not result :
@@ -285,7 +283,6 @@ def handle_pull_request(self, event):
285283
286284 repo_id = result [0 ]
287285 project_id = result [1 ]
288- github_repo_private = result [2 ]
289286
290287 result = self .execute ('''
291288 SELECT build_on_push FROM project WHERE id = %s;
@@ -398,7 +395,7 @@ def handle_pull_request(self, event):
398395 build_id = self .create_build (commit_id , project_id )
399396 self .create_job (event ['pull_request' ]['head' ]['sha' ],
400397 event ['pull_request' ]['head' ]['repo' ]['clone_url' ],
401- build_id , project_id , github_repo_private , branch , env = env , fork = is_fork )
398+ build_id , project_id , branch , env = env , fork = is_fork )
402399
403400 self .conn .commit ()
404401
0 commit comments