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

semaphore CI scripts assume master branch is main repo #583

Closed
jayvdb opened this issue Jul 18, 2018 · 1 comment · Fixed by Man-Jain/corobo#1
Closed

semaphore CI scripts assume master branch is main repo #583

jayvdb opened this issue Jul 18, 2018 · 1 comment · Fixed by Man-Jain/corobo#1

Comments

@jayvdb
Copy link
Member

jayvdb commented Jul 18, 2018

$ 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. #582 (comment) which broke because of this, and probably other PRs also.

@starlord1311
Copy link

@jayvdb can i take up this issue?

Man-Jain added a commit to Man-Jain/corobo that referenced this issue Oct 14, 2018
This fixes the conditions of build failure when someone created a
pull request from the master branch. It now also checks if it is a
Pull request or not.

Fixes coala#583
Man-Jain added a commit to Man-Jain/corobo that referenced this issue Oct 14, 2018
This fixes the conditions of build failure when someone created a
pull request from the master branch. It now also checks if it is a
Pull request or not.

Fixes coala#583
Man-Jain added a commit to Man-Jain/corobo that referenced this issue Oct 14, 2018
This fixes the conditions of build failure when someone created a
pull request from the master branch. It now also checks if it is a
Pull request or not.

Fixes coala#583
Man-Jain added a commit to Man-Jain/corobo that referenced this issue Oct 14, 2018
This fixes the condition of build failure when someone creates a
pull request from the master branch. It now check that the project
is coala repo and then execute build steps

Fixes coala#583
Man-Jain added a commit to Man-Jain/corobo that referenced this issue Oct 14, 2018
This fixes the condition of build failure when someone creates a
pull request from the master branch. It now check that the project
is coala/corobo repo and then execute build steps

Fixes coala#583
Man-Jain added a commit to Man-Jain/corobo that referenced this issue Oct 17, 2018
This fixes the condition of build failure when someone creates a
pull request from the master branch. It now check that the project
is coala/corobo repo and then execute build steps

Fixes coala#583
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

3 participants