Added topic-changed-event on triggers.py

Depends on https://review.opendev.org/#/c/731169/

Change-Id: I8d1ed67b11e1ff1fcf13325108c007d6baff07c4
Signed-off-by: Eren ATAS <eatas.contractor@libertyglobal.com>
This commit is contained in:
Eren ATAS 2020-06-05 14:01:11 +02:00
parent 804df6c9eb
commit 28e43831e9
3 changed files with 93 additions and 1 deletions

View File

@ -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

View File

@ -0,0 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<project>
<triggers class="vector">
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
<spec/>
<gerritProjects/>
<skipVote>
<onSuccessful>false</onSuccessful>
<onFailed>false</onFailed>
<onUnstable>false</onUnstable>
<onNotBuilt>false</onNotBuilt>
</skipVote>
<silentMode>false</silentMode>
<silentStartMode>false</silentStartMode>
<escapeQuotes>true</escapeQuotes>
<dependencyJobsNames/>
<commitMessageParameterMode>BASE64</commitMessageParameterMode>
<nameAndEmailParameterMode>PLAIN</nameAndEmailParameterMode>
<changeSubjectParameterMode>PLAIN</changeSubjectParameterMode>
<commentTextParameterMode>BASE64</commentTextParameterMode>
<notificationLevel/>
<dynamicTriggerConfiguration>false</dynamicTriggerConfiguration>
<triggerConfigURL/>
<dynamicGerritProjects class="empty-list"/>
<triggerInformationAction/>
<triggerOnEvents>
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginChangeAbandonedEvent/>
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginChangeMergedEvent/>
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginChangeRestoredEvent/>
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedEvent>
<verdictCategory>Code-Review</verdictCategory>
<commentAddedTriggerApprovalValue>lorem</commentAddedTriggerApprovalValue>
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedEvent>
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedEvent>
<verdictCategory>Verified</verdictCategory>
<commentAddedTriggerApprovalValue>ipsum</commentAddedTriggerApprovalValue>
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedEvent>
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent>
<commentAddedCommentContains>dolor</commentAddedCommentContains>
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent>
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginDraftPublishedEvent/>
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginPatchsetCreatedEvent>
<excludeDrafts>true</excludeDrafts>
<excludeTrivialRebase>false</excludeTrivialRebase>
<excludeNoCodeChange>true</excludeNoCodeChange>
<excludePrivateState>false</excludePrivateState>
<excludeWipState>true</excludeWipState>
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginPatchsetCreatedEvent>
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginPrivateStateChangedEvent/>
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginRefUpdatedEvent/>
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginTopicChangedEvent/>
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginWipStateChangedEvent/>
</triggerOnEvents>
<buildStartMessage/>
<buildFailureMessage/>
<buildSuccessfulMessage/>
<buildUnstableMessage/>
<buildNotBuiltMessage/>
<buildUnsuccessfulFilepath/>
<customUrl/>
<serverName>__ANY__</serverName>
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
</triggers>
</project>

View File

@ -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