renovatebot / renovate

Home of the Renovate CLI: Cross-platform Dependency Automation by Mend.io
https://mend.io/renovate
GNU Affero General Public License v3.0
17.59k stars 2.32k forks source link

Add config option to omit `(major)` from PR titles #12151

Open Xavientois opened 3 years ago

Xavientois commented 3 years ago

What would you like Renovate to be able to do?

Give users the ability to toggle/edit the suffix that is appended to PR titles. Currently, if the PR is for a major version update, it gets (major) appended to the end. It would be useful to be able to configure this to not show up or to display different text.

If you have any ideas on how this should be implemented, please tell us here.

The simplest option would be to allow toggling with a boolean, but allowing for modification using templating would provide more fine-grained control.

Is this a feature you are interested in implementing yourself?

Yes

rarkins commented 3 years ago

So if you implemented this option would you be fine having two PRs with same title (e.g. one major, one non-major, but unable to distinguish them by title alone)?

Is there a particularly strong reason why you need this? (because adding new options is not "free", everything bloats config one more step)

Xavientois commented 3 years ago

One of the main reasons is that my org wants PRs to end with the id for the relevant JIRA issue, so when the (major) suffix is appended, it breaks that convention.

So if you implemented this option would you be fine having two PRs with same title (e.g. one major, one non-major, but unable to distinguish them by title alone)?

I agree with you that this would be difficult to distinguish. The ideal scenario would be to use templating to swap where the (major) goes in the title, but I don't know if that is possible.

Does (major) get appended when both major and minor versions are grouped in a single PR?

rarkins commented 3 years ago

Easiest for me to just show you the logic: https://github.com/renovatebot/renovate/blob/a1b7e1fee4b4353c6988af71095a40bb4d5b5d4c/lib/workers/repository/updates/generate.ts#L215-L228