You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(governance): complete ruleset routing and validation
Add organization rule-suite routing and current filters, harden schema
validation, and keep scope metadata usable for fixed-scope tokens and
library callers.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copy file name to clipboardExpand all lines: README.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -897,6 +897,7 @@ The following sets of tools are available:
897
897
-`actor_name`: The handle for the GitHub user account to filter rule suites on. Used by the 'list_rule_suites' method. (string, optional)
898
898
-`branch`: Branch name. Required for the 'get_rules_for_branch' method. (string, optional)
899
899
-`enterprise`: Enterprise slug. Required when level is 'enterprise'. (string, optional)
900
+
-`evaluate_status`: Filter rule suites by ruleset evaluation mode. Used by the 'list_rule_suites' method. (string, optional)
900
901
-`includes_parents`: Include rulesets configured at higher levels that also apply. Defaults to true. Used by the 'get' and 'list' methods at the repository level. (boolean, optional)
901
902
-`level`: The level at which the ruleset is configured:
902
903
- 'repository': A ruleset on a single repository (requires 'owner' and 'repo').
@@ -906,14 +907,15 @@ The following sets of tools are available:
906
907
- 'get': Get a specific ruleset by ID (requires 'ruleset_id'). Supported at every level.
907
908
- 'list': List all rulesets. Supported at every level.
908
909
- 'get_rules_for_branch': Get all rules that apply to a branch (requires 'branch'). Repository level only.
909
-
- 'list_rule_suites': List rule suites, the evaluations of rules against pushes. Repository level only.
910
-
- 'get_rule_suite': Get a specific rule suite by ID (requires 'rule_suite_id'). Repository level only. (string, required)
910
+
- 'list_rule_suites': List rule suites, the evaluations of rules against pushes. Repository and organization levels only.
911
+
- 'get_rule_suite': Get a specific rule suite by ID (requires 'rule_suite_id'). Repository and organization levels only. (string, required)
911
912
-`org`: Organization name. Required when level is 'organization'. (string, optional)
912
913
-`owner`: Repository owner. Required when level is 'repository'. (string, optional)
913
914
-`page`: Page number for pagination (min 1) (number, optional)
914
915
-`perPage`: Results per page for pagination (min 1, max 100) (number, optional)
915
916
-`ref`: The name of the ref (branch, tag, etc.) to filter rule suites by. Used by the 'list_rule_suites' method. (string, optional)
916
917
-`repo`: Repository name. Required when level is 'repository'. (string, optional)
918
+
-`repository_name`: Repository name to filter rule suites by. Used by the 'list_rule_suites' method at the organization level. (string, optional)
917
919
-`rule_suite_id`: Rule suite ID. Required for the 'get_rule_suite' method. (number, optional)
918
920
-`rule_suite_result`: The rule suite result to filter by. Used by the 'list_rule_suites' method. (string, optional)
919
921
-`ruleset_id`: Ruleset ID. Required for the 'get' method. (number, optional)
Copy file name to clipboardExpand all lines: pkg/github/__toolsnaps__/create_repository_ruleset.snap
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,7 @@
10
10
"bypass_actors": {
11
11
"description": "The actors that can bypass the rules in this ruleset",
12
12
"items": {
13
+
"additionalProperties": false,
13
14
"properties": {
14
15
"actor_id": {
15
16
"description": "The ID of the actor that can bypass a ruleset",
@@ -39,6 +40,9 @@
39
40
"type": "string"
40
41
}
41
42
},
43
+
"required": [
44
+
"actor_type"
45
+
],
42
46
"type": "object"
43
47
},
44
48
"type": "array"
@@ -88,6 +92,7 @@
88
92
"rules": {
89
93
"description": "An array of rules within the ruleset. Each rule is an object with a 'type' (e.g. 'creation', 'deletion', 'non_fast_forward', 'required_signatures', 'pull_request', 'required_status_checks') and, for rules that need configuration, a 'parameters' object",
90
94
"items": {
95
+
"additionalProperties": false,
91
96
"properties": {
92
97
"parameters": {
93
98
"description": "Parameters for rule types that require additional configuration",
Copy file name to clipboardExpand all lines: pkg/github/__toolsnaps__/repository_ruleset_read.snap
+15-2Lines changed: 15 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
"readOnlyHint": true,
5
5
"title": "Read repository rulesets"
6
6
},
7
-
"description": "Read rulesets and rule suites at the repository, organization, or enterprise level. Select the level with the 'level' parameter and the operation with the 'method' parameter.",
7
+
"description": "Read rulesets at the repository, organization, or enterprise level, and rule suites at the repositoryor organization level. Select the level with the 'level' parameter and the operation with the 'method' parameter.",
8
8
"inputSchema": {
9
9
"properties": {
10
10
"actor_name": {
@@ -19,6 +19,15 @@
19
19
"description": "Enterprise slug. Required when level is 'enterprise'.",
20
20
"type": "string"
21
21
},
22
+
"evaluate_status": {
23
+
"description": "Filter rule suites by ruleset evaluation mode. Used by the 'list_rule_suites' method.",
24
+
"enum": [
25
+
"all",
26
+
"active",
27
+
"evaluate"
28
+
],
29
+
"type": "string"
30
+
},
22
31
"includes_parents": {
23
32
"description": "Include rulesets configured at higher levels that also apply. Defaults to true. Used by the 'get' and 'list' methods at the repository level.",
24
33
"type": "boolean"
@@ -33,7 +42,7 @@
33
42
"type": "string"
34
43
},
35
44
"method": {
36
-
"description": "Operation to perform:\n- 'get': Get a specific ruleset by ID (requires 'ruleset_id'). Supported at every level.\n- 'list': List all rulesets. Supported at every level.\n- 'get_rules_for_branch': Get all rules that apply to a branch (requires 'branch'). Repository level only.\n- 'list_rule_suites': List rule suites, the evaluations of rules against pushes. Repository level only.\n- 'get_rule_suite': Get a specific rule suite by ID (requires 'rule_suite_id'). Repository level only.",
45
+
"description": "Operation to perform:\n- 'get': Get a specific ruleset by ID (requires 'ruleset_id'). Supported at every level.\n- 'list': List all rulesets. Supported at every level.\n- 'get_rules_for_branch': Get all rules that apply to a branch (requires 'branch'). Repository level only.\n- 'list_rule_suites': List rule suites, the evaluations of rules against pushes. Repository and organization levels only.\n- 'get_rule_suite': Get a specific rule suite by ID (requires 'rule_suite_id'). Repository and organization levels only.",
37
46
"enum": [
38
47
"get",
39
48
"list",
@@ -70,6 +79,10 @@
70
79
"description": "Repository name. Required when level is 'repository'.",
71
80
"type": "string"
72
81
},
82
+
"repository_name": {
83
+
"description": "Repository name to filter rule suites by. Used by the 'list_rule_suites' method at the organization level.",
84
+
"type": "string"
85
+
},
73
86
"rule_suite_id": {
74
87
"description": "Rule suite ID. Required for the 'get_rule_suite' method.",
0 commit comments