From cef685849b4e682641c6345262d50f7ade9d8621 Mon Sep 17 00:00:00 2001 From: Gagan Bhullar Date: Fri, 26 Jul 2024 10:55:51 -0600 Subject: [PATCH] fix: environments on implicit builds have branch source (#34095) Co-authored-by: Alex Nguyen <150945400+nguyenalex836@users.noreply.github.com> --- .../managing-environments-for-deployment.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/actions/administering-github-actions/managing-environments-for-deployment.md b/content/actions/administering-github-actions/managing-environments-for-deployment.md index 1260e1399e50..2773e58dc50f 100644 --- a/content/actions/administering-github-actions/managing-environments-for-deployment.md +++ b/content/actions/administering-github-actions/managing-environments-for-deployment.md @@ -232,7 +232,7 @@ Variables stored in an environment are only available to workflow jobs that refe You can also create and configure environments through the REST API. For more information, see "[AUTOTITLE](/rest/deployments/environments)," "[AUTOTITLE](/rest/actions/secrets)," "[AUTOTITLE](/rest/actions/variables)," and "[AUTOTITLE](/rest/deployments/branch-policies)." -Running a workflow that references an environment that does not exist will create an environment with the referenced name. The newly created environment will not have any protection rules or secrets configured. Anyone that can edit workflows in the repository can create environments via a workflow file, but only repository admins can configure the environment. +Running a workflow that references an environment that does not exist will create an environment with the referenced name. If the environment is created from running implicit page builds (for example, from a branch or folder source), the source branch will be added as a protection rule to the environment. Otherwise, the newly created environment will not have any protection rules or secrets configured. Anyone that can edit workflows in the repository can create environments via a workflow file, but only repository admins can configure the environment. ## Deleting an environment