From 8f5427162a70e697c4803fe8df434f835f63e538 Mon Sep 17 00:00:00 2001 From: hubwriter Date: Wed, 20 Apr 2022 11:55:33 +0100 Subject: [PATCH] Put repeated text into reusables --- .../restricting-access-to-machine-types.md | 17 ++--------------- .../restricting-the-idle-timeout-period.md | 17 ++--------------- ...ricting-the-visibility-of-forwarded-ports.md | 17 ++--------------- .../codespaces/codespaces-org-policies.md | 3 +++ .../codespaces/codespaces-policy-targets.md | 11 +++++++++++ 5 files changed, 20 insertions(+), 45 deletions(-) create mode 100644 data/reusables/codespaces/codespaces-org-policies.md create mode 100644 data/reusables/codespaces/codespaces-policy-targets.md diff --git a/content/codespaces/managing-codespaces-for-your-organization/restricting-access-to-machine-types.md b/content/codespaces/managing-codespaces-for-your-organization/restricting-access-to-machine-types.md index cdb050428a..3710bf95a8 100644 --- a/content/codespaces/managing-codespaces-for-your-organization/restricting-access-to-machine-types.md +++ b/content/codespaces/managing-codespaces-for-your-organization/restricting-access-to-machine-types.md @@ -47,9 +47,7 @@ If you add an organization-wide policy, you should set it to the largest choice {% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} -1. In the "Code, planning, and automation" section of the sidebar, select **{% octicon "codespaces" aria-label="The codespaces icon" %} {% data variables.product.prodname_codespaces %}** then click **Policy**. -1. On the "Codespace policies" page, click **Create Policy**. -1. Enter a name for your new policy. +{% data reusables.profile.codespaces-org-policies %} 1. Click **Add constraint** and choose **Machine types**. ![Add a constraint for machine types](/assets/images/help/codespaces/add-constraint-dropdown.png) @@ -58,18 +56,7 @@ If you add an organization-wide policy, you should set it to the largest choice ![Edit the machine type constraint](/assets/images/help/codespaces/edit-machine-constraint.png) -1. In the "Change policy target" area, click the dropdown button. -1. Choose either **All repositories** or **Selected repositories** to determine which repositories this policy will apply to. -1. If you chose **Selected repositories**: - 1. Click {% octicon "gear" aria-label="The settings icon" %}. - - ![Edit the settings for the policy](/assets/images/help/codespaces/policy-edit.png) - - 1. Select the repositories you want this policy to apply to. - 1. At the bottom of the repository list, click **Select repositories**. - - ![Select repositories for this policy](/assets/images/help/codespaces/policy-select-repos.png) - +{% data reusables.profile.codespaces-policy-targets %} 1. If you want to add another constraint to the policy, click **Add constraint** and choose another constraint. For information about other constraints, see "[Restricting the visibility of forwarded ports](/codespaces/managing-codespaces-for-your-organization/restricting-the-visibility-of-forwarded-ports)" and "[Restricting the idle timeout period](/codespaces/managing-codespaces-for-your-organization/restricting-the-idle-timeout-period)." 1. After you have finished adding constraints to your policy, click **Save**. ## Editing a policy diff --git a/content/codespaces/managing-codespaces-for-your-organization/restricting-the-idle-timeout-period.md b/content/codespaces/managing-codespaces-for-your-organization/restricting-the-idle-timeout-period.md index d4b53fe952..2750268da4 100644 --- a/content/codespaces/managing-codespaces-for-your-organization/restricting-the-idle-timeout-period.md +++ b/content/codespaces/managing-codespaces-for-your-organization/restricting-the-idle-timeout-period.md @@ -42,9 +42,7 @@ If you add an organization-wide policy with a timeout constraint, you should set {% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} -1. In the "Code, planning, and automation" section of the sidebar, select **{% octicon "codespaces" aria-label="The codespaces icon" %} {% data variables.product.prodname_codespaces %}** then click **Policies**. -1. On the "Codespace policies" page, click **Create Policy**. -1. Enter a name for your new policy. +{% data reusables.profile.codespaces-org-policies %} 1. Click **Add constraint** and choose **Maximum idle timeout**. ![Add a constraint for idle timeout](/assets/images/help/codespaces/add-constraint-dropdown-timeout.png) @@ -57,18 +55,7 @@ If you add an organization-wide policy with a timeout constraint, you should set ![Choose the port visibility options](/assets/images/help/codespaces/maximum-minutes-timeout.png) -1. In the "Change policy target" area, click the dropdown button. -1. Choose either **All repositories** or **Selected repositories** to determine which repositories this policy will apply to. -1. If you chose **Selected repositories**: - 1. Click {% octicon "gear" aria-label="The settings icon" %}. - - ![Edit the settings for the policy](/assets/images/help/codespaces/policy-edit.png) - - 2. Select the repositories you want this policy to apply to. - 3. At the bottom of the repository list, click **Select repositories**. - - ![Select repositories for this policy](/assets/images/help/codespaces/policy-select-repos.png) - +{% data reusables.profile.codespaces-policy-targets %} 1. If you want to add another constraint to the policy, click **Add constraint** and choose another constraint. For information about other constraints, see "[Restricting access to machine types](/codespaces/managing-codespaces-for-your-organization/restricting-access-to-machine-types)" and "[Restricting the visibility of forwarded ports](/codespaces/managing-codespaces-for-your-organization/restricting-the-visibility-of-forwarded-ports)." 1. After you have finished adding constraints to your policy, click **Save**. diff --git a/content/codespaces/managing-codespaces-for-your-organization/restricting-the-visibility-of-forwarded-ports.md b/content/codespaces/managing-codespaces-for-your-organization/restricting-the-visibility-of-forwarded-ports.md index 56445a65f3..59e485ce20 100644 --- a/content/codespaces/managing-codespaces-for-your-organization/restricting-the-visibility-of-forwarded-ports.md +++ b/content/codespaces/managing-codespaces-for-your-organization/restricting-the-visibility-of-forwarded-ports.md @@ -40,9 +40,7 @@ If you add an organization-wide policy, you should set it to the most lenient vi {% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} -1. In the "Code, planning, and automation" section of the sidebar, select **{% octicon "codespaces" aria-label="The codespaces icon" %} {% data variables.product.prodname_codespaces %}** then click **Policies**. -1. On the "Codespace policies" page, click **Create Policy**. -1. Enter a name for your new policy. +{% data reusables.profile.codespaces-org-policies %} 1. Click **Add constraint** and choose **Port visibility**. ![Add a constraint for port visibility](/assets/images/help/codespaces/add-constraint-dropdown-ports.png) @@ -55,18 +53,7 @@ If you add an organization-wide policy, you should set it to the most lenient vi ![Choose the port visibility options](/assets/images/help/codespaces/choose-port-visibility-options.png) -1. In the "Change policy target" area, click the dropdown button. -1. Choose either **All repositories** or **Selected repositories** to determine which repositories this policy will apply to. -1. If you chose **Selected repositories**: - 1. Click {% octicon "gear" aria-label="The settings icon" %}. - - ![Edit the settings for the policy](/assets/images/help/codespaces/policy-edit.png) - - 2. Select the repositories you want this policy to apply to. - 3. At the bottom of the repository list, click **Select repositories**. - - ![Select repositories for this policy](/assets/images/help/codespaces/policy-select-repos.png) - +{% data reusables.profile.codespaces-policy-targets %} 1. If you want to add another constraint to the policy, click **Add constraint** and choose another constraint. For information about other constraints, see "[Restricting access to machine types](/codespaces/managing-codespaces-for-your-organization/restricting-access-to-machine-types)" and "[Restricting the idle timeout period](/codespaces/managing-codespaces-for-your-organization/restricting-the-idle-timeout-period)." 1. After you have finished adding constraints to your policy, click **Save**. ## Editing a policy diff --git a/data/reusables/codespaces/codespaces-org-policies.md b/data/reusables/codespaces/codespaces-org-policies.md new file mode 100644 index 0000000000..776a08709f --- /dev/null +++ b/data/reusables/codespaces/codespaces-org-policies.md @@ -0,0 +1,3 @@ +1. In the "Code, planning, and automation" section of the sidebar, select **{% octicon "codespaces" aria-label="The codespaces icon" %} {% data variables.product.prodname_codespaces %}** then click **Policies**. +1. On the "Codespace policies" page, click **Create Policy**. +1. Enter a name for your new policy. \ No newline at end of file diff --git a/data/reusables/codespaces/codespaces-policy-targets.md b/data/reusables/codespaces/codespaces-policy-targets.md new file mode 100644 index 0000000000..df251db6c4 --- /dev/null +++ b/data/reusables/codespaces/codespaces-policy-targets.md @@ -0,0 +1,11 @@ +1. In the "Change policy target" area, click the dropdown button. +1. Choose either **All repositories** or **Selected repositories** to determine which repositories this policy will apply to. +1. If you chose **Selected repositories**: + 1. Click {% octicon "gear" aria-label="The settings icon" %}. + + ![Edit the settings for the policy](/assets/images/help/codespaces/policy-edit.png) + + 2. Select the repositories you want this policy to apply to. + 3. At the bottom of the repository list, click **Select repositories**. + + ![Select repositories for this policy](/assets/images/help/codespaces/policy-select-repos.png)