cli
cli copied to clipboard
case is not handled properly when calling travis API

Image text in case it's hard to see:
? What is your npm registry? https://registry.npmjs.org/
? What is your npm username? almenon
? What is your NPM two-factor authentication code? hunter2
? What is your GitHub username? Almenon
? What CI are you using? Travis CI
almenon // I manually edited the source code to print githubOrg and repoName out
arepl-backend
{ file: 'not found' }
ERR! semantic-release Error: Unable to find repo id for "https://github.com/almenon/arepl-backend.git" on Travis.
ERR! semantic-release at setUpTravis (C:/Users/almenon/AppData/Roaming/npm/node_modules/semantic-release-cli/src/lib/travis.js:104:13)
ERR! semantic-release at <anonymous>
ERR! semantic-release at process._tickCallback (internal/process/next_tick.js:160:7)
ERR! semantic-release { Error: Unable to find repo id for "https://github.com/almenon/arepl-backend.git" on Travis.
ERR! semantic-release at setUpTravis (C:/Users/almenon/AppData/Roaming/npm/node_modules/semantic-release-cli/src/lib/travis.js:104:13)
ERR! semantic-release at <anonymous>
ERR! semantic-release at process._tickCallback (internal/process/next_tick.js:160:7)
ERR! semantic-release stack: 'Error: Unable to find repo id for "https://github.com/almenon/arepl-backend.git" on Travis.\n at setUpTravis (C:/Users/almenon/AppData/Roaming/npm/node_modules/semantic-release-cli/src/lib/travis.js:104:13)\n at <anonymous>\n at process._tickCallback (internal/process/next_tick.js:160:7)' }
Travis API is case-sensitive, presumably because they love pain and suffering.
You can see the case sensitivity here: https://api.github.com/users/Almenon <- works https://api.github.com/users/almenon <- does not work
Or here:
https://repl.it/@almenon/testingTravisAPI?language=nodejs
Most users probably get lucky and avoid this snake trap, but somewhere within semantic-release-cli it decides to pass in my username & repo lowercased, and it barfs.
Workaround:
Manually edit the code to use uppercased name. Or retire from programming forever to live in solitary as a Himalayan monk. Luckily the first option worked 🎉