Skip to content

Commit

Permalink
github_build.py was broken from a merge in the mainline, fixed it up
Browse files Browse the repository at this point in the history
  • Loading branch information
oppianmatt committed Mar 11, 2010
1 parent c7184b8 commit 849705d
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions contrib/github_buildbot.py
Expand Up @@ -32,7 +32,6 @@ class GitHubBuildBot(resource.Resource):
Hook.
"""
isLeaf = True
github = None
master = None
port = None

Expand All @@ -46,14 +45,18 @@ def render_POST(self, request):
"""
try:
payload = json.loads(request.args['payload'][0])
user = payload['repository']['owner']['name']
repo = payload['repository']['name']
repo_url = payload['repository']['url']
self.private = payload['repository']['private']
logging.debug("Payload: " + str(payload))
self.process_change(payload)
self.process_change(payload, user, repo, repo_url)
except Exception:
logging.error("Encountered an exception:")
for msg in traceback.format_exception(*sys.exc_info()):
logging.error(msg.strip())

def process_change(self, payload, user, repo, github_url):
def process_change(self, payload, user, repo, repo_url):
"""
Consumes the JSON as a python object and actually starts the build.
Expand Down Expand Up @@ -90,8 +93,7 @@ def process_change(self, payload, user, repo, github_url):
+ " <" + commit['author']['email'] + ">",
'files': files,
'links': [commit['url']],
'properties': {'repository':
self.repo_url(user, repo, github_url)},
'properties': {'repository': repo_url},
}
changes.append(change)

Expand Down

0 comments on commit 849705d

Please sign in to comment.