We currently listen to this event like this:
```
- name: publish
description: Whenever tags are published.
manager: IndependentPipelineManager
trigger:
gerrit:
- event: ref-updated
ref: ^refs/tags/.*$
```
The `ref-updated` listener for Zuul pipelines can be triggered in one of three ways.
* tag create
* ZUUL_OLDREV=00000000000000000000000000000000
* ZUUL_NEWREV=123456789abcdef123456789abcdef12
* tag delete
* ZUUL_OLDREV=123456789abcdef123456789abcdef12
* ZUUL_NEWREV=00000000000000000000000000000000
* tag alter:
* ZUUL_OLDREV=123456789abcdef123456789abcdef12
* ZUUL_NEWREV=abcdef123456789abcdef123456789ab
Instead of having to assert the value of these environment variables inside every job, this should be handled at the Zuul level by providing a way to filter these events more precisely.
Perhaps in the trigger.gerrit match object we can expose a `action` property with values `create`, `delete` and `alter`. Then the Zuul layout can match against that with a string or regex.
We could also expose the oldrev/newrev but that doesn't seem very useful as the sha1 is meaningless except for the 000 value.
See also:
* [Zuul docs: Reference updated parameters](https://github.com/openstack-infra/zuul/blob/135a9358c18a1a1fdc26952865622d2b9add1011/doc/source/launchers.rst#reference-updated-parameters)