From ca598770167d4e2e4f7430a284d8561a5f07f717 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=8D=C3=B1igo=20Huguet?= Date: Fri, 20 Sep 2024 21:41:24 +0200 Subject: [PATCH 1/2] triage: ensure that CI is run for MRs from community Use a blocking thread to remember the maintainers to run the CI. The idea is that the maintainers have to run it manually and resolve the thread. Due to a limitation in gitlab-triage it has to be done in a weird way: it is possible to check if the author is member of the project and it is possible to check if he/she is member of the parent group, but it is not possible to check if it's member of either one in a single rule. Because of this a simple rule "author is not member" cannot be created. To workaround this we create 2 rules to detect if the author IS a member of the project or the group. If he/she is, we add a label to indicate it. Then, a 3rd rule checks if this label is missing, and if it's missing, it means that he/she is not a member. This issue has been reported to gitlab-triage but it doesn't seem to be in active maintenaince: https://gitlab.com/gitlab-org/ruby/gems/gitlab-triage/-/issues/362 --- .triage-policies.yml | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/.triage-policies.yml b/.triage-policies.yml index 6176b9195..8d3fe9857 100644 --- a/.triage-policies.yml +++ b/.triage-policies.yml @@ -182,3 +182,47 @@ resource_rules: Work is necessary to move it forward. labels: - stale + + - name: Label for MRs authored by core contributors (member_of project) + conditions: + state: opened + forbidden_labels: + - core-contributor + - community-contributor + author_member: + source: project + condition: member_of + source_id: NetworkManager/NetworkManager + actions: + labels: + - core-contributor + + - name: Label for MRs authored by core contributors (member_of group) + conditions: + state: opened + forbidden_labels: + - core-contributor + - community-contributor + author_member: + source: group + condition: member_of + source_id: NetworkManager + actions: + labels: + - core-contributor + + - name: Label for MRs authored by community contributors and ensure CI is run + conditions: + state: opened + forbidden_labels: + - core-contributor + - community-contributor + actions: + labels: + - community-contributor + comment_type: thread + comment: >- + Atention maintainers: remember to run the CI!! + + This MR is authored by a contributor from the community and the CI does not + run automatically. From 2c037706492aae44b348057b8c2ad1f9b2da622f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=8D=C3=B1igo=20Huguet?= Date: Thu, 26 Sep 2024 08:16:52 +0200 Subject: [PATCH 2/2] triage: add link to gitlab-triage docs --- .triage-policies.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.triage-policies.yml b/.triage-policies.yml index 8d3fe9857..b1b94e540 100644 --- a/.triage-policies.yml +++ b/.triage-policies.yml @@ -1,3 +1,5 @@ +# Gitlab-triage documentation: https://gitlab.com/gitlab-org/ruby/gems/gitlab-triage/-/blob/master/README.md + host_url: https://gitlab.freedesktop.org resource_rules: