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
Copy file name to clipboardexpand all lines: content/organizations/managing-organization-settings/creating-rulesets-for-repositories-in-your-organization.md
+6
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,12 @@ When you create a ruleset for an organization, you use `fnmatch` syntax to defin
17
17
18
18
Forks do not inherit rulesets from their upstream repositories. However, forks owned by your organization are subject to the rulesets you create, like any other repository.
19
19
20
+
{% ifversion repo-rules-management %}
21
+
22
+
{% data reusables.repositories.import-a-ruleset-conceptual %} For more information, see "[AUTOTITLE](/organizations/managing-organization-settings/managing-rulesets-for-repositories-in-your-organization#using-ruleset-history)."
23
+
24
+
{% endif %}
25
+
20
26
To create a ruleset, complete the following procedures:
21
27
22
28
-[Creating a branch or tag ruleset](#creating-a-branch-or-tag-ruleset)
Copy file name to clipboardexpand all lines: content/organizations/managing-organization-settings/managing-rulesets-for-repositories-in-your-organization.md
+25
Original file line number
Diff line number
Diff line change
@@ -35,6 +35,30 @@ You can use the REST and GraphQL APIs to manage rulesets. For more information,
35
35
{% data reusables.organizations.access-ruleset-settings %}
36
36
{% data reusables.repositories.delete-ruleset-steps %}
37
37
38
+
{% ifversion repo-rules-management %}
39
+
40
+
## Using ruleset history
41
+
42
+
{% data reusables.repositories.ruleset-beta-note %}
43
+
44
+
{% data reusables.repositories.ruleset-history-conceptual %}
45
+
46
+
{% data reusables.profile.access_org %}
47
+
{% data reusables.profile.org_settings %}
48
+
{% data reusables.organizations.access-ruleset-settings %}
49
+
{% data reusables.repositories.ruleset-history %}
50
+
51
+
### Importing a ruleset
52
+
53
+
You can import a ruleset from another repository or organization using the exported JSON file from the previous section. This can be useful if you want to apply the same ruleset to multiple repositories or organizations.
54
+
55
+
{% data reusables.profile.access_org %}
56
+
{% data reusables.profile.org_settings %}
57
+
{% data reusables.organizations.access-ruleset-settings %}
58
+
{% data reusables.repositories.import-a-ruleset %}
59
+
60
+
{% endif %}
61
+
38
62
## Viewing insights for rulesets
39
63
40
64
You can view insights for rulesets to see how rulesets are affecting the repositories in your organization. {% data reusables.repositories.about-ruleset-insights %}
@@ -44,5 +68,6 @@ You can view insights for rulesets to see how rulesets are affecting the reposit
44
68
1. In the left sidebar, in the "Code, planning, and automation" section, click **{% octicon "repo" aria-hidden="true" %} Repository**, then click **Repository rule insights**.
45
69
46
70

71
+
47
72
1. On the "Rule Insights" page, use the dropdown menus at the top of the page to filter the actions by ruleset, repository, actor, and time period.
48
73
{% data reusables.repositories.rulesets-view-rule-runs %}
Copy file name to clipboardexpand all lines: content/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/creating-rulesets-for-a-repository.md
+3
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,9 @@ shortTitle: Create a ruleset
14
14
15
15
You can create rulesets to control how users can interact with selected branches and tags in a repository. When you create a ruleset, you can allow certain users to bypass the rules in the ruleset. This can be users with certain permissions, specific teams, or {% data variables.product.prodname_github_apps %}. For more information on rulesets, see "[AUTOTITLE](/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/about-rulesets)."
16
16
17
+
{% ifversion repo-rules-management %}
18
+
{% data reusables.repositories.import-a-ruleset-conceptual %} For more information, see "[AUTOTITLE](/organizations/managing-organization-settings/managing-rulesets-for-repositories-in-your-organization#using-ruleset-history)."{% endif %}
19
+
17
20
{% ifversion repo-rules-enterprise %}
18
21
You can also create rulesets for all repositories in an organization. For more information, see "[AUTOTITLE](/organizations/managing-organization-settings/creating-rulesets-for-repositories-in-your-organization)."{% endif %}
Copy file name to clipboardexpand all lines: content/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/managing-rulesets-for-a-repository.md
+24
Original file line number
Diff line number
Diff line change
@@ -62,6 +62,30 @@ Anyone with read access to a repository can view the rulesets targeting the repo
62
62
{% data reusables.repositories.repo-rulesets-settings %}
63
63
{% data reusables.repositories.delete-ruleset-steps %}
64
64
65
+
{% ifversion repo-rules-management %}
66
+
67
+
## Using ruleset history
68
+
69
+
{% data reusables.repositories.ruleset-beta-note %}
70
+
71
+
{% data reusables.repositories.ruleset-history-conceptual %}
72
+
73
+
{% data reusables.repositories.navigate-to-repo %}
74
+
{% data reusables.repositories.sidebar-settings %}
75
+
{% data reusables.repositories.repo-rulesets-settings %}
76
+
{% data reusables.repositories.ruleset-history %}
77
+
78
+
### Importing a ruleset
79
+
80
+
{% data reusables.repositories.import-a-ruleset-conceptual %}
81
+
82
+
{% data reusables.repositories.navigate-to-repo %}
83
+
{% data reusables.repositories.sidebar-settings %}
84
+
{% data reusables.repositories.repo-rulesets-settings %}
85
+
{% data reusables.repositories.import-a-ruleset %}
You can import a ruleset from another repository or organization using a JSON file. This can be useful if you want to apply the same ruleset to multiple repositories or organizations.
1. Select the **New ruleset** dropdown, then click **Import a ruleset**.
2
+
3
+

4
+
5
+
1. Open the exported JSON file.
6
+
1. Review the imported ruleset and click **Create**.
You can view all the changes to a ruleset and revert back to a specific iteration. You can also download a JSON file containing the ruleset's configuration at a specific iteration. The bypass list of a ruleset is excluded from the exported JSON file.
1. To view the history of changes to the ruleset, select {% octicon "kebab-horizontal" aria-label="Open additional options" %} to the right of the ruleset's name, then click **{% octicon "history" aria-hidden="true" %} History**.
2
+
3
+

4
+
5
+
1. To the right of the specific iteration, select {% octicon "kebab-horizontal" aria-label="Open additional options" %}, then click **Compare changes**, **Restore**, or **Download**.
6
+
7
+

0 commit comments