Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(match): matches by PR title and body #688

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kalvarez2
Copy link

@kalvarez2 kalvarez2 commented Sep 27, 2023

Description:
Enhances the glob matchers to support matching a text on PR title or body.
The change is backwards compatible, no need to change the existing configurations. Any and All continue to work.
The matchers now support prefix "title:" and "body:"
Simple example:

label1:

  • "body:#potato"

=>Would add the label "label1" if the body contains the string #potato

The existing all and any continue to work:
isText:

  • all: ['*.txt', 'body:#isOnlyText']

=> Would set the label isText if both all the files have extension txt, and the body contains "#isOnlyText"

The change is backwards compatible, but documentation changes with examples are also included, comments / enhancements are very welcome.

Related issue:
#55

Check list:

  • Mark if documentation changes are required.
  • Mark if tests were added or updated to cover the changes.

@kalvarez2 kalvarez2 force-pushed the feat/filter-by-pr-body-or-title branch from a062d48 to 1884eaf Compare September 27, 2023 12:19
@kalvarez2 kalvarez2 marked this pull request as ready for review September 27, 2023 12:21
@kalvarez2 kalvarez2 requested a review from a team as a code owner September 27, 2023 12:21
@onesneakymofo onesneakymofo mentioned this pull request Nov 3, 2023
@jmeridth
Copy link

@kalvarez2 any chance we can pick this back up? Would love this feature to be available in this action. @MaksimZhukov is this something this action is interested in?

@mofosyne
Copy link

mofosyne commented Jun 3, 2024

Would like to follow up on this as an alternative to using https://github.com/Bhacaz/label-regex

@mwarkentin
Copy link

This would be useful for us as well, using branch names can catch some of the PRs I'd like to label, but I suspect we'll miss a bunch which might have a keyword we could use in the PR description or title.

My use case is to label incident-related PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants