mirror of https://github.com/zulip/zulip.git
Fix Bitbucket2 integration fulfilled event type.
The "merged" event type was apparently renamed to "fulfilled".
This commit is contained in:
parent
f0cc6d8029
commit
e6ab93a4c4
|
@ -104,15 +104,15 @@ class Bitbucket2HookTests(WebhookTestCase):
|
|||
kwargs = {
|
||||
"HTTP_X_EVENT_KEY": 'pullrequest:rejected'
|
||||
}
|
||||
self.send_and_test_stream_message('v2_pull_request_merged_or_rejected', self.EXPECTED_SUBJECT_PR_EVENTS, expected_message, **kwargs)
|
||||
self.send_and_test_stream_message('v2_pull_request_fulfilled_or_rejected', self.EXPECTED_SUBJECT_PR_EVENTS, expected_message, **kwargs)
|
||||
|
||||
def test_bitbucket2_on_pull_request_merged_event(self):
|
||||
def test_bitbucket2_on_pull_request_fulfilled_event(self):
|
||||
# type: () -> None
|
||||
expected_message = u"kolaszek merged [PR #1](https://bitbucket.org/kolaszek/repository-name/pull-requests/1)"
|
||||
kwargs = {
|
||||
"HTTP_X_EVENT_KEY": 'pullrequest:merged'
|
||||
"HTTP_X_EVENT_KEY": 'pullrequest:fulfilled'
|
||||
}
|
||||
self.send_and_test_stream_message('v2_pull_request_merged_or_rejected', self.EXPECTED_SUBJECT_PR_EVENTS, expected_message, **kwargs)
|
||||
self.send_and_test_stream_message('v2_pull_request_fulfilled_or_rejected', self.EXPECTED_SUBJECT_PR_EVENTS, expected_message, **kwargs)
|
||||
|
||||
def test_bitbucket2_on_pull_request_comment_created_event(self):
|
||||
# type: () -> None
|
||||
|
|
|
@ -29,7 +29,7 @@ PULL_REQUEST_SUPPORTED_ACTIONS = [
|
|||
'created',
|
||||
'updated',
|
||||
'rejected',
|
||||
'merged',
|
||||
'fulfilled',
|
||||
'comment_created',
|
||||
'comment_updated',
|
||||
'comment_deleted',
|
||||
|
@ -356,7 +356,7 @@ GET_SINGLE_MESSAGE_BODY_DEPENDING_ON_TYPE_MAPPER = {
|
|||
'pull_request_updated': partial(get_pull_request_created_or_updated_body, action='updated'),
|
||||
'pull_request_approved': partial(get_pull_request_action_body, action='approved'),
|
||||
'pull_request_unapproved': partial(get_pull_request_action_body, action='unapproved'),
|
||||
'pull_request_merged': partial(get_pull_request_action_body, action='merged'),
|
||||
'pull_request_fulfilled': partial(get_pull_request_action_body, action='merged'),
|
||||
'pull_request_rejected': partial(get_pull_request_action_body, action='rejected'),
|
||||
'pull_request_comment_created': get_pull_request_comment_created_action_body,
|
||||
'pull_request_comment_updated': partial(get_pull_request_deleted_or_updated_comment_action_body, action='updated'),
|
||||
|
|
Loading…
Reference in New Issue