From ce540c46745e0286876f92c324f9a92a6c01bdb9 Mon Sep 17 00:00:00 2001
From: Fabien Boucher <fboucher@redhat.com>
Date: Feb 04 2020 14:59:10 +0000
Subject: Add github.com pipelines


---

diff --git a/zuul.d/_pipelines.yaml b/zuul.d/_pipelines.yaml
index 7c85c3b..ab0ff8b 100644
--- a/zuul.d/_pipelines.yaml
+++ b/zuul.d/_pipelines.yaml
@@ -28,6 +28,15 @@
           action:
             - opened
             - changed
+      github.com:
+        - event: pull_request
+          action:
+            - opened
+            - changed
+            - reopened
+        - event: pull_request
+          action: comment
+          comment: (?i)^\s*recheck\s*$
     start:
       pagure.io:
         status: 'pending'
@@ -37,6 +46,10 @@
         status: 'pending'
         status-url: "https://fedora.softwarefactory-project.io/zuul/status/change/{change.number},{change.patchset}"
         comment: false
+      github.com:
+        status: 'pending'
+        status-url: "https://fedora.softwarefactory-project.io/zuul/status/change/{change.number},{change.patchset}"
+        comment: false
     start-message: |
       Starting {pipeline.name} jobs. Status at {status_url}
     success:
@@ -46,12 +59,20 @@
       src.fedoraproject.org:
         status: 'success'
         status-url: "https://fedora.softwarefactory-project.io/zuul/buildset/{buildset.uuid}"
+      github.com:
+        status: 'success'
+        status-url: "https://fedora.softwarefactory-project.io/zuul/buildset/{buildset.uuid}"
       sqlreporter:
     failure:
       pagure.io:
         status: 'failure'
+        status-url: "https://fedora.softwarefactory-project.io/zuul/buildset/{buildset.uuid}"
       src.fedoraproject.org:
         status: 'failure'
+        status-url: "https://fedora.softwarefactory-project.io/zuul/buildset/{buildset.uuid}"
+      github.com:
+        status: 'failure'
+        status-url: "https://fedora.softwarefactory-project.io/zuul/buildset/{buildset.uuid}"
       sqlreporter:
 
 - pipeline:
@@ -79,6 +100,16 @@
         merged: False
         open: True
         status: success
+      github.com:
+        review:
+          # Require an approval from user with write access (e.g. core-reviewer)
+          - permission: write
+            type: approved
+        # Require label
+        label: mergeit
+        status: "softwarefactory-project-zuul\\[bot\\]:fedora/check:success"
+        open: True
+        current-patchset: True
     trigger:
       pagure.io:
         - event: pg_pull_request
@@ -98,6 +129,26 @@
         - event: pg_pull_request
           action: tagged
           tag: gateit
+      github.com:
+        - event: pull_request_review
+          action: submitted
+          state: approved
+        - event: pull_request
+          action: comment
+          comment: (?i)^\s*regate\s*$
+        - event: pull_request_review
+          action: submitted
+          state: approved
+        - event: pull_request_review
+          action: dismissed
+          state: request_changes
+        - event: pull_request
+          action: status
+          status: "softwarefactory-project-zuul\\[bot\\]:fedora/check:success"
+        - event: pull_request
+          action: labeled
+          label:
+            - mergeit
     start:
       pagure.io:
         status: 'pending'
@@ -107,6 +158,10 @@
         status: 'pending'
         status-url: "https://fedora.softwarefactory-project.io/zuul/status/change/{change.number},{change.patchset}"
         comment: false
+      github.com:
+        status: 'pending'
+        status-url: "https://fedora.softwarefactory-project.io/zuul/status/change/{change.number},{change.patchset}"
+        comment: false
     success:
       pagure.io:
         status: 'success'
@@ -118,6 +173,11 @@
         status-url: "https://fedora.softwarefactory-project.io/zuul/buildset/{buildset.uuid}"
         merge: true
         comment: true
+      github.com:
+        status: 'success'
+        merge: true
+        status-url: "https://fedora.softwarefactory-project.io/zuul/buildset/{buildset.uuid}"
+        comment: true
       sqlreporter:
     failure:
       pagure.io:
@@ -128,6 +188,10 @@
         status: 'failure'
         status-url: "https://fedora.softwarefactory-project.io/zuul/buildset/{buildset.uuid}"
         comment: true
+      github.com:
+        status: 'failure'
+        status-url: "https://fedora.softwarefactory-project.io/zuul/buildset/{buildset.uuid}"
+        comment: true
       sqlreporter:
     window-floor: 20
     window-increase-factor: 2
@@ -145,6 +209,9 @@
       src.fedoraproject.org:
         - event: pg_push
           ref: ^refs/heads/.*$
+      github.com:
+        - event: push
+          ref: ^refs/heads/.*$
     success:
       sqlreporter:
     failure:
@@ -167,6 +234,9 @@
       src.fedoraproject.org:
         - event: pg_push
           ref: ^refs/tags/.*$
+      github.com:
+        - event: push
+          ref: ^refs/tags/.*$
     success:
       sqlreporter:
     failure:

