diff --git a/content/admin/enforcing-policies/enforcing-policies-for-your-enterprise/managing-policies-for-code-governance.md b/content/admin/enforcing-policies/enforcing-policies-for-your-enterprise/managing-policies-for-code-governance.md index 43e40e2d33..9e93583985 100644 --- a/content/admin/enforcing-policies/enforcing-policies-for-your-enterprise/managing-policies-for-code-governance.md +++ b/content/admin/enforcing-policies/enforcing-policies-for-your-enterprise/managing-policies-for-code-governance.md @@ -44,6 +44,8 @@ You can edit a ruleset to change parts of the ruleset, such as the name, bypass 1. In the left sidebar, in the "Policies" section, click **Code**, then click **Rulesets**. 1. To the right of the ruleset's name, select {% octicon "kebab-horizontal" aria-label="Open additional options" %}, then click **{% octicon "trash" aria-hidden="true" aria-label="trash" %} Delete ruleset**. +{% ifversion repo-rules-history %} + ## Using ruleset history {% data reusables.repositories.ruleset-beta-note %} @@ -55,6 +57,10 @@ You can edit a ruleset to change parts of the ruleset, such as the name, bypass 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" aria-label="history" %} History**. 1. To the right of the specific iteration, select {% octicon "kebab-horizontal" aria-label="Open additional options" %}, then click **Compare changes**, **Restore**, or **Download**. +{% endif %} + +{% ifversion repo-rules-management %} + ## Importing a ruleset You can import a ruleset from another repository, organization or enterprise using the exported JSON file from the previous section. This can be useful if you want to apply the same ruleset to multiple repositories, organizations or enterprises. @@ -65,6 +71,8 @@ You can import a ruleset from another repository, organization or enterprise usi 1. Open the exported JSON file. 1. Review the imported ruleset and click **Create**. +{% endif %} + ## Viewing insights for rulesets You can view insights for rulesets to see how rulesets are affecting the repositories in your enterprise. {% data reusables.repositories.about-ruleset-insights %} diff --git a/content/organizations/managing-organization-settings/creating-rulesets-for-repositories-in-your-organization.md b/content/organizations/managing-organization-settings/creating-rulesets-for-repositories-in-your-organization.md index 61171970ec..7e602ba344 100644 --- a/content/organizations/managing-organization-settings/creating-rulesets-for-repositories-in-your-organization.md +++ b/content/organizations/managing-organization-settings/creating-rulesets-for-repositories-in-your-organization.md @@ -34,7 +34,7 @@ Forks _do_ inherit push rulesets from their root repository. {% data reusables.r To import one of the prebuilt rulesets by {% data variables.product.prodname_dotcom %}, see [`github/ruleset-recipes`](https://github.com/github/ruleset-recipes). {% ifversion repo-rules-management %} -{% 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 %} +{% data reusables.repositories.import-a-ruleset-conceptual %} For more information, see [AUTOTITLE](/organizations/managing-organization-settings/managing-rulesets-for-repositories-in-your-organization#importing-a-ruleset).{% endif %} ## Using `fnmatch` syntax diff --git a/content/organizations/managing-organization-settings/managing-rulesets-for-repositories-in-your-organization.md b/content/organizations/managing-organization-settings/managing-rulesets-for-repositories-in-your-organization.md index b7a6ba12e4..a8557de14a 100644 --- a/content/organizations/managing-organization-settings/managing-rulesets-for-repositories-in-your-organization.md +++ b/content/organizations/managing-organization-settings/managing-rulesets-for-repositories-in-your-organization.md @@ -43,7 +43,7 @@ You can use the REST and GraphQL APIs to manage rulesets. For more information, {% data reusables.organizations.access-ruleset-settings %} {% data reusables.repositories.delete-ruleset-steps %} -{% ifversion repo-rules-management %} +{% ifversion repo-rules-history %} ## Using ruleset history @@ -56,7 +56,11 @@ You can use the REST and GraphQL APIs to manage rulesets. For more information, {% data reusables.organizations.access-ruleset-settings %} {% data reusables.repositories.ruleset-history %} -### Importing a ruleset +{% endif %} + +{% ifversion repo-rules-management %} + +## Importing a ruleset 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. diff --git a/content/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/creating-rulesets-for-a-repository.md b/content/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/creating-rulesets-for-a-repository.md index 963ebbc2b3..0b71407936 100644 --- a/content/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/creating-rulesets-for-a-repository.md +++ b/content/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/creating-rulesets-for-a-repository.md @@ -34,7 +34,7 @@ For customers on {% data variables.product.prodname_team %} and {% data variable To import one of the prebuilt rulesets by {% data variables.product.prodname_dotcom %}, see [`github/ruleset-recipes`](https://github.com/github/ruleset-recipes). -{% 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 %} +{% data reusables.repositories.import-a-ruleset-conceptual %} For more information, see [AUTOTITLE](/organizations/managing-organization-settings/managing-rulesets-for-repositories-in-your-organization#importing-a-ruleset).{% endif %} ## Using `fnmatch` syntax diff --git a/content/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/managing-rulesets-for-a-repository.md b/content/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/managing-rulesets-for-a-repository.md index e84706b0b1..57f87eed0d 100644 --- a/content/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/managing-rulesets-for-a-repository.md +++ b/content/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/managing-rulesets-for-a-repository.md @@ -73,20 +73,7 @@ You can also view active ruselets: {% data reusables.repositories.repo-rulesets-settings %} {% data reusables.repositories.delete-ruleset-steps %} -{% ifversion repo-rules-management %} - -## Importing a ruleset - -{% data reusables.repositories.import-a-ruleset-conceptual %} - -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.sidebar-settings %} -{% data reusables.repositories.repo-rulesets-settings %} -{% data reusables.repositories.import-a-ruleset %} - -{% endif %} - -{% ifversion repo-rules-enterprise %} +{% ifversion repo-rules-history %} ## Using ruleset history @@ -99,6 +86,19 @@ You can also view active ruselets: {% data reusables.repositories.repo-rulesets-settings %} {% data reusables.repositories.ruleset-history %} +{% endif %} + +{% ifversion repo-rules-management %} + +## Importing a ruleset + +{% data reusables.repositories.import-a-ruleset-conceptual %} + +{% data reusables.repositories.navigate-to-repo %} +{% data reusables.repositories.sidebar-settings %} +{% data reusables.repositories.repo-rulesets-settings %} +{% data reusables.repositories.import-a-ruleset %} + ## Viewing insights for rulesets You can view insights for rulesets to see how rulesets are affecting a repository. {% data reusables.repositories.about-ruleset-insights %} diff --git a/data/features/repo-rules-history.yml b/data/features/repo-rules-history.yml new file mode 100644 index 0000000000..498d24c9a6 --- /dev/null +++ b/data/features/repo-rules-history.yml @@ -0,0 +1,5 @@ +# Reference: #20126 +# Ruleset history +versions: + ghec: '*' + ghes: '>=3.19' diff --git a/data/features/repo-rules-management.yml b/data/features/repo-rules-management.yml index 9832e94285..e5a42556b9 100644 --- a/data/features/repo-rules-management.yml +++ b/data/features/repo-rules-management.yml @@ -1,5 +1,5 @@ # Reference: #11915 and #16558 -# Ruleset management public preview and GA +# Ruleset management (import/export) public preview and GA versions: fpt: '*' ghec: '*' diff --git a/data/release-notes/enterprise-server/3-17/0-rc1.yml b/data/release-notes/enterprise-server/3-17/0-rc1.yml index be14c3a7e3..973f024ce6 100644 --- a/data/release-notes/enterprise-server/3-17/0-rc1.yml +++ b/data/release-notes/enterprise-server/3-17/0-rc1.yml @@ -118,9 +118,6 @@ sections: # https://github.com/github/releases/issues/4042 - | Push rulesets are generally available. Users can block pushes to private and internal repositories, and their forks, based on file type, path, or size. Unlike pre-receive hooks, push rules are built-in, configurable via the UI or API, and support audit logs, evaluate mode, and bypass lists. See [AUTOTITLE](/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/about-rulesets#push-rulesets). - # https://github.com/github/releases/issues/5128 - - | - Enterprise administrators can manage rules more efficiently with the general availability of ruleset history, import, and export. Ruleset history allows tracking and rolling back changes, while import and export simplify sharing and reusing rulesets, including GitHub's ruleset-recipes. See [`github/ruleset-recipes`](https://github.com/github/ruleset-recipes). # https://github.com/github/releases/issues/5129 - | Repository administrators can easily convert a fork into a standalone repository by leaving the fork network, which stops automatic syncing with the upstream repository. This is useful for taking a project in a new direction or maintaining separate versions. diff --git a/data/release-notes/enterprise-server/3-17/0.yml b/data/release-notes/enterprise-server/3-17/0.yml index 9303fde381..0ba97fee3b 100644 --- a/data/release-notes/enterprise-server/3-17/0.yml +++ b/data/release-notes/enterprise-server/3-17/0.yml @@ -122,9 +122,6 @@ sections: # https://github.com/github/releases/issues/4042 - | Push rulesets are generally available. Users can block pushes to private and internal repositories, and their forks, based on file type, path, or size. Unlike pre-receive hooks, push rules are built-in, configurable via the UI or API, and support audit logs, evaluate mode, and bypass lists. See [AUTOTITLE](/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/about-rulesets#push-rulesets). - # https://github.com/github/releases/issues/5128 - - | - Enterprise administrators can manage rules more efficiently with the general availability of ruleset history, import, and export. Ruleset history allows tracking and rolling back changes, while import and export simplify sharing and reusing rulesets, including GitHub's ruleset-recipes. See [`github/ruleset-recipes`](https://github.com/github/ruleset-recipes). # https://github.com/github/releases/issues/5129 - | Repository administrators can easily convert a fork into a standalone repository by leaving the fork network, which stops automatic syncing with the upstream repository. This is useful for taking a project in a new direction or maintaining separate versions.