Introduce generic child->parent label inference
This makes the TypeLabel
processor generic by handling trees of labels (e.g. bug
(parent) -> security
(child), feature
(parent) -> [feature::addition, feature::maintenance, feature::enhancement]
(children) etc.).
- Labels tree are represented by a simple
LabelTree = Struct.new(:parent_label, :child_labels, :label_group)
class. -
Label = Struct.new(:text, :multiple_parents)
represents a single label, with amultiple_parents
attribute that tells whether different parent labels can be set on a given label (e.g. security can have ~bug or ~feature). In that case, we never change the parent label that's currently set. -
LabelTree#label_group
allow to define label tree parents that are mutually exclusive. For instance trees forbug
andfeature
both use the same:mr_type
label group. This is used to remove irrelevant parent labels. -
LabelMatch = Struct.new(:label, :label_tree)
is used to encapsulate a match between a textual label (from the webhook payload) to its corresponding label tree. -
LABELS_TAXONOMY
is an array ofLabelTree
objects. - The current behavior should be kept exactly the same, but now we also add Engineering Allocation every time an
~"Eng-Consumer::*"
or~"Eng-Producer::*"
label is added.
Action items
-
When adding a new Triager
, verify that it has been added to theDEFAULT_TRIAGERS
intriage/triage/handler.rb
in the appropriate order. -
If applicable, identify the affected groups and how to communicate to them: -
/cc @ person_or_group
=> -
Relevant Slack channels => -
Week-in-review
-
Closes #152 (closed).
Edited by Rémy Coutable