Encapsulate determining the event purpose
Github webhook events are pretty detailed, so it's able to distinguish
eg. between opening a new pull request and pushing into already existing
pull request. As this does not map exactly onto gerrit events, provide
a level of abstraction for places where certain kind of events have to
be distinguished.
This causes that dequeue mechanism starts to work with github pull
requests.
Change-Id: I90ef72ccf2d4e669b7e1304e5b9eb351ca9b5b62
diff --git a/tests/fixtures/layouts/dequeue-github.yaml b/tests/fixtures/layouts/dequeue-github.yaml
new file mode 100644
index 0000000..25e92c9
--- /dev/null
+++ b/tests/fixtures/layouts/dequeue-github.yaml
@@ -0,0 +1,18 @@
+- pipeline:
+ name: check
+ manager: independent
+ trigger:
+ github:
+ - event: pull_request
+ action:
+ - opened
+ - changed
+
+- job:
+ name: one-job-project-merge
+
+- project:
+ name: org/one-job-project
+ check:
+ jobs:
+ - one-job-project-merge