postUpgradeTasks that generates separate commits #36512
gaeljw
started this conversation in
Suggest an Idea
Replies: 1 comment 1 reply
-
|
Unfortunately this is challenging with today's architecture in Renovate. First of all, all updates are in one commit. Changing that is complicated. Post-upgrade commands "executionMode" can be configured per-upgrade or per-branch. It sounds like you had in mind a per-branch execution mode? Maybe if executionMode=branch than it would be possible to have two commits - one for the regular updates and a second for post upgrade tasks. It might even need to be another setting for executionMode such as branch-separate-commits to ensure the config is valid. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Tell us more.
Hello folks,
I haven't yet played with
postUpgradeTasksbut I'm considering using them to automatically reformat code after upgrades of the formatter version.In my case, these are SBT projects with Scalafmt formatter. When a PR is opened for Scalafmt, I'd like to automatically run
sbt scalafmtAllthat will reformat the code as it can happen that a new version of the tool does generate a slightly different formatted output of the existing code.I guess that so far, no issue, it's the purpose of
postUpgradeTasks, right?But then, I'd like to have this reformatting operation generates a separate commit and not be included in the same commit as the version upgrade.
Even more, I'd then like to run a second task that will update the
.git-blame-ignore-revsfile with the commit of the reformatting.The Renovate PR would contain 3 commits:
I guess this could be kept generic with an option on the
postUpgradeTasksthat states if it generates a dedicated commit or not.Any thoughts?
Beta Was this translation helpful? Give feedback.
All reactions