diff --git a/playbooks/roles/gerrit/files/its/actions.config b/playbooks/roles/gerrit/files/its/actions.config new file mode 100644 index 0000000000..3c58ebd1e7 --- /dev/null +++ b/playbooks/roles/gerrit/files/its/actions.config @@ -0,0 +1,12 @@ +[rule "comment-on-status-update"] +action = add-standard-comment +event-type = patchset-created,change-abandoned,change-restored,change-merged +[rule "change_abandoned"] +action = set-status TODO +event-type = change-abandoned +[rule "change_in_progress"] +action = set-status REVIEW +event-type = patchset-created,change-restored +[rule "change_merged"] +action = set-status MERGED +event-type = change-merged diff --git a/playbooks/roles/gerrit/tasks/main.yaml b/playbooks/roles/gerrit/tasks/main.yaml index a95ee5f6f5..bea17596cd 100644 --- a/playbooks/roles/gerrit/tasks/main.yaml +++ b/playbooks/roles/gerrit/tasks/main.yaml @@ -55,6 +55,7 @@ - cache - db - etc + - etc/its - git - hooks - index @@ -206,6 +207,14 @@ - change-abandoned - patchset-created +- name: Write ITS plugin configuration file + copy: + src: its/actions.config + dest: '{{ gerrit_site_dir }}/etc/its/actions.config' + owner: '{{ gerrit_user_name }}' + group: '{{ gerrit_user_name }}' + mode: 0644 + - name: Write manage-projects script template: src: "manage-projects.j2"