Merge pull request #59 from jzelinskie/custom-git-fix
triggers: metadata.commit_sha -> metadata.commit
This commit is contained in:
commit
63f289a8cb
8 changed files with 25 additions and 13 deletions
|
@ -478,7 +478,7 @@ class BitbucketBuildTrigger(BuildTriggerHandler):
|
|||
}
|
||||
|
||||
metadata = {
|
||||
'commit_sha': commit_sha,
|
||||
'commit': commit_sha,
|
||||
'ref': ref,
|
||||
'default_branch': default_branch,
|
||||
'git_url': 'git@bitbucket.org:%s/%s.git' % (namespace, name),
|
||||
|
@ -822,7 +822,7 @@ class GithubBuildTrigger(BuildTriggerHandler):
|
|||
|
||||
# Build and set the metadata.
|
||||
metadata = {
|
||||
'commit_sha': commit_sha,
|
||||
'commit': commit_sha,
|
||||
'ref': ref,
|
||||
'default_branch': repo.default_branch,
|
||||
'git_url': repo.ssh_url,
|
||||
|
@ -936,7 +936,7 @@ class CustomBuildTrigger(BuildTriggerHandler):
|
|||
'commit': {
|
||||
'type': 'string',
|
||||
'description': 'first 7 characters of the SHA-1 identifier for a git commit',
|
||||
'pattern': '^([A-Fa-f0-9]{7})$',
|
||||
'pattern': '^([A-Fa-f0-9]{7,})$',
|
||||
},
|
||||
'ref': {
|
||||
'type': 'string',
|
||||
|
@ -1057,7 +1057,7 @@ class CustomBuildTrigger(BuildTriggerHandler):
|
|||
|
||||
config = self.config
|
||||
metadata = {
|
||||
'commit_sha': commit_sha,
|
||||
'commit': commit_sha,
|
||||
'git_url': config['build_source'],
|
||||
}
|
||||
|
||||
|
@ -1307,7 +1307,7 @@ class GitLabBuildTrigger(BuildTriggerHandler):
|
|||
author = None
|
||||
|
||||
metadata = {
|
||||
'commit_sha': commit['id'],
|
||||
'commit': commit['id'],
|
||||
'ref': ref,
|
||||
'default_branch': repo['default_branch'],
|
||||
'git_url': repo['ssh_url_to_repo'],
|
||||
|
|
Reference in a new issue