Skip to content
This repository has been archived by the owner on Dec 16, 2024. It is now read-only.

Switch from branch protection to rulesets #22

Merged
merged 1 commit into from
Jun 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 40 additions & 23 deletions .github/settings.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# These settings are synced to GitHub by https://github.com/github/safe-settings
# Example config:
# https://github.com/github/safe-settings/blob/main-enterprise/docs/sample-settings/settings.yml
---
repository:
allow_auto_merge: true
Expand All @@ -15,26 +17,41 @@ teams:
- name: mirsg
permission: admin

# Each top-level element under branch protection must be filled. If one doesn't
# want to use one of them you must set it to empty. Otherwise, none of the
# settings will be applied.
branches:
# `default` creates a branch protection rule to against the repo's base branch
- name: default
protection:
required_pull_request_reviews:
required_approving_review_count: 1
dismiss_stale_reviews: true
require_code_owner_reviews: false
require_last_push_approval: false
bypass_pull_request_allowances:
apps:
- renovate
users:
teams:
dismissal_restrictions:
users:
teams:
required_status_checks:
enforce_admins: true
restrictions:
# See available options:
# https://docs.github.com/en/rest/orgs/rules#create-an-organization-repository-rulesetfor
rulesets:
- name: Default
target: branch
enforcement: active

conditions:
ref_name:
include:
- ~DEFAULT_BRANCH

rules:
- type: deletion
- type: non_fast_forward # prevents force pushes

- name: Pull Requests
target: branch
enforcement: active

bypass_actors:
- actor_id: 2740 # Renovate Bot
actor_type: Integration
bypass_mode: always

conditions:
ref_name:
include:
- ~DEFAULT_BRANCH

rules:
- type: pull_request
parameters:
dismiss_stale_reviews_on_push: true
require_code_owner_review: false
require_last_push_approval: false
required_approving_review_count: 1
required_review_thread_resolution: false