Allow labels search by exact title
What does this MR do and why?
Search a label by exact title via GraphQL.
We have label search but it performs fuzzy matching. For some cases, we want to ensure only exact matches are returned. This adds title to the labels resolver to be consistent with label.
-
titleargument andsearchTermis mutually exclusive and cannot be used together. - if
titleis used,searchInis removed (because we're ignoring it)
This includes scoped labels and unscoped. By also adding arguments like includeAncestorGroups one can get multiple labels at different levels of the hierarchy with the same title.
Changelog: added
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
How to set up and validate locally
query {
group(fullPath: "flightjs") {
labels(title: "bug") { # also can use other args includeAncestorGroups: true, includeDescendantGroups: true
nodes {
title
id
}
}
}
}
query {
project(fullPath: "flightjs/Flight") {
labels(title: "bug") { # also can use other arg includeAncestorGroups: true
nodes {
title
id
}
}
}
}
Related to #465547 (closed)
Edited by charlie ablett