git integrations: Change the limit of shown commits from 10 to 20.

This commit is contained in:
wizsid11 2017-03-10 01:55:21 +05:30 committed by Tim Abbott
parent cdb07c7005
commit f066e3e8d6
3 changed files with 3 additions and 3 deletions

View File

@ -5,7 +5,7 @@ SUBJECT_WITH_PR_OR_ISSUE_INFO_TEMPLATE = u'{repo} / {type} #{id} {title}'
EMPTY_SHA = '0000000000000000000000000000000000000000'
COMMITS_LIMIT = 10
COMMITS_LIMIT = 20
COMMIT_ROW_TEMPLATE = u'* [{commit_short_sha}]({commit_url}): {commit_msg}\n'
COMMITS_MORE_THAN_LIMIT_TEMPLATE = u"[and {commits_number} more commit(s)]"

View File

@ -23,7 +23,7 @@ class BitbucketHookTests(WebhookTestCase):
fixture_name = 'push_commits_above_limit'
self.url = self.build_url(fixture_name)
commit_info = u'* [25f93d2](https://bitbucket.org/kolaszek/repository-name/commits/25f93d22b719e2d678a7ad5ee0ef0d1fcdf39c12): c\n'
expected_message = u"kolaszek pushed to branch master\n\n{}[and 40 more commit(s)]".format(commit_info * 10)
expected_message = u"kolaszek pushed to branch master\n\n{}[and 30 more commit(s)]".format(commit_info * 20)
self.send_and_test_stream_message(fixture_name, self.EXPECTED_SUBJECT_BRANCH_EVENTS, expected_message, **self.api_auth(self.TEST_USER_EMAIL))
def test_bitbucket_on_force_push_event(self):

View File

@ -32,7 +32,7 @@ class GithubWebhookTest(WebhookTestCase):
def test_push_50_commits(self):
# type: () -> None
commit_info = "* [0d1a26e](https://github.com/baxterthehacker/public-repo/commit/0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c): Update README.md\n"
expected_message = u"baxterthehacker [pushed](https://github.com/baxterthehacker/public-repo/compare/9049f1265b7d...0d1a26e67d8f) to branch changes\n\n{}[and 40 more commit(s)]".format(
expected_message = u"baxterthehacker [pushed](https://github.com/baxterthehacker/public-repo/compare/9049f1265b7d...0d1a26e67d8f) to branch changes\n\n{}[and 30 more commit(s)]".format(
commit_info * COMMITS_LIMIT
)
self.send_and_test_stream_message('push_50_commits', self.EXPECTED_SUBJECT_BRANCH_EVENTS, expected_message, HTTP_X_GITHUB_EVENT='push')