diff --git a/jenkins_jobs/modules/triggers.py b/jenkins_jobs/modules/triggers.py index 8421fd6b7..d6b2d7bb7 100644 --- a/jenkins_jobs/modules/triggers.py +++ b/jenkins_jobs/modules/triggers.py @@ -154,8 +154,9 @@ def build_gerrit_triggers(xml_parent, data): "draft-published-event": "PluginDraftPublishedEvent", "patchset-uploaded-event": "PluginPatchsetCreatedEvent", "patchset-created-event": "PluginPatchsetCreatedEvent", - "ref-updated-event": "PluginRefUpdatedEvent", "private-state-changed-event": "PluginPrivateStateChangedEvent", + "ref-updated-event": "PluginRefUpdatedEvent", + "topic-changed-event": "PluginTopicChangedEvent", "wip-state-changed-event": "PluginWipStateChangedEvent", } tag_namespace = ( @@ -349,6 +350,8 @@ def gerrit(registry, xml_parent, data): * **draft-published-event** -- Trigger on draft published event. * **ref-updated-event** -- Trigger on ref-updated. Gerrit Trigger Plugin version >= 2.29.0 + * **topic-changed-event** -- Trigger on topic-changed. + Gerrit Trigger Plugin version >= 2.26.0 * **private-state-changed-event** -- Trigger on private state changed event. * **wip-state-changed-event** -- Trigger on wip state changed event. Gerrit Trigger Plugin version >= 2.8.0 diff --git a/tests/triggers/fixtures/gerrit028-trigger-simple-triggers.xml b/tests/triggers/fixtures/gerrit028-trigger-simple-triggers.xml new file mode 100644 index 000000000..b5dfea0b5 --- /dev/null +++ b/tests/triggers/fixtures/gerrit028-trigger-simple-triggers.xml @@ -0,0 +1,64 @@ + + + + + + + + false + false + false + false + + false + false + true + + BASE64 + PLAIN + PLAIN + BASE64 + + false + + + + + + + + + Code-Review + lorem + + + Verified + ipsum + + + dolor + + + + true + false + true + false + true + + + + + + + + + + + + + + __ANY__ + + + diff --git a/tests/triggers/fixtures/gerrit028-trigger-simple-triggers.yaml b/tests/triggers/fixtures/gerrit028-trigger-simple-triggers.yaml new file mode 100644 index 000000000..0fd18c0a5 --- /dev/null +++ b/tests/triggers/fixtures/gerrit028-trigger-simple-triggers.yaml @@ -0,0 +1,25 @@ +triggers: + - gerrit: + trigger-on: + - change-abandoned-event + - change-merged-event + - change-restored-event + - comment-added-event: + approval-category: Code-Review + approval-value: lorem + - comment-added-event: + approval-category: Verified + approval-value: ipsum + - comment-added-contains-event: + comment-contains-value: dolor + - draft-published-event + - patchset-created-event: + exclude-drafts: true + exclude-no-code-change: true + exclude-private: false + exclude-trivial-rebase: false + exclude-wip: true + - private-state-changed-event + - ref-updated-event + - topic-changed-event + - wip-state-changed-event