semantic-release / semantic-release/release-notes-generator

Fails with AWS CodeCommit repository URLs

Open
#182 4 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
368
Forks
55
Avg merge
10m
Merged PRs (30d)
1

Description

The plugin fails if the git repository uses a "non-standard"git URL, e.g., AWS CodeCommit URLs:

codecommit::eu-central-1://<profile>@<repository name>

I turned link generation of, but the plugin tries to parse the URL anyway:

[15:26:27] [semantic-release] » i  Start step "generateNotes" of plugin "@semantic-release/release-notes-generator"
[15:26:27] [semantic-release] » ×  Failed step "generateNotes" of plugin "@semantic-release/release-notes-generator"
[15:26:27] [semantic-release] » ×  An error occurred while running semantic-release: TypeError: object null is not iterable (cannot read property Symbol(Symbol.iterator))
    at generateNotes (C:\Users\CASAATHO\Development\aws-ewe-roles\node_modules\@semantic-release\release-notes-generator\index.js:40:33)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async validator (C:\Users\CASAATHO\Development\aws-ewe-roles\node_modules\semantic-release\lib\plugins\normalize.js:34:24)
    at async C:\Users\CASAATHO\Development\aws-ewe-roles\node_modules\semantic-release\lib\plugins\pipeline.js:37:34
    at async C:\Users\CASAATHO\Development\aws-ewe-roles\node_modules\semantic-release\lib\plugins\pipeline.js:31:3
    at async Object.pluginsConf.<computed> [as generateNotes] (C:\Users\CASAATHO\Development\aws-ewe-roles\node_modules\semantic-release\lib\plugins\index.js:80:11)
    at async run (C:\Users\CASAATHO\Development\aws-ewe-roles\node_modules\semantic-release\index.js:183:23)
    at async module.exports (C:\Users\CASAATHO\Development\aws-ewe-roles\node_modules\semantic-release\index.js:260:22)
    at async module.exports (C:\Users\CASAATHO\Development\aws-ewe-roles\node_modules\semantic-release\cli.js:55:5) {
  pluginName: '@semantic-release/release-notes-generator'
}
TypeError: object null is not iterable (cannot read property Symbol(Symbol.iterator))
    at generateNotes (C:\Users\CASAATHO\Development\aws-ewe-roles\node_modules\@semantic-release\release-notes-generator\index.js:40:33)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async validator (C:\Users\CASAATHO\Development\aws-ewe-roles\node_modules\semantic-release\lib\plugins\normalize.js:34:24)
    at async C:\Users\CASAATHO\Development\aws-ewe-roles\node_modules\semantic-release\lib\plugins\pipeline.js:37:34
    at async C:\Users\CASAATHO\Development\aws-ewe-roles\node_modules\semantic-release\lib\plugins\pipeline.js:31:3
    at async Object.pluginsConf.<computed> [as generateNotes] (C:\Users\CASAATHO\Development\aws-ewe-roles\node_modules\semantic-release\lib\plugins\index.js:80:11)
    at async run (C:\Users\CASAATHO\Development\aws-ewe-roles\node_modules\semantic-release\index.js:183:23)
    at async module.exports (C:\Users\CASAATHO\Development\aws-ewe-roles\node_modules\semantic-release\index.js:260:22)
    at async module.exports (C:\Users\CASAATHO\Development\aws-ewe-roles\node_modules\semantic-release\cli.js:55:5) {
  pluginName: '@semantic-release/release-notes-generator'
}

The fix seems to be to check the result of the match for null and assign the empty array.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in generateNotes in index.js and reproduce the failure with the AWS CodeCommit URL while link generation is disabled. Check the match result before it is iterated, then verify that generateNotes completes without the null-iteration error for this URL.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
release
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.