Override regex in .travis.yml

My team members already add “WIP” (work in progress) to the commit message.

we did a temp push (like before they go home so that can work on another machine at night e.g. staging I guess you could all it ). But Travis will build, and in many cases fail, unless they also add “[ci skip]”. It would be nice if I could specify a RegEx to travis.yml to look for “WIP” instead (something like \bWIP\b ). if this makes sense?

I don’t know if this is going to be feasible. In order to fetch what kind of regular expression you give in .travis.yml, we have to fetch .travis.yml, but it happens only after we have received a push event from GitHub in other words, until we receive the payload of which contains the commit message, and configured a build to run already.

For example, here’s a segment of a .travis.yml I currently have setup for a project I’m working on:

- name: Trigger nightly checks for Terraform updates
    if: branch = master AND type = cron AND env(RUN_NIGHTLY) = yes
    
  - name: Recreate the scheduler 
    if: "((branch IN (master, develop) && type = push) OR branch =~ /.*env.*/ OR commit_message
    =~ /\\[recreate env\\]/) AND commit_message !~ /\\[delete env\\]/ AND type !=
    cron AND commit_message !~ /\\[execute .*. test\\]/ AND commit_message !~ /\\[start
    recreate scheduler\\]/"
    
  - name: Terraform destroy stale clusters
    if: "(type = cron AND branch = develop) OR commit_message =~ /\\[start recreate
    scheduler\\]/ OR commit_message =~ /\\[destroy stale clusters\\]/"
    
  - name: Restart the Montana Mendy branch and execute Terraform tests again if the commit depth goes beyond 5
    if: "((branch IN (master, develop) && type = push) OR branch =~ /.*env.*/ OR commit_message
    =~ /\\[recreate env\\]/) AND commit_message !~ /\\[delete env\\]/ AND type !=
    cron AND commit_message !~ /\\[execute .*. test\\]/ AND commit_message !~ /\\[start
    recreate scheduler\\]/"
    
  - name: Destroy orphaned clusters within Docker to save payload on Terraform and money on Montana's GCP account 
    if: "(type = cron AND branch = develop) OR commit_message =~ /\\[start recreate
    scheduler\\]/ OR commit_message =~ /\\[destroy orphaned clusters\\]/"

It would be nice if we could switch the payload order, but as of now it’s just not feasible. I hope this answers your question.