Skip to content

chore: split branch protection policy for different spec types#451

Draft
qduanmu wants to merge 1 commit into
complytime:mainfrom
qduanmu:split-br-policy
Draft

chore: split branch protection policy for different spec types#451
qduanmu wants to merge 1 commit into
complytime:mainfrom
qduanmu:split-br-policy

Conversation

@qduanmu

@qduanmu qduanmu commented Mar 31, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR splits the branch protection rules.

Related Issues

  • Closes CPLYTM-1374

Review Hints

With splited policies, complytime.yaml needs an update. e.g.,:

policies:
  - url: http://localhost:8765/policies/ampel-branch-protection
    id: ampel-bp
  - url: http://localhost:8765/policies/ampel-approval-requirements
    id: ampel-approvals
targets:
  - id: agcontent-branch-protection
    policies:
      - ampel-bp
    variables:
      url: https://gitlab.cee.redhat.com/group/project
      specs: builtin:gitlab/branch-protection.yaml
      branches: main
      access_token:  ${GITLAB_TOKEN}
      platform: gitlab
  - id: agcontent-approvals
    policies:
      - ampel-approvals
    variables:
      url: https://gitlab.cee.redhat.com/group/project
      specs: gitlab/project-approvals.yaml
      branches: main
      access_token: ${GITLAB_TOKEN}
      platform: gitlab

@qduanmu qduanmu requested a review from a team as a code owner March 31, 2026 09:15
@qduanmu

qduanmu commented Mar 31, 2026

Copy link
Copy Markdown
Contributor Author

Per discussion, we prefer to avoid doing this split for less disruptive, there are similar scenarios in GitHub, and we need to find a common solution for this. For GitLab, there is an issue with BP-2.01 policy, which is using a different spec type, for now we prefer to mark it as a known issue.

@qduanmu qduanmu marked this pull request as draft March 31, 2026 10:04
@beatrizmcouto beatrizmcouto moved this to Backlog in ComplyTime planning Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

2 participants