[NetworkManager-openvpn] gitlab-ci: add scheduled pipeline to triage inactive issues and MRs



commit 81a1ed7c8f91eba763a6b99886278d551a1f9df2
Author: Antonio Cardace <acardace redhat com>
Date:   Mon Apr 6 13:59:57 2020 +0200

    gitlab-ci: add scheduled pipeline to triage inactive issues and MRs

 .gitlab-ci.yml       | 14 +++++++++++
 .triage-policies.yml | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 81 insertions(+)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 8ab0f0e..9cd4b4e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -4,6 +4,11 @@
 # If things don't seem to work, this can help:
 # https://gitlab.gnome.org/GNOME/NetworkManager-openvpn/-/ci/lint
 
+stages:
+  - build
+  - test
+  - triage
+
 .fedora_deps: &fedora_deps
   before_script:
     - dnf -y install
@@ -64,3 +69,12 @@ fedora28_dist:
 fedora_from_dist:
   <<: *fedora_from_dist
   image: fedora:latest
+
+triage:issues:
+  stage: triage
+  image: ruby:2.7
+  script:
+    - gem install gitlab-triage
+    - gitlab-triage -d --token $API_TOKEN --source-id $SOURCE_ID
+  only:
+    - schedules
diff --git a/.triage-policies.yml b/.triage-policies.yml
new file mode 100644
index 0000000..bd672a9
--- /dev/null
+++ b/.triage-policies.yml
@@ -0,0 +1,67 @@
+host_url: https://gitlab.gnome.org
+
+resource_rules:
+  issues:
+    rules:
+      - name: Close issues with no activity for 6 months
+        conditions:
+          date:
+            attribute: updated_at
+            condition: older_than
+            interval_type: months
+            interval: 6
+          state: opened
+        actions:
+            comment: |
+                This issue has been inactive for 6 months, closing automatically, please reopen if you think 
the issue is still relevant.
+            status: close
+            labels:
+                - auto-closed
+      - name: Close RFE with no activity for 12 months
+        conditions:
+          date:
+            attribute: updated_at
+            condition: older_than
+            interval_type: months
+            interval: 12
+          state: opened
+          labels:
+              - 1. Enhancement
+        actions:
+            comment: |
+                This enhancement issue has been inactive for 12 months, closing automatically, please reopen 
if you think the issue is still relevant.
+            status: close
+            labels:
+                - auto-closed
+      - name: Clear auto-closed label for open issues
+        conditions:
+          state: opened
+          labels:
+                - auto-closed
+        actions:
+            remove_labels:
+                - auto-closed
+  merge_requests:
+    rules:
+      - name: Close MRs with no activity after 2 month
+        conditions:
+          date:
+            attribute: updated_at
+            condition: older_than
+            interval_type: months
+            interval: 2
+          state: opened
+        actions:
+            comment: |
+                This MR has been inactive for more than 2 months, closing automatically, please reopen if 
you think it is still relevant.
+            status: close
+            labels:
+                - auto-closed
+      - name: Clear auto-closed label for open MRs
+        conditions:
+          state: opened
+          labels:
+                - auto-closed
+        actions:
+            remove_labels:
+                - auto-closed


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]