Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

info.github.endpoint is undefined when running npx semantic-release-cli setup #356

Closed
henrycity opened this issue Jan 16, 2021 · 2 comments

Comments

@henrycity
Copy link

henrycity commented Jan 16, 2021

When running npx semantic-release-cli setup with GitHub Actions for my public repository https://github.com/henrycity/movie-browser-frontend, I got this error

ERR! semantic-release RequestError: Error: Invalid URI "undefined/repos/henrycity/movie-browser-frontend/actions/secrets/public-key"
ERR! semantic-release     at new RequestError (/Users/tri.tran/.nvm/versions/node/v12.18.3/lib/node_modules/semantic-release-cli/node_modules/request-promise-core/lib/errors.js:14:15)
ERR! semantic-release     at Request.plumbing.callback (/Users/tri.tran/.nvm/versions/node/v12.18.3/lib/node_modules/semantic-release-cli/node_modules/request-promise-core/lib/plumbing.js:87:29)
ERR! semantic-release     at Request.RP$callback [as _callback] (/Users/tri.tran/.nvm/versions/node/v12.18.3/lib/node_modules/semantic-release-cli/node_modules/request-promise-core/lib/plumbing.js:46:31)
ERR! semantic-release     at self.callback (/Users/tri.tran/.nvm/versions/node/v12.18.3/lib/node_modules/semantic-release-cli/node_modules/request/request.js:185:22)
ERR! semantic-release     at Request.emit (events.js:315:20)
ERR! semantic-release     at Request.init (/Users/tri.tran/.nvm/versions/node/v12.18.3/lib/node_modules/semantic-release-cli/node_modules/request/request.js:273:17)
ERR! semantic-release     at Request.RP$initInterceptor [as init] (/Users/tri.tran/.nvm/versions/node/v12.18.3/lib/node_modules/semantic-release-cli/node_modules/request-promise-core/configure/request2.js:45:29)
ERR! semantic-release     at new Request (/Users/tri.tran/.nvm/versions/node/v12.18.3/lib/node_modules/semantic-release-cli/node_modules/request/request.js:127:8)
ERR! semantic-release     at request (/Users/tri.tran/.nvm/versions/node/v12.18.3/lib/node_modules/semantic-release-cli/node_modules/request/index.js:53:10)
ERR! semantic-release     at /Users/tri.tran/.nvm/versions/node/v12.18.3/lib/node_modules/semantic-release-cli/node_modules/request/index.js:100:12
ERR! semantic-release     at createSecret (/Users/tri.tran/.nvm/versions/node/v12.18.3/lib/node_modules/semantic-release-cli/src/lib/github-actions.js:36:28)
ERR! semantic-release     at module.exports (/Users/tri.tran/.nvm/versions/node/v12.18.3/lib/node_modules/semantic-release-cli/src/lib/github-actions.js:83:9)
ERR! semantic-release     at module.exports (/Users/tri.tran/.nvm/versions/node/v12.18.3/lib/node_modules/semantic-release-cli/src/lib/ci.js:50:17)
ERR! semantic-release     at processTicksAndRejections (internal/process/task_queues.js:97:5)
ERR! semantic-release     at module.exports (/Users/tri.tran/.nvm/versions/node/v12.18.3/lib/node_modules/semantic-release-cli/src/index.js:90:5)

I tried to log the info object in https://github.com/semantic-release/cli/blob/master/src/lib/ci.js. I notice that info.github.endpoint is undefined, which causes the error.

  giturl: 'https://github.com/henrycity/movie-browser-frontend.git',
  ghrepo: { slug: [ 'henrycity', 'movie-browser-frontend', '' ] },
  npm: {
    registry: 'https://npm.pkg.github.com/',
    authmethod: 'token',
    username: 'henrycity',
    password: 'xxxx,
    token: 'xxxx'
  },
  github: { token: 'xxxx }

Version: 5.4.1

@gr2m
Copy link
Member

gr2m commented Jan 20, 2021

@henrycity could you confirm that @meixg's pull request is resolving the problem?
#358

@henrycity
Copy link
Author

Thanks, I think it's working. No more error and I can see that NPM_TOKEN is added as a secret in the project setting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants