naccyde / rpms / systemd

Forked from rpms/systemd a year ago
Clone
984f77
From cd8518b7f4ebfda9955bf0b649cf759c45e729f1 Mon Sep 17 00:00:00 2001
984f77
From: Jan Macku <jamacku@redhat.com>
984f77
Date: Mon, 6 Jun 2022 15:40:20 +0200
984f77
Subject: [PATCH] ci(Mergify): configuration update
984f77
984f77
Add rules for needs-ci label management
984f77
984f77
RHEL-only
984f77
984f77
Related: #2087152
984f77
---
984f77
 .mergify.yml | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
984f77
 1 file changed, 48 insertions(+)
984f77
 create mode 100644 .mergify.yml
984f77
984f77
diff --git a/.mergify.yml b/.mergify.yml
984f77
new file mode 100644
984f77
index 0000000000..6fa400effd
984f77
--- /dev/null
984f77
+++ b/.mergify.yml
984f77
@@ -0,0 +1,48 @@
984f77
+# doc: https://docs.mergify.com
984f77
+---
984f77
+
984f77
+pull_request_rules:
984f77
+  - name: Add `needs-ci` label on CI fail
984f77
+    conditions:
984f77
+      - or:
984f77
+        # Unit tests
984f77
+        - -check-success=build (stream8, GCC)
984f77
+        - -check-success=build (stream8, GCC_ASAN)
984f77
+        # CentOS Stream CI
984f77
+        - -check-success=CentOS CI (CentOS Stream 8)
984f77
+        # LGTM
984f77
+        - and:
984f77
+          - "-check-success=LGTM analysis: JavaScript"
984f77
+          - "-check-neutral=LGTM analysis: JavaScript"
984f77
+        - and:
984f77
+          - "-check-success=LGTM analysis: Python"
984f77
+          - "-check-neutral=LGTM analysis: Python"
984f77
+        - and:    
984f77
+          - "-check-success=LGTM analysis: C/C++"
984f77
+          - "-check-neutral=LGTM analysis: C/C++"
984f77
+    actions:
984f77
+      label:
984f77
+        add:
984f77
+          - needs-ci
984f77
+
984f77
+  - name: Remove `needs-ci` label on CI success
984f77
+    conditions:
984f77
+      # Unit tests
984f77
+      - check-success=build (stream8, GCC)
984f77
+      - check-success=build (stream8, GCC_ASAN)
984f77
+      # CentOS Stream CI
984f77
+      - check-success=CentOS CI (CentOS Stream 8)
984f77
+      # LGTM
984f77
+      - or:
984f77
+        - "check-success=LGTM analysis: JavaScript"
984f77
+        - "check-neutral=LGTM analysis: JavaScript"
984f77
+      - or:
984f77
+        - "check-success=LGTM analysis: Python"
984f77
+        - "check-neutral=LGTM analysis: Python"
984f77
+      - or:    
984f77
+        - "check-success=LGTM analysis: C/C++"
984f77
+        - "check-neutral=LGTM analysis: C/C++"
984f77
+    actions:
984f77
+      label:
984f77
+        remove:
984f77
+          - needs-ci