question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

autolabeler needs on option to stop labeling on match (break on match)

See original GitHub issue

I observed that is almost impossible to prevent multiple label matches, regardless how well you try to define the matching patterns. This does not play well with labels that are supposed to be exclusive, like being a bug or a feature or something to be excluded from the changelog.

Lucky for us the current configuration format is using sequence of objects for labeling, making it very easy to implement a break on match option for labels.

Basically by adding an option that tells labeler to stop finding other labels to add to the pull request when current pattern is matched we can prevent duplicates.

Using this we can put all labels that do not have conflicts at the top of the sequence and after them start adding labels with stop_on_match: true at the bottom.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
ssbarneacommented, Jan 18, 2022

LOL, I did not want to close it.

0reactions
ssbarneacommented, Feb 4, 2022

I cannot remove the update event because i will lose the ability to detect when two conflicting labels are present. Like having bug and skip-changelog at the same time. Yes, I use a single workflow for all checks. See https://github.com/ansible-community/ansible-lint/blob/main/.github/workflows/ack.yml and https://github.com/ansible-community/devtools/blob/main/.github/workflows/ack.yml

PS. Not really a big deal but I wanted to mention it so you would eventually know what features is better to implement, or not.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Matching against a label - AWS Documentation
You can use a label match statement to evaluate web request labels. You can match against Label, which requires the label name, or...
Read more >
Hazard Communication Standard: Labels and Pictograms
The HCS requires chemical manufacturers, importers, or distributors to ensure that each container of hazardous chemicals leaving the workplace is labeled, ...
Read more >
Specimen Labeling Requirements | Department of Pathology
Every specimen brought to the laboratory must have a label on the container in ... transmittal or clinic encounter form that must match...
Read more >
CW-C6000/C6500 Series Technical Reference Guide - Epson
Since ink cartridges are designed to stop the operation before ink runs out ... If they do not match, enter the length L...
Read more >
User Manual for glossaries.sty v4.52 - CTAN
Note that glossaries-extra provides an extra indexing option (bib2gls) which ... The 〈parent-label〉 value must match the 〈entry-label〉 used when the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found