tzkhan / pr-update-action

GitHub Action that updates a pull request with information extracted from branch name

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

macro for target branch

vrothberg opened this issue · comments

First off, thanks for the action! I find it very helpful and it matches exactly what I was looking for.

I have one use case where I want the prefix of the PR title to be the target branch name. The %branch% macro evaluates to the source branch of a PR but I am looking for a macro that evaluates to the target, so it's more obvious to maintainers if a PR is not against the main/master branch but against a stable branch, for instance.

I couldn't find a way to do it with the action. Is it already supported?

I'm glad you found it helpful!

As mentioned, the %branch% token relates to the text extracted from the source branch and there isn't any regex/token support for the target branch... but I think it's a good idea and would be something generally useful, thanks!

I'll look to add support for it soon and keep this issue open till then.

I made a pr that resolves this issue.

#15

I've released v2 that includes this and other features.

Thanks to both of you!