cli
cli copied to clipboard
Setup for Travis without GitHub Admin rights
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
- Run
semantic-release-cli setup --npm-token=<NPM_TOKEN here> --gh-token=<GH_TOKEN here>
, selectOther (prints tokens)
for theWhat CI are you using?
question. - Open the repo on GitHub and add the CI user to the repository with Write Rights (write rights required for creating tags / releases)
- Open the repo in Travis and manually set
NPM_TOKEN
/GH_TOKEN
- 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
good point, :+1: