Support for labeling based on PR title
Description:
It would be nice if we could use this action to set up a step that would label PRs based on their title.
Take feat(xxx): something and fix(yyy): something else as examples.
We can write a configuration like this:
T-feat:
- pr-title: "^feat"
T-fix:
- pr-title: "^fix"
And get respective labels on PRs based on their titles.
Justification: Allows automation for workflows that have PR naming conventions and we already have something similar with the branch names, So if there isn't an API restriction making it impossible it can be a useful addition.
Are you willing to submit a PR? Yes
Hello @rzvxa, Thank you for creating this feature request. We will investigate it and get back to you as soon as we have some feedback.
Hello @rzvxa, Thank you for creating this feature request. We will investigate it and get back to you as soon as we have some feedback.
Thanks, I appreciate your time❤️
This would be very beneficial; please consider implementing it. Thank you in advance!
For our case we would also find this very useful for applying a "DO-NOT-MERGE" label to a PR when they have "do not merge" in the title
This would be a huge benefit for our use case as well. We don't enforce anything on individual branches, only on the actual merge where we squash and use the PR title and description.
So our branch names aren't curated, but our PR titles are. Which unfortunately falls outside of the current action configuration.
Tracking this with the good work done in #866.
Big +1 to this feature request. It would be great to get rid of my custom solution:
- Take the
all-labelsoutput from this action - Use
gh pr viewto get the PR title (dynamic value whereasgithub.event.pull_request.titleis statically set per workflow trigger) - Use
gh pr editto add/remove labels (if applicable) after analyzing the title.