API for filtering labels | Filter Labels by Name via API

During implementing https://gitlab.com/gitlab-org/gitlab-triage/merge_requests/44 (which implements a part of https://gitlab.com/gitlab-org/gitlab-ce/issues/49201#proposal) I find that I want to have an API which allows me to search for labels, and in this particular example, it would be any labels starting with missed:.

This is useful to determine which labels we need to act upon, so we could skip non-existing labels. (e.g. missed:11.9)

We have 20+ pages of labels, and it's not very effective to ask for all the labels and filter them in the memory. It would be nice to have an easy way to tell which labels are there for a specific pattern.

For now I made the script just act regardless the labels existed or not. For non-existing labels, it would just do nothing. It would be nice to skip them altogether.

@victorwu @smcgivern What do you think about this API?

/cc @meks

Edited Jan 07, 2020 by Mark Fletcher
Assignee Loading
Time tracking Loading