Fix Github Trigger handling when there is no committer
This commit is contained in:
parent
699cb9a5da
commit
56be893d7e
1 changed files with 13 additions and 7 deletions
|
@ -318,21 +318,27 @@ class GithubBuildTrigger(BuildTrigger):
|
|||
logger.exception('Could not load data for commit')
|
||||
return
|
||||
|
||||
return {
|
||||
commit_info = {
|
||||
'url': commit.html_url,
|
||||
'message': commit.commit.message,
|
||||
'author': {
|
||||
'date': commit.last_modified
|
||||
}
|
||||
|
||||
if commit.author:
|
||||
commit_info['author'] = {
|
||||
'username': commit.author.login,
|
||||
'avatar_url': commit.author.avatar_url,
|
||||
'url': commit.author.html_url
|
||||
},
|
||||
'committer': {
|
||||
}
|
||||
|
||||
if commit.committer:
|
||||
commit_info['committer'] = {
|
||||
'username': commit.committer.login,
|
||||
'avatar_url': commit.committer.avatar_url,
|
||||
'url': commit.committer.html_url
|
||||
},
|
||||
'date': commit.last_modified
|
||||
}
|
||||
}
|
||||
|
||||
return commit_info
|
||||
|
||||
@staticmethod
|
||||
def _prepare_build(config, repo, commit_sha, build_name, ref):
|
||||
|
|
Reference in a new issue