cli icon indicating copy to clipboard operation
cli copied to clipboard

Setup for Travis without GitHub Admin rights

Open gr2m opened this issue 9 years ago • 1 comments

At our organization, we use a dedicated CI GitHub user with restricted rights for semantic-release. The problem is that setup will fail if I select Travis in the setup, because creating a Hook requires admin rights.

Because of that, every setup is quite some work compared to the beauty of only running semantic-release-cli setup once. Here it is

  1. Run semantic-release-cli setup --npm-token=<NPM_TOKEN here> --gh-token=<GH_TOKEN here>, select Other (prints tokens) for the What CI are you using? question.
  2. Open the repo on GitHub and add the CI user to the repository with Write Rights (write rights required for creating tags / releases)
  3. Open the repo in Travis and manually set NPM_TOKEN / GH_TOKEN
  4. Manually create the .travis.yml file

I know this might be an edge case, but the efforts adds up, and if there is slick way to resolve this issue, we'd be happy to send a pull request for it. An idea would be that instead of failing after the What CI are you using question when selecting Travis, it could show a message that the passed user has insufficient rights to create a GitHub Hook, and prompt for credentials of another user. These credentials would be only used for this one request.

That'd be amazing <3

/cc @jo

gr2m avatar Oct 29 '15 22:10 gr2m

good point, :+1:

fernandogmar avatar Jun 13 '17 06:06 fernandogmar