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

Set title rather than prefix it

rocketraman opened this issue · comments

Is there a way to set the title of the PR completely, rather than just prefix it?

GitHub requires a title when creating a PR, but we would rather just use the output of this action to set the complete title, and ignore the temporary title we need to enter at PR creation time.

Not really, as this action prefixes PR title by design.

You can work around it though by setting the PR title to . perhaps or some innocuous character. Alternatively, you can omit the last character from the title template and set it as the PR title. For instance:

title-template: '[%branch%'
title-prefix-space: false

and set the PR title to ]

Thanks, but based on the name of the action "PR update", I don't see why that should imply it can only prefix titles rather than set them outright.

I've added the functionality to my fork here, and it works in a backward compatible way to this version. Take a look and see if you might reconsider merging the functionality, I'll submit a PR. I haven't tested it yet, so there might be minor changes, but the principles should be right.

Thanks for contributing, appreciate your effort! I've had a quick look and I'll be happy to take in the changes after you've tested them and submitted the PR.