1GH-RULESET-CHECK(1) GitHub CLI manual GH-RULESET-CHECK(1)
2
3
4
6 gh-ruleset-check - View rules that would apply to a given branch
7
8
9
11 gh ruleset check [<branch>] [flags]
12
13
14
16 View information about GitHub rules that apply to a given branch.
17
18
19 The provided branch name does not need to exist; rules will be dis‐
20 played that would apply to a branch with that name. All rules are re‐
21 turned regardless of where they are configured.
22
23
24 If no branch name is provided, then the current branch will be used.
25
26
27 The --default flag can be used to view rules that apply to the default
28 branch of the repository.
29
30
31
33 --default
34 Check rules on default branch
35
36
37 -w, --web
38 Open the branch rules page in a web browser
39
40
41
43 -R, --repo <[HOST/]OWNER/REPO>
44 Select another repository using the [HOST/]OWNER/REPO format
45
46
47
49 # View all rules that apply to the current branch
50 $ gh ruleset check
51
52 # View all rules that apply to a branch named "my-branch" in a different repository
53 $ gh ruleset check my-branch --repo owner/repo
54
55 # View all rules that apply to the default branch in a different repository
56 $ gh ruleset check --default --repo owner/repo
57
58 # View a ruleset configured in a different repository or any of its parents
59 $ gh ruleset view 23 --repo owner/repo
60
61 # View an organization-level ruleset
62 $ gh ruleset view 23 --org my-org
63
64
65
66
67
69 gh-ruleset(1)
70
71
72
73 Oct 2023 GH-RULESET-CHECK(1)