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

Add option to specify except branches in .travis.yml #97

Merged
merged 2 commits into from
Jul 17, 2018
Merged

Add option to specify except branches in .travis.yml #97

merged 2 commits into from
Jul 17, 2018

Conversation

jarretlavallee
Copy link

Currently, there are two branches are hardcoded to be included in the .travis.yml. This PR moves those branches into theconfig_defaults.yml and adds an option to remove those default
branches. It also includes an option to specify travis's except branch option.

With this, you can now have a more complex configuration for specifying which branches should be included in the .travis.yml. Below are a few examples.

Only use an except:

.travis.yml:
  remove_branches:
    - master
    - /^v\d/
  branches_except:
    - /^mergeup.*$/

Results in

branches:
  except:
    - /^mergeup.*$/

Remove one of the default branches and add another branch.

.travis.yml
   remove_branches:
      - /^v\d/
   branches:
      - development

Results in

branches:
  only:
    - master
    - development

@jarretlavallee jarretlavallee changed the title Add option to specify branches in .travis.yml Add option to specify except branches in .travis.yml May 18, 2018
DavidS
DavidS previously approved these changes Jun 4, 2018
Copy link
Contributor

@DavidS DavidS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

Prior to this commit two branches were hard coded to be included in the
`.travis.yml`. This commit moves those branches into the
`config_defaults.yml` and adds an option to remove those default
branches. It also includes an option to specify the `except` branch
option.
@jarretlavallee
Copy link
Author

Sorry, I rebased this branch to update it and dismissed the review. The PR has remained unchanged other than updating the branch.

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

Successfully merging this pull request may close these issues.

3 participants