Repository navigation
Expand file tree
/
Copy pathgithub_v1alpha1_githubrepositoryruleset.yaml
More file actions
79 lines (79 loc) · 2 KB
/
Copy pathgithub_v1alpha1_githubrepositoryruleset.yaml
File metadata and controls
79 lines (79 loc) · 2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
apiVersion: github.k8sready.com/v1alpha1
kind: GitHubRepositoryRuleset
metadata:
name: example-protect-default-branch
namespace: github-platform-operator-system
spec:
repositoryRef:
name: example
name: protect-default-branch
target: branch
enforcement: active
bypassActors:
- actorType: Team
teamSlug: platform
bypassMode: pull_request
- actorType: User
username: release-bot
bypassMode: always
conditions:
refName:
include:
- "~DEFAULT_BRANCH"
exclude: []
rules:
- type: deletion
- type: non_fast_forward
- type: required_linear_history
- type: required_signatures
- type: pull_request
parameters:
allowed_merge_methods:
- squash
- rebase
dismiss_stale_reviews_on_push: true
dismissal_restriction:
enabled: false
allowed_actors: []
require_code_owner_review: true
require_last_push_approval: true
required_approving_review_count: 1
required_review_thread_resolution: true
required_reviewers: []
- type: required_status_checks
parameters:
do_not_enforce_on_create: false
strict_required_status_checks_policy: true
required_status_checks:
- context: test
- context: lint
deletionPolicy: Orphan
---
apiVersion: github.k8sready.com/v1alpha1
kind: GitHubRepositoryRuleset
metadata:
name: example-push-restrictions
namespace: github-platform-operator-system
spec:
repositoryRef:
name: example
name: push-restrictions
target: push
enforcement: active
rules:
- type: file_path_restriction
parameters:
restricted_file_paths:
- secrets/**
- type: max_file_path_length
parameters:
max_file_path_length: 255
- type: file_extension_restriction
parameters:
restricted_file_extensions:
- exe
- dll
- type: max_file_size
parameters:
max_file_size: 100
deletionPolicy: Orphan