File tree Expand file tree Collapse file tree 3 files changed +69
-0
lines changed
Expand file tree Collapse file tree 3 files changed +69
-0
lines changed Original file line number Diff line number Diff line change 1+ {
2+ "name" : " main" ,
3+ "target" : " branch" ,
4+ "enforcement" : " active" ,
5+ "conditions" : {
6+ "ref_name" : {
7+ "exclude" : [],
8+ "include" : [
9+ " ~DEFAULT_BRANCH"
10+ ]
11+ }
12+ },
13+ "rules" : [
14+ {
15+ "type" : " deletion"
16+ },
17+ {
18+ "type" : " required_linear_history"
19+ },
20+ {
21+ "type" : " pull_request" ,
22+ "parameters" : {
23+ "required_approving_review_count" : 0 ,
24+ "dismiss_stale_reviews_on_push" : true ,
25+ "require_code_owner_review" : false ,
26+ "require_last_push_approval" : false ,
27+ "required_review_thread_resolution" : false ,
28+ "allowed_merge_methods" : [
29+ " squash" ,
30+ " rebase"
31+ ]
32+ }
33+ },
34+ {
35+ "type" : " required_status_checks" ,
36+ "parameters" : {
37+ "strict_required_status_checks_policy" : true ,
38+ "do_not_enforce_on_create" : false ,
39+ "required_status_checks" : [
40+ {
41+ "context" : " checks" ,
42+ "integration_id" : 15368
43+ }
44+ ]
45+ }
46+ },
47+ {
48+ "type" : " non_fast_forward"
49+ }
50+ ],
51+ "bypass_actors" : [
52+ {
53+ "actor_id" : 5 ,
54+ "actor_type" : " RepositoryRole" ,
55+ "bypass_mode" : " always"
56+ }
57+ ]
58+ }
Original file line number Diff line number Diff line change @@ -287,6 +287,7 @@ format-source # format code source
287287install # run install tasks
288288install-hooks # install git hooks
289289install-project # install the project
290+ install-rulesets # install github rulesets
290291
291292[mlflow]
292293mlflow # run mlflow tasks
Original file line number Diff line number Diff line change @@ -12,3 +12,13 @@ install-hooks:
1212[group (' install' )]
1313install-project :
1414 uv sync --all-groups
15+
16+ # install github rulesets
17+ [group (' install' )]
18+ install-rulesets :
19+ #!/usr/bin/env bash
20+ set -euo pipefail
21+ repo=$(gh repo view --json=name --jq=.name)
22+ owner=$(gh repo view --json=owner --jq=.owner.login)
23+ gh api --method POST -H " Accept: application/vnd.github+json" \
24+ " /repos/$owner/$repo/rulesets" --input=" .github/rulesets/main.json"
You can’t perform that action at this time.
0 commit comments