The auto label job should be split
The job that runs automatic labels on issues currently adds and removes labels. However, if there are labels that should be persisted, then they will potentially be removed.
To fix this, the automatic label job should be split into two new jobs:
- Automatically add labels:
auto-add
- Automatically remove labels:
auto-remove
A policy file representing this proposed change would look like this:
policy:
enabled: true
type: issue
action: open
name: needs-triage
description: |
This policy automatically adds labels to issues when they are created, and removes the needs-triage label if it exists before the job is run.
jobs:
- labels:
- auto-add
- name: needs-triage
action: remove
- comments:
- This issue has been automatically labelled. If I have made a mistake, please manually change the labels and I will learn from your changes.