Skip to content

Commit

Permalink
docs(rulesets): first iteration of shape of ruleset definition
Browse files Browse the repository at this point in the history
for #732
  • Loading branch information
travi committed Aug 30, 2024
1 parent d5139a8 commit 0cb69dc
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions docs/plugins/rulesets.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Repository Rulesets

See https://docs.github.com/en/rest/repos/rules#update-a-repository-ruleset for
all available ruleset properties and a description of each.

```yaml
rulesets:
- name: prevent destruction of the default branch
target: branch
enforcement: active
conditions:
ref_name:
include:
- "~DEFAULT_BRANCH"
rules:
- type: deletion
- type: non_fast_forward

- name: verification must pass
target: branch
enforcement: active
conditions:
ref_name:
include:
- "~DEFAULT_BRANCH"
rules:
- type: required_status_checks
parameters:
required_status_checks:
- context: test
integration_id: 123456
bypass_actors:
- actor_id: 5
actor_type: RepositoryRole
bypass_mode: pull_request

- name: changes must be reviewed
target: branch
enforcement: active
conditions:
ref_name:
include:
- "~DEFAULT_BRANCH"
rules:
- type: pull_request
parameters:
required_approving_review_count: 1
require_code_owner_review: true
bypass_actors:
- actor_id: 654321
actor_type: Integration
bypass_mode: always
```

0 comments on commit 0cb69dc

Please sign in to comment.