You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support labeling based on the pull request/commit title and messages #55
The commit-specific matching might be more work, as it would require fetching all the commits that are contained in the PR, but the PR title and body should be already available.
What about adding a label config object item like pr: { body?: StringOrMatchConfig[], title?: StringOrMatchConfig[] }?
Ex:
# Add 'test' label to any change to *.spec.js files within the source dir# or with a PR title that is in the form 'test:*'# or with a PR body that contains the word 'test' but not 'bug'test:
- src/**/*.spec.js
- pr:
title:
- 'test:*'body:
- any: [ '*test*' ]all: [ '*bug*' ]
This could then be expanded to include the commits:
# Add 'test' label to any change to *.spec.js files within the source dir# or with a PR title that is in the form 'test:*'# or with a PR body that contains the word 'test' but not 'bug'# or has any commits with a title in the form 'test:*'test:
- src/**/*.spec.js
- pr:
title:
- 'test:*'body:
- any: [ '*test*' ]all: [ '*bug*' ]
- commits:
title:
- 'test:*'
Could this feature be expanded to let the labeler read the commit message, so for example, if a repo is following commitizen, we can tag PRs (and eventually issues), with the type of commit?
for example:
test: 💍 Remove test for untestable code, due to environment
Activity
austince commentedon Jan 13, 2021
The commit-specific matching might be more work, as it would require fetching all the commits that are contained in the PR, but the PR title and body should be already available.
What about adding a label config object item like
pr: { body?: StringOrMatchConfig[], title?: StringOrMatchConfig[] }?Ex:
This could then be expanded to include the commits:
In typescript, this could then be modeled like:
ssbarnea commentedon Oct 7, 2021
Release Drafter already has the auto-labeling feature, see https://github.com/release-drafter/release-drafter#autolabeler
Sadly, AFAIK, it does not have the ability to be used as a check that prevent a change from being merged if is missing the right labels.
felipefrancisco commentedon May 10, 2023
+1
marekpeszt commentedon May 18, 2023
+1
merklefruit commentedon May 26, 2023
+1
silasdavis commentedon Jul 3, 2023
Can we also have the ability to specifically label based on git commit footers, e.g.
This would play nicely with conventional commits (https://www.conventionalcommits.org/en/v1.0.0/#specification), for example.
phun-ky commentedon Aug 14, 2023
Could this feature be expanded to let the labeler read the commit message, so for example, if a repo is following commitizen, we can tag PRs (and eventually issues), with the type of commit?
for example:
would then add a
testlabelkalvarez2 commentedon Sep 27, 2023
Hi, would it be acceptable to instead of the structured way, "simply" to add an optional prefix on the blob?
For example:
Would add the label "label1" if the body contains the string #potato
Looking at the code, this would be simpler to add, and from the user experience point of view I think it works ok to?
Jaskowicz1 commentedon Oct 2, 2023
I like that, would be extremely useful!
kalvarez2 commentedon Oct 3, 2023
@MaksimZhukov should I make another for 5.0 branch? is there any hope that this will be merged to 4.0?
#688
sschuberth commentedon Jan 12, 2024
No more lightweight / fitting comparison might be to https://github.com/fuxingloh/multi-labeler#features, tough.
mofosyne commentedon Jun 3, 2024
Heads up that someone did something similar https://github.com/Bhacaz/label-regex but I think it be more ideal if it's already part of actions/labeler to minimize the number of separate workflow required.
ok-coder1 commentedon Aug 14, 2025
#866 adds functionality for PR titles.