Skip to content
This repository was archived by the owner on May 23, 2025. It is now read-only.
This repository was archived by the owner on May 23, 2025. It is now read-only.

Merging into the same branch should not abort the workflow when disabled #47

@jagiella

Description

@jagiella

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I get an error when releasing on the default branch (main), eventhough the documentation suggests that the allowSameBranchMerge option is false by default.

[3:03:38PM] [semantic-release] [@saithodev/semantic-release-backmerge] › ✘  Process aborted due to an error while backmerging a branch.
[3:03:38PM] [semantic-release] [@saithodev/semantic-release-backmerge] › ✘  Error: Branch for back-merge is the same as the branch which includes the release. Aborting back-merge workflow. 
    at performBackmergeIntoBranch (file:///builds/mlcv/common/libmlcv/node_modules/@saithodev/semantic-release-backmerge/dist/perform-backmerge.js:10:15)
    at performBackmerge (file:///builds/mlcv/common/libmlcv/node_modules/@saithodev/semantic-release-backmerge/dist/perform-backmerge.js:99:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async success (file:///builds/mlcv/common/libmlcv/node_modules/@saithodev/semantic-release-backmerge/dist/index.js:52:5)
    at async validator (file:///builds/mlcv/common/libmlcv/node_modules/semantic-release/lib/plugins/normalize.js:36:24)
    at async file:///builds/mlcv/common/libmlcv/node_modules/semantic-release/lib/plugins/pipeline.js:37:34
    at async file:///builds/mlcv/common/libmlcv/node_modules/semantic-release/lib/plugins/pipeline.js:31:3
    at async pluginsConfigAccumulator.<computed> [as success] (file:///builds/mlcv/common/libmlcv/node_modules/semantic-release/lib/plugins/index.js:87:11)
    at async run (file:///builds/mlcv/common/libmlcv/node_modules/semantic-release/index.js:[215](https://serv26.art.site/mlcv/common/libmlcv/-/jobs/27312#L215):3)
    at async Module.default (file:///builds/mlcv/common/libmlcv/node_modules/semantic-release/index.js:275:22)
Cleaning up project directory and file based variables
00:01
ERROR: Job failed: exit code 1

Expected Behavior

should always merge back to main except the release happens on main.

Edit: Or at least that should not lead to an java error, making the pipeline job fail ;-)

Steps To Reproduce

The configuration is

{
  "plugins": [
    "@semantic-release/commit-analyzer",
    ["@saithodev/semantic-release-backmerge", {
      "backmergeBranches": [
        "main", 
        {"from": "production", "to": "pre-production"}],
      "mergeMode": "ours"
    }],
  ],
  "branches": [
    {name: "main",           prerelease: "dev"},
    {name: "pre-production", prerelease: "rc"},
    {name: "production",     prerelease: false}
  ]
}

Environment

- **semantic-release/semantic-release** version: 20.1.1
- **@saithodev/semantic-release-backmerge** version: latest

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions