Set filter according to PR/Change in URL
E.g. https://zuul-server/#333 will set filter to 333
Introduce related configuration option
And always pass the full change url in github status payloads
Allow the status_url to be used in a pipeline start-message.
Change-Id: I7b9eccb1d218d65d8c6b01e042e6cce4f8aec89a
diff --git a/tests/unit/test_github_driver.py b/tests/unit/test_github_driver.py
index 605a479..e8abf79 100644
--- a/tests/unit/test_github_driver.py
+++ b/tests/unit/test_github_driver.py
@@ -239,9 +239,11 @@
self.waitUntilSettled()
self.assertIn('check', A.statuses)
check_status = A.statuses['check']
+ check_url = ('http://zuul.example.com/status/#%s,%s' %
+ (A.number, A.head_sha))
self.assertEqual('Standard check', check_status['description'])
self.assertEqual('pending', check_status['state'])
- self.assertEqual('http://zuul.example.com/status', check_status['url'])
+ self.assertEqual(check_url, check_status['url'])
self.assertEqual(0, len(A.comments))
self.executor_server.hold_jobs_in_build = False
@@ -250,7 +252,7 @@
check_status = A.statuses['check']
self.assertEqual('Standard check', check_status['description'])
self.assertEqual('success', check_status['state'])
- self.assertEqual('http://zuul.example.com/status', check_status['url'])
+ self.assertEqual(check_url, check_status['url'])
self.assertEqual(1, len(A.comments))
self.assertThat(A.comments[0],
MatchesRegex('.*Build succeeded.*', re.DOTALL))