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
This commit is contained in:
parent
d55d7af510
commit
ddeb95ac33
|
@ -52,6 +52,10 @@
|
|||
|
||||
var collapsed_exceptions = [];
|
||||
var current_filter = read_cookie('zuul_filter_string', '');
|
||||
var change_set_in_url = window.location.href.split('#')[1];
|
||||
if (change_set_in_url) {
|
||||
current_filter = change_set_in_url;
|
||||
}
|
||||
var $jq;
|
||||
|
||||
var xhr,
|
||||
|
|
|
@ -239,9 +239,11 @@ class TestGithubDriver(ZuulTestCase):
|
|||
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 @@ class TestGithubDriver(ZuulTestCase):
|
|||
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))
|
||||
|
|
|
@ -68,7 +68,10 @@ class GithubReporter(BaseReporter):
|
|||
state = self._commit_status
|
||||
url = ''
|
||||
if self.connection.sched.config.has_option('zuul', 'status_url'):
|
||||
url = self.connection.sched.config.get('zuul', 'status_url')
|
||||
base = self.connection.sched.config.get('zuul', 'status_url')
|
||||
url = '%s/#%s,%s' % (base,
|
||||
item.change.number,
|
||||
item.change.patchset)
|
||||
description = ''
|
||||
if pipeline.description:
|
||||
description = pipeline.description
|
||||
|
|
|
@ -74,7 +74,12 @@ class BaseReporter(object):
|
|||
return ret
|
||||
|
||||
def _formatItemReportStart(self, pipeline, item, with_jobs=True):
|
||||
return pipeline.start_message.format(pipeline=pipeline)
|
||||
status_url = ''
|
||||
if self.connection.sched.config.has_option('zuul', 'status_url'):
|
||||
status_url = self.connection.sched.config.get('zuul',
|
||||
'status_url')
|
||||
return pipeline.start_message.format(pipeline=pipeline,
|
||||
status_url=status_url)
|
||||
|
||||
def _formatItemReportSuccess(self, pipeline, item, with_jobs=True):
|
||||
msg = pipeline.success_message
|
||||
|
|
Loading…
Reference in New Issue