NetworkManager/.triage-policies.yml
Íñigo Huguet cf86af6cbd Explain new issues workflow and add triage automation
Add explanation of how to indicate the new issues workflow to
MAINTAINERS.md: triage -> investigation -> devel. The different
stages are indicated using Gitlab's scoped labels (mutually exclusive).

These stages try to hightlight that the issue cannot be fixed and it's
not moving forward because more info is needed, already.  Also, add a
section to CONTRIBUTING.md highlighting the importance of helping in
the triage and investigation stages: developers often cannot fix bugs
because lack of time to investigate, but even users that doesn't know
how to fix it due to lack of knowledge of the code base can help thanks
to their knowledge on networking.

Finally, make the 'triage:issues' CI job to work again, adding some
new policies with new automations. The automation will add or remove the
labels: stale, help-needed::{triage, investigation, devel} and
unassigned.

The labels help-needed::* and unassigned will be automatically added to
all issues without an assignee. This reflects better the reality of not
having enough time to work on most of the issues unless there is some
external help.
2024-06-18 13:11:58 +02:00

185 lines
5.2 KiB
YAML

host_url: https://gitlab.freedesktop.org
resource_rules:
issues:
rules:
- name: Set initial workflow stage
conditions:
state: opened
forbidden_labels:
- workflow::triage
- workflow::investigation
- workflow::devel
actions:
labels:
- workflow::triage
- name: Ensure that only one workflow label is used (1/2)
conditions:
state: opened
labels:
- workflow::triage
- workflow::investigation
forbidden_labels:
- workflow::devel
actions:
remove_labels:
- workflow::triage
- name: Ensure that only one workflow label is used (1/2)
conditions:
state: opened
labels:
- workflow::{triage, investigation}
- workflow::devel
actions:
remove_labels:
- workflow::triage
- workflow::investigation
- name: Remove help-needed::* and unassigned labels on assigned issue
conditions:
state: opened
ruby: resource["assignees"].length > 0
labels:
- help-needed::{triage, investigation, devel}
- unassigned
actions:
remove_labels:
- help-needed::triage
- help-needed::investigation
- help-needed::devel
- unassigned
- name: Add help-needed::triage and unassigned labels on unassigned issues
conditions:
state: opened
ruby: resource["assignees"].length == 0
labels:
- workflow::triage
forbidden_labels:
- help-needed::triage
- unassigned
actions:
labels:
- help-needed::triage
- unassigned
- name: Remove wrong help-needed::* labels for issues on triage stage
conditions:
state: opened
labels:
- workflow::triage
- help-needed::{investigation, devel}
actions:
remove_labels:
- help-needed::investigation
- help-needed::devel
- name: Add help-needed::investigation and unassigned labels on unassigned issues
conditions:
state: opened
ruby: resource["assignees"].length == 0
labels:
- workflow::investigation
forbidden_labels:
- help-needed::investigation
- unassigned
actions:
labels:
- help-needed::investigation
- unassigned
- name: Remove wrong help-needed::* labels for issues on investigation stage
conditions:
state: opened
labels:
- workflow::investigation
- help-needed::{triage, devel}
actions:
remove_labels:
- help-needed::triage
- help-needed::devel
- name: Add help-needed::devel and unassigned labels on unassigned issues
conditions:
state: opened
ruby: resource["assignees"].length == 0
labels:
- workflow::devel
forbidden_labels:
- help-needed::devel
- unassigned
actions:
labels:
- help-needed::devel
- unassigned
- name: Remove wrong help-needed::* labels for issues on devel stage
conditions:
state: opened
labels:
- workflow::devel
- help-needed::{triage, investigation}
actions:
remove_labels:
- help-needed::triage
- help-needed::investigation
- name: Remove triage::* labels if the issue is not triaged
conditions:
state: opened
labels:
- workflow::triage
- triaged::{bug, RFE}
actions:
remove_labels:
- triaged::bug
- triaged::RFE
- name: Ensure that only one triaged::* label is used
conditions:
state: opened
labels:
- triaged::bug
- triaged::RFE
actions:
remove_labels:
- triaged::RFE
- name: Mark issue as stale with no activity for 4 months
conditions:
state: opened
date:
attribute: updated_at
condition: older_than
interval_type: months
interval: 4
forbidden_labels:
- stale
actions:
comment: >-
This issue has been inactive for 4 months and got stale.
Contributions welcome to move it forward.
labels:
- stale
merge_requests:
rules:
- name: Mark merge-request as stale after no activity for 2 months
conditions:
date:
attribute: updated_at
condition: older_than
interval_type: months
interval: 2
state: opened
forbidden_labels:
- stale
actions:
comment: >-
This merge-request has been inactive for 2 months and got stale.
Work is necessary to move it forward.
labels:
- stale