Repository navigation
Filter bots by labels with a labels: expression in the bot file - #562
Merged
Merged
Conversation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Contributor
Author
|
Ready to merge What I ranOn
I checked the diff against #561 and Matthew's answers on it:
Every one of these has code and a test. The verification follows the Worth considering
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #561.
A bot's front matter can now say which labels a subject needs before the bot starts a thread on it, so different bots can take different kinds of issue and pull request.
init-scratchgets anepicbot, and thedevbot skips epic issues.What it does
labels: epicneeds the label.labels: "!epic"needs it absent.{ and: [...] },{ or: [...] }and{ not: ... }combine them, and a bare list meansand. Label names ignore case.labels:takes every subject, as before.labels. The poller keeps them current fromlabeledandunlabeledupdates, so a bot that wantsepicstarts when the label arrives later.labels:value fails with the file name, like the other keys.init-scratchwritesepic.md(labels: epic) and givesdev.mdlabels: "!epic".docs/developing.mdand CHANGELOG are updated, and the CLI goes to 2.2.0.Worth knowing
and/or/notkeys, plus a!prefix on a name.!has to be quoted in YAML ("!epic").Test it locally
npm run build && npm test && npm run typecheck && npm run lint && npm run format:checkNew tests:
files.test.ts: parsinglabels:, the bad cases, andand/or/!/notmatching.rules.test.ts: which bots start for issues and pull requests, and a label arriving later.poller.test.ts: labeled and unlabeled updates keep the subject's labels current.github.test.ts: label names read from discovery.init-scratch.test.ts: the epic bot and dev's!epic.To try it live, follow the steps in #561. The verification will be in
verifications/<this PR>.mdon the branch.🤖 Generated with Claude Code