mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-06 21:20:20 +01:00
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
This commit is contained in:
parent
fda05b0af0
commit
ca59877016
1 changed files with 44 additions and 0 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue