saitho / semantic-release-backmerge

:twisted_rightwards_arrows: semantic-release plugin to back-merge a release into a develop branch
https://saitho.github.io/semantic-release-backmerge/
56 stars 11 forks source link

Plugin is not recognizing settings from a shared configuration #25

Open kerasing opened 2 years ago

kerasing commented 2 years ago

I have a custom shared configuration that configures this plugin as the last entry in the plugins array:

[
          "@saithodev/semantic-release-backmerge",
          {
            branchName: "next",
            backmergeStrategy: "merge",
            message: "chore(release): backmerge [skip ci]",
          },
 ]

When I use the shared configuration, I pretty much only use extends. In the example below, I am using the shared configuration to publish the shared configuration (hence index instead of the package name):

"release": {
    "extends": [
      "./index.js"
    ]
}

However, when I attempt to use it, I get the following error, which indicates that the configuration settings are not coming in from the shared configuration properly, as it wants to rebase develop onto the release branch instead of a merge commit into next:

[semantic-release] › ℹ  Start step "success" of plugin "@saithodev/semantic-release-backmerge"
[semantic-release] [@saithodev/semantic-release-backmerge] › ℹ  Release succeeded. Performing back-merge into branch "develop".
[semantic-release] [@saithodev/semantic-release-backmerge] › ℹ  Fetching all remotes.
[semantic-release] [@saithodev/semantic-release-backmerge] › ℹ  Fetching latest commits from repository at "<url>".
[semantic-release] [@saithodev/semantic-release-backmerge] › ℹ  Branch is detached. Checking out master branch.
[semantic-release] [@saithodev/semantic-release-backmerge] › ℹ  Checking out develop branch.
[semantic-release] [@saithodev/semantic-release-backmerge] › ℹ  Performing backmerge with "rebase" strategy.

It does, in fact, create a new develop branch instead of merging into the configured next branch. On the one hand, fantastic - it does a backmerge! On the other ... it's to the wrong branch.

I am using the latest (1.5.3) with this.

kerasing commented 2 years ago

I wouldn't have a problem with renaming the next branch develop, except some of my teams use a two-stage release process, so they've got a dev->next->main workflow, which means that I wouldn't be able to backmerge main into next, just into develop.

saitho commented 2 years ago

Not sure what this is about. since plugin configurations should be part of semantic-release. Which semantic-release version are you using?

I'll try to reproduce that issue.