Include PR title in change message
Gerrit includes the whole commit message (subject + body). For a GitHub PR only the body was included in the change message. This patch adds also the PR title to the change message so we have a similar behavior for GitHub. Change-Id: I662e6898cb52b73e0341512b7bffe7f858552dda
This commit is contained in:
committed by
Tobias Henkel
parent
a1283f403f
commit
47d55215aa
@@ -36,7 +36,9 @@ class TestGithubDriver(ZuulTestCase):
|
||||
def test_pull_event(self):
|
||||
self.executor_server.hold_jobs_in_build = True
|
||||
|
||||
A = self.fake_github.openFakePullRequest('org/project', 'master', 'A')
|
||||
body = "This is the\nPR body."
|
||||
A = self.fake_github.openFakePullRequest('org/project', 'master', 'A',
|
||||
body=body)
|
||||
self.fake_github.emitEvent(A.getPullRequestOpenedEvent())
|
||||
self.waitUntilSettled()
|
||||
|
||||
@@ -56,6 +58,7 @@ class TestGithubDriver(ZuulTestCase):
|
||||
self.assertEqual('master', zuulvars['branch'])
|
||||
self.assertEquals('https://github.com/org/project/pull/1',
|
||||
zuulvars['items'][0]['change_url'])
|
||||
self.assertEqual(zuulvars["message"], "A\n\n{}".format(body))
|
||||
self.assertEqual(1, len(A.comments))
|
||||
self.assertThat(
|
||||
A.comments[0],
|
||||
|
||||
Reference in New Issue
Block a user