[nautilus/triage-automation] general: Add issue triaging automation



commit c4dca93dea1622ed393449e81a52c1a7e56b78b7
Author: Carlos Soriano <csoriano1618 gmail com>
Date:   Tue Oct 30 11:42:50 2018 +0000

    general: Add issue triaging automation
    
    Using https://gitlab.com/gitlab-org/gitlab-triage

 .gitlab-ci.yml       |  20 +++++++-
 .triage-policies.yml | 128 +++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 147 insertions(+), 1 deletion(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 98540f6da..1c308559a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -6,6 +6,7 @@ stages:
     - test
     - cross_environment
     - deploy
+    - triage
 
 .test_template: &distro_test
   script:
@@ -224,4 +225,21 @@ pages:
       - public
 
   only:
-    - master
\ No newline at end of file
+    - master
+
+triage:
+  stage: triage
+  script:
+    - gem install gitlab-triage
+    - gitlab-triage --token $nautilus_bot_token --project-id $CI_PROJECT_PATH --host-url 
https://gitlab.gnome/org
+  only:
+    - schedules
+
+triage:dry-run:
+  stage: triage
+  script:
+    - gem install gitlab-triage
+    - gitlab-triage --dry-run --token $nautilus_bot_token --project-id $CI_PROJECT_PATH --host-url 
https://gitlab.gnome/org
+  only:
+    - schedules
+  when: manual
\ No newline at end of file
diff --git a/.triage-policies.yml b/.triage-policies.yml
new file mode 100644
index 000000000..66bb2dc71
--- /dev/null
+++ b/.triage-policies.yml
@@ -0,0 +1,128 @@
+resource_rules:
+  issues:
+    rules:
+      - name: Close stale issues with no milestone or planning labels
+        conditions:
+          date:
+            attribute: updated_at
+            condition: older_than
+            interval_type: months
+            interval: 18
+          milestone:
+            - No Milestone
+          forbidden_labels:
+            - 2. Deliverable
+            - 2. Stretch
+            - 1. Epic
+            # Features are handled in a different rule
+            - 1. Feature
+          state: opened
+        actions:
+          status: close
+          labels:
+            - 2. Auto Updated
+          comment: |
+            Hi,
+
+            Thank you for raising an issue to help improve Nautilus. We're sorry this particular issue has 
gone unnoticed for quite some time.
+
+            This issue will be closed, as it meets the following criteria:
+            * No activity in the past 18 months (3 releases).
+            * Unscheduled. Not associated with a milestone or with ~"2. Deliverable" or ~"2. Stretch" 
project planning labels.
+
+            We'd like to ask you to help us keep our issue tracker organized  by determining whether this 
issue should be reopened.
+
+            If this issue is reporting a bug, let us know if this issue is still present in a newer version 
and if you can reproduce it in the [nightly version](https://wiki.gnome.org/Apps/Nightly).
+
+            Thanks for your help!
+            ---
+            This was an automatic message. If you have suggestions to improve this automatic action feel 
free to add a comment on https://gitlab.gnome.org/GNOME/nautilus/issues/715
+
+      - name: Mark stale unlabelled issues for triage
+        conditions:
+          date:
+            attribute: updated_at
+            condition: older_than
+            interval_type: months
+            interval: 1
+          # We want to handle those that doesn't have these labels, including those with other labels.
+          forbidden_labels:
+            - 1. Bug
+            - 1. Crash
+            - 1. Epic
+            - 1. Feature
+          state: opened
+        actions:
+          labels:
+            - Untriaged
+        summarize:
+          title: Issues that need triaging
+          item: |
+            - [{{title}}]({{web_url}}) {{labels}}
+          summary: |
+            The following issues had no activity in the past month and they are unlabeled:
+
+            {{items}}
+
+            /cc @Teams/BugSquad
+
+      - name: Close old feature proposals without planning labels or milestones
+        conditions:
+          date:
+            attribute: created_at
+            condition: older_than
+            interval_type: months
+            interval: 12
+          labels:
+            - 1. Feature
+          forbidden_labels:
+            - 2. Deliverable
+            - 2. Stretch
+            - 1. Epic
+          milestone:
+            - No Milestone
+          state: opened
+          upvotes:
+            attribute: upvotes
+            condition: less_than
+            threshold: 10
+        actions:
+          labels:
+            - Auto Updated
+          status: close
+          comment: |
+            Hi,
+
+            First of all, thank you for raising an issue to help improve Nautilus. In order to maintain 
order in the issue tracker we are closing old feature proposals.
+
+            This issue will be closed as it meets the following criteria:
+            * Created more than 12 months ago
+            * Labeled as ~"1. Feature"
+            * Unscheduled. Not associated with a milestone or with ~"2. Deliverable" or ~"2. Stretch" 
project planning labels.
+
+            Thanks for your help!
+            ---
+            This was an automatic message. If you have suggestions to improve this automatic action feel 
free to add a comment on https://gitlab.gnome.org/GNOME/nautilus/issues/715
+
+    - name: Close issues that need information and weren't updated 
+        conditions:
+          date:
+            attribute: updated_at
+            condition: older_than
+            interval_type: weeks
+            interval: 4
+          state: opened
+          labels:
+            - 2. Needs Information 
+        actions:
+          status: close
+          labels:
+            - 2. Auto Updated
+          comment: |
+            Closing this issue as no further information or feedback has been provided.
+
+            Please feel free to reopen this issue if you can provide the information or feedback.
+
+            Thanks for your help!
+            ---
+            This was an automatic message. If you have suggestions to improve this automatic action feel 
free to add a comment on https://gitlab.gnome.org/GNOME/nautilus/issues/715


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