pmowrer/semantic-release-github-pr

Does not handle plugin arguments correctly

Closed this issue · 3 comments

This is what I get when trying to run the tool on set of plugins which includes arguments for the plugins:

Plugin definition in package.json:

    "plugins": [
      "@semantic-release/commit-analyzer",
      "@semantic-release/release-notes-generator",
      "@semantic-release/changelog",
      ["@semantic-release/exec", {
        "prepareCmd": "./set-version.sh ${nextRelease.version}"
      }],
      "@semantic-release/git",
      "@semantic-release/github"
    ]

Logs:

[1:06:33 PM] [semantic-release] › ℹ  Start step "analyzeCommits" of plugin "[Function: ]"
[1:06:33 PM] [semantic-release] [[Function: ]] › ℹ  Analyzing commit: Merge cfc8298efc373c8f5264adb44ee43851ecf6b227 into 3e9dd3f212760b87f4c27ff0735e6ab35b92a59c
[1:06:33 PM] [semantic-release] [[Function: ]] › ℹ  The commit should not trigger a release
... (omitted)
[1:06:33 PM] [semantic-release] [[Function: ]] › ℹ  Analysis of 9 commits complete: minor release
[1:06:33 PM] [semantic-release] › ✔  Completed step "analyzeCommits" of plugin "[Function: ]"
[1:06:33 PM] [semantic-release] › ℹ  Start step "analyzeCommits" of plugin "[Function: ]"
[1:06:33 PM] [semantic-release] › ✔  Completed step "analyzeCommits" of plugin "[Function: ]"
[1:06:33 PM] [semantic-release] › ℹ  Start step "analyzeCommits" of plugin "[Function: ]"
[1:06:33 PM] [semantic-release] › ✔  Completed step "analyzeCommits" of plugin "[Function: ]"
[1:06:33 PM] [semantic-release] › ℹ  Start step "analyzeCommits" of plugin "[Function: ]"
[1:06:33 PM] [semantic-release] › ✖  Failed step "analyzeCommits" of plugin "[Function: ]"
[1:06:33 PM] [semantic-release] › ✖  An error occurred while running semantic-release: TypeError [ERR_INVALID_ARG_TYPE]: The "id" argument must be of type string. Received an instance of Array
    at validateString (internal/validators.js:120:11)
    at Module.require (internal/modules/cjs/loader.js:1019:3)
    at require (internal/modules/cjs/helpers.js:72:18)
    at /home/vsts/work/1/s/node_modules/semantic-release-github-pr/src/index.js:86:24
    at validator (/home/vsts/work/1/s/node_modules/semantic-release/lib/plugins/normalize.js:34:30)
    at /home/vsts/work/1/s/node_modules/semantic-release/lib/plugins/pipeline.js:37:40
    at next (/home/vsts/work/1/s/node_modules/p-reduce/index.js:17:9)
    at processTicksAndRejections (internal/process/task_queues.js:97:5) {
  code: 'ERR_INVALID_ARG_TYPE',
  pluginName: '[Function: ]'
}
TypeError [ERR_INVALID_ARG_TYPE]: The "id" argument must be of type string. Received an instance of Array

As the error says, it's looking for a plugin ID and instead finds an array and doesn't know what to do with it.

Thanks for the report @Lknechtli! I think I have a fix for this

🎉 This issue has been resolved in version 6.0.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Thanks for fixing this!