diff --git a/doc/source/user/jobs.rst b/doc/source/user/jobs.rst index 837fb17f3d..51a148a484 100644 --- a/doc/source/user/jobs.rst +++ b/doc/source/user/jobs.rst @@ -303,6 +303,12 @@ of item. The identifier for the change. + .. var:: change_url + + The URL to the source location of the given change. + E.g., `https://review.example.org/#/c/123456/` or + `https://github.com/example/example/pull/1234`. + .. var:: patchset The patchset identifier for the change. If a change is @@ -332,6 +338,12 @@ are available: The patchset identifier for the change. If a change is revised, this will have a different value. + .. var:: change_url + + The URL to the source location of the given change. + E.g., `https://review.example.org/#/c/123456/` or + `https://github.com/example/example/pull/1234`. + Branch Items ++++++++++++ diff --git a/zuul/executor/client.py b/zuul/executor/client.py index be41186016..f97d286df1 100644 --- a/zuul/executor/client.py +++ b/zuul/executor/client.py @@ -175,6 +175,8 @@ class ExecutorClient(object): zuul_params['tag'] = item.change.tag if hasattr(item.change, 'number'): zuul_params['change'] = str(item.change.number) + if hasattr(item.change, 'url'): + zuul_params['change_url'] = item.change.url if hasattr(item.change, 'patchset'): zuul_params['patchset'] = str(item.change.patchset) if (hasattr(item.change, 'oldrev') and item.change.oldrev @@ -196,6 +198,8 @@ class ExecutorClient(object): ) if hasattr(i.change, 'number'): d['change'] = str(i.change.number) + if hasattr(i.change, 'url'): + d['change_url'] = i.change.url if hasattr(i.change, 'patchset'): d['patchset'] = str(i.change.patchset) if hasattr(i.change, 'branch'):