on pull_request trigger a build only if the commit is not known yet
@@ -281,8 +281,6 @@ class Trigger(object):
committer_login, hc['commit']['url'], project_id, branch, pr_id,
event['pull_request']['statuses_url']])
commit_id = result[0][0]
- else:
- commit_id = result[0][0]
build_id = self.create_build(commit_id, project_id)
self.create_job(event['pull_request']['head']['sha'],
@@ -290,6 +288,7 @@ class Trigger(object):
build_id, project_id, github_repo_private, branch, env)
self.conn.commit()
+
return res(200, 'ok')
