semantic-release / condition-travis

:no_entry_sign: semantic-release plugin to check Travis CI environment before publishing.
MIT License
9 stars 11 forks source link

fix: add travisApiPrefix #105

Closed SimenB closed 6 years ago

SimenB commented 6 years ago

This matches the schema of github options.

This is technically not needed, as we could just expect users to add /api themselves. Thoughts?

SimenB commented 6 years ago

Hmm, this isn't enough. Or, I tried to just add /api in my existing env variable, and I still get the same error.

 An error occurred while running semantic-release: { HTTPError: Response code 405 (Method Not Allowed)
    at stream.catch.then.data (/home/travis/build/simen-bekkhus/test-semantic-release/node_modules/got/index.js:338:13)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
  name: 'HTTPError',
  host: 'travis.schibsted.io',
  hostname: 'travis.schibsted.io',
  method: 'POST',
  path: '/auth/github',
  protocol: 'https:',
  url: 'https://travis.schibsted.io/auth/github',
  statusCode: 405,
  statusMessage: 'Method Not Allowed',
  headers: 
   { server: 'nginx/1.9.4',
     date: 'Mon, 11 Dec 2017 08:41:11 GMT',
     'content-type': 'text/plain',
     'content-length': '26',
     connection: 'close',
     allow: 'GET, HEAD',
     'x-content-type-options': 'nosniff' } }
SimenB commented 6 years ago

Ah, url.resolve https://github.com/semantic-release/travis-deploy-once/blob/65259a623ee5a6cbeddaa54a35f81daeff94baa9/lib/get-token.js#L15

pvdlg commented 6 years ago

Closing in favor of semantic-release/travis-deploy-once#32