coala / corobo

A bot to help newcomers onboard OS projects! It's awesome!
MIT License
66 stars 103 forks source link

semaphore CI scripts assume master branch is main repo #583

Closed jayvdb closed 6 years ago

jayvdb commented 6 years ago
$ git grep master .ci/semaphore.*
.ci/semaphore.answers.sh:if [[ $BRANCH_NAME != "master" ]]
.ci/semaphore.docker.sh:if [[ $BRANCH_NAME == "master" ]]

Those assume that when BRANCH_NAME == "master", it is a push to the main repository.

It is quite common for people to accidentally build from the 'master' of forks, and submit PRs from that branch.

While it is highly undesirable that PRs come from master, and we intend to prevent it with a gitmate plugin, .ci/semaphore.docker.sh and .ci/semaphore.answers.sh should not break as a result. They should detect pull requests, and not do the deploy-preparation steps.

c.f. https://github.com/coala/corobo/pull/582#issuecomment-405707141 which broke because of this, and probably other PRs also.

starlord1311 commented 6 years ago

@jayvdb can i take up this issue?