How do I specify .gitlab-ci.yml "only/except" rules with a regex AND a repo-specific qualifier?

In the only section of my .gitlab-ci.yml I can match a branch name by regex like:

  only:
    - /^issue-.*/

and match a branch name for a specific branch and repo like:

  only:
    - issue-123@mygroup/myproject

But how do I do both? I tried this:

  only: 
    - /^issue-.*@mygroup\/myproject/

but with no success.

I’m using GitLab Community Edition 8.17.4.

1 Like

If this is not working, I would recommend reporting a ticket. Also saw your SO post just didn’t have an answer :slight_smile:

Thanks. Reported: https://gitlab.com/gitlab-org/gitlab-ce/issues/30477

1 Like