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

Problems preventing Travis from building PRs #4145

Closed
edunham opened this issue Jun 26, 2015 · 0 comments
Closed

Problems preventing Travis from building PRs #4145

edunham opened this issue Jun 26, 2015 · 0 comments

Comments

@edunham
Copy link

edunham commented Jun 26, 2015

EDIT: I tried to do things through the config file which are only available for the web UI. Solution is to go to
https://travis-ci.org/owner/repor/settings
and click the pretty button beside "build pull requests".


The problem is probably with either the documentation or the branch restriction commands themselves.

Expected behavior:

  • I Google for "Travis skip building PR" or "Travis build only on push to master" and find a section of Travis docs telling me how to prevent builds from being triggered by pull requests.
  • Or documentation around branches.only explicitly states whether the branches.only setting is meant to dissable building on pull requests, and directs the user to how to do that.
  • Or documentation for before_deploy and related commands explicitly states whether or not those steps will be run when Travis builds a PR
  • Or the docs on deploying to S3 discuss the problem of building PRs.
  • Or the docs on testing pull requests say how to prevent building PRs.

Actual behavior:

What I find when trying to build only on commits to master (and never build PRs) is an inconclusive closed issue and the related Travis docs. The docs do not specify which commands will be run when Travis runs on PRs and which will only be run on commits to master.

An Example:

I followed the deploying to S3 docs to write this .travis.yml. Note that I tried to tell it to build only on master with

branches:
  only:
  - master

However, when I make a pull request to the repo, Travis runs on the PR (and obviously fails, since it can't decrypt the keys for very good security reasons).

The only reason I'm using Travis on this repository at all is to build and deploy the site when PRs are merged into the master branch. These are not actions that should ever be taken at the time a PR is first opened.

@edunham edunham closed this as completed Jun 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant