git 组织中所有存储库的Atlantis存储库配置

xyhw6mcr  于 2023-04-04  发布在  Git
关注(0)|答案(1)|浏览(114)

根据https://www.runatlantis.io/docs/server-side-repo-config.html#requiring-pr-is-mergeable-before-apply-or-import,Atlantis请求添加所有存储库或特定存储库。我是否可以将其设置为特定组织内的所有存储库?这里是一个示例配置。请提供建议。

repos:
  - id: /.*/ # Defaults
    apply_requirements: []
    workflow: default
    allowed_overrides: []
    allow_custom_workflows: false

  - id: github.com/MyOrg/MyRepo1 # Single Repo
    apply_requirements:
      - approved
      - mergeable
    workflow: default
    allowed_overrides:
      - workflow
    allow_custom_workflows: false

  - id: github.com/MyOrg/* # All repos under MyOrg
    apply_requirements:
      - approved
      - mergeable
    workflow: default
    allowed_overrides:
      - workflow
    allow_custom_workflows: false
gorkyyrv

gorkyyrv1#

它解决了。答案是使用正则表达式格式化的结构。我已经测试和工作。

- id: /github\.com/MyOrg/.*/ # All Repos under MyOrg Org
    apply_requirements:
      - approved
      - mergeable
    workflow: default
    allowed_overrides:
      - workflow

相关问题