feat(label): add hook auto-labeling issues and pull requests - #44
Open
Osheun wants to merge 1 commit into
Open
Conversation
Contributor
|
Thanks for opening this PR! |
|
@Osheun is attempting to deploy a commit to the Caleb's Projects Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
|
Note All commit messages follow Conventional Commits standard. |
Labels issues and PRs from title keyword matching (both), and PRs from changed file path globs. Ships with sensible default keyword and path rules that apply when the hook is enabled without config. Closes calebephrem#36
Osheun
force-pushed
the
feat/label-hook
branch
from
August 19, 2026 06:00
70bb273 to
b1f9c25
Compare
Contributor
|
Note All commits and the PR title adhere to the Conventional Commits specification. Good to go! |
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.
What
New
labelhook, as requested in #36. Just likeassign, it is rule-based:assign) against a PR's changed files, PRs onlyBoth rule sets ship with sensible defaults that kick in when the hook is enabled without further config:
bug(fix, bug, crash, error, broken),enhancement(feat, feature, add, improve, support),documentation(docs, documentation, readme, typo)documentation(**/*.md,docs/**),tests(tests/**,**/*.test.*, ...),dependencies(package.json,**/*.lock, ...)Defining your own
keywords/pathsreplaces the defaults. Matched labels are deduplicated and applied in a singleaddLabelscall; no API call is made when nothing matches.Changes
src/app/hooks/label/—issueOpen.ts(issues.opened),prOpen.ts(pull_request opened/reopened/synchronize), purematchers.ts,schema.tssrc/schemas/hooks.tsHOOKS.mdwith a config exampletests/app/hooks/label.test.tscovering matchers, defaults, custom rules, dedup and disabled stateNo new permissions/events needed (
issues: writeand theissues/pull_requestevents are already inapp.yml).Closes #36