Add missing bitbucket test
This commit is contained in:
parent
497c90e7ea
commit
84b298f36b
2 changed files with 82 additions and 13 deletions
|
@ -35,7 +35,7 @@ BITBUCKET_WEBHOOK_PAYLOAD_SCHEMA = {
|
|||
},
|
||||
},
|
||||
'required': ['full_name'],
|
||||
},
|
||||
}, # /Repository
|
||||
'push': {
|
||||
'type': 'object',
|
||||
'properties': {
|
||||
|
@ -91,10 +91,10 @@ BITBUCKET_WEBHOOK_PAYLOAD_SCHEMA = {
|
|||
},
|
||||
},
|
||||
'required': ['html', 'avatar'],
|
||||
},
|
||||
}, # /User
|
||||
},
|
||||
'required': ['username'],
|
||||
},
|
||||
}, # /Author
|
||||
},
|
||||
},
|
||||
'links': {
|
||||
|
@ -111,19 +111,19 @@ BITBUCKET_WEBHOOK_PAYLOAD_SCHEMA = {
|
|||
},
|
||||
},
|
||||
'required': ['html'],
|
||||
},
|
||||
}, # /Links
|
||||
},
|
||||
'required': ['hash', 'message', 'date'],
|
||||
},
|
||||
}, # /Target
|
||||
},
|
||||
'required': ['target'],
|
||||
},
|
||||
'required': ['name', 'target'],
|
||||
}, # /New
|
||||
},
|
||||
},
|
||||
},
|
||||
}, # /Changes item
|
||||
}, # /Changes
|
||||
},
|
||||
'required': ['changes'],
|
||||
},
|
||||
}, # / Push
|
||||
},
|
||||
'actor': {
|
||||
'type': 'object',
|
||||
|
@ -157,9 +157,9 @@ BITBUCKET_WEBHOOK_PAYLOAD_SCHEMA = {
|
|||
},
|
||||
},
|
||||
'required': ['username'],
|
||||
},
|
||||
}, # /Actor
|
||||
'required': ['push', 'repository'],
|
||||
}
|
||||
} # /Root
|
||||
|
||||
BITBUCKET_COMMIT_INFO_SCHEMA = {
|
||||
'type': 'object',
|
||||
|
@ -242,7 +242,7 @@ def get_transformed_webhook_payload(bb_payload, default_branch=None):
|
|||
config['default_branch'] = default_branch
|
||||
config['git_url'] = 'git@bitbucket.org:%s.git' % repository_name
|
||||
|
||||
config['commit_info.url'] = target['links.html.href']
|
||||
config['commit_info.url'] = target['links.html.href'] or ''
|
||||
config['commit_info.message'] = target['message']
|
||||
config['commit_info.date'] = target['date']
|
||||
|
||||
|
|
Reference in a new issue