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

Support for repos[*].branch field in server side repo config #1490

Open
enummela opened this issue Apr 8, 2021 · 2 comments
Open

Support for repos[*].branch field in server side repo config #1490

enummela opened this issue Apr 8, 2021 · 2 comments
Labels

Comments

@enummela
Copy link

enummela commented Apr 8, 2021

The example from server side repo config docs indicates that it's possible to use regex matching on pull requests by their base branch:

# branch is an regex matching pull requests by base branch
# (the branch the pull request is getting merged into).
# By default, all branches are matched
branch: /.*/

However, when I specify a branch field in the server side repo config like this:

data:
  repos.yaml: |
    ---
    repos:
    - id: /.*/
      apply_requirements: []
      branch: /^staging$/
      workflow: default
      allowed_overrides:
        - apply_requirements
      allow_custom_workflows: true

Atlantis throws this error:

Error: initializing server: parsing /etc/atlantis/repos.yaml file: yaml: unmarshal errors:
  line 5: field branch not found in type raw.Repo

Output of atlantis version:

atlantis 0.16.1

The server side config works when the branch field is not specified. Could someone please take a look and confirm if branch field is supported or else point out where I went wrong 😅 ? Thanks in advance!

@enummela
Copy link
Author

enummela commented Apr 8, 2021

Digging into this a bit more, it looks like the branch matcher functionality was merged in #1383 but hasn't made it into any of the releases yet. Fingers crossed this gets into the next release because for our use case it's quite critical.

@jasonrberk
Copy link

ditto @enummela we must be able to use something like branch: /^(master|main)$/

@dosubot dosubot bot added the Stale label Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants