Skip to content

Shortcut for `only: [branches] except: [master]`

Description

Specifying CI/CD jobs to run on non-master branches is so common, there should be a shortcut for it. In fact, when I first started using GitLab CI, I assumed only: branches did exactly that, but it actually includes master as well.

  only:
    - branches
  except:
    - master

Proposal

No good proposal. Best I can think of is:

  only:
    - non-master-branches

Or going further, allowing only to take a string and not just an array:

  only: non-master-branches

Links / references