From 3a1437033b673a204ccf457929b3c8586d428e89 Mon Sep 17 00:00:00 2001 From: Peter Reid Date: Wed, 13 Apr 2022 13:42:49 +0000 Subject: [PATCH 1/4] Detail limitations of CODEOWNERS with respect to Enterprise Managed Users Resolves #16910 --- .../customizing-your-repository/about-code-owners.md | 2 ++ data/reusables/enterprise-accounts/emu-codeowners-note.md | 7 +++++++ 2 files changed, 9 insertions(+) create mode 100644 data/reusables/enterprise-accounts/emu-codeowners-note.md diff --git a/content/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners.md b/content/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners.md index a4bef4079e..bb17887f76 100644 --- a/content/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners.md +++ b/content/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners.md @@ -49,6 +49,8 @@ To reduce the size of your CODEOWNERS file, consider using wildcard patterns to A CODEOWNERS file uses a pattern that follows most of the same rules used in [gitignore](https://git-scm.com/docs/gitignore#_pattern_format) files, with [some exceptions](#syntax-exceptions). The pattern is followed by one or more {% data variables.product.prodname_dotcom %} usernames or team names using the standard `@username` or `@org/team-name` format. Users must have `read` access to the repository and teams must have explicit `write` access, even if the team's members already have access. You can also refer to a user by an email address that has been added to their account on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %}, for example `user@example.com`. +{% data reusables.enterprise-accounts.emu-codeowners-note %} + CODEOWNERS paths are case sensitive, because {% data variables.product.prodname_dotcom %} uses a case sensitive file system. Since CODEOWNERS are evaluated by {% data variables.product.prodname_dotcom %}, even systems that are case insensitive (for example, macOS) must use paths and files that are cased correctly in the CODEOWNERS file. {% if codeowners-errors %} diff --git a/data/reusables/enterprise-accounts/emu-codeowners-note.md b/data/reusables/enterprise-accounts/emu-codeowners-note.md new file mode 100644 index 0000000000..b973b1f1c5 --- /dev/null +++ b/data/reusables/enterprise-accounts/emu-codeowners-note.md @@ -0,0 +1,7 @@ +{% ifversion ghec%} +{% note %} + +**Note**: If your enterprise uses {% data variables.product.prodname_emus %}, you cannot use email addresses in the CODEOWNERS file. + +{% endnote %} +{% endif %} From 19b21977bba9bd7dc2d0829c7e91df57f77fc024 Mon Sep 17 00:00:00 2001 From: Peter Reid Date: Thu, 14 Apr 2022 16:48:05 +0000 Subject: [PATCH 2/4] Add conditional text for emails in codeowners files & remove reusable component Resolves #16910 Addresses PR feedback from @lecoursen 2022-04-14 --- .../customizing-your-repository/about-code-owners.md | 4 ++-- data/reusables/enterprise-accounts/emu-codeowners-note.md | 7 ------- 2 files changed, 2 insertions(+), 9 deletions(-) delete mode 100644 data/reusables/enterprise-accounts/emu-codeowners-note.md diff --git a/content/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners.md b/content/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners.md index bb17887f76..fdf7b22b7a 100644 --- a/content/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners.md +++ b/content/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners.md @@ -47,9 +47,9 @@ To reduce the size of your CODEOWNERS file, consider using wildcard patterns to ## CODEOWNERS syntax -A CODEOWNERS file uses a pattern that follows most of the same rules used in [gitignore](https://git-scm.com/docs/gitignore#_pattern_format) files, with [some exceptions](#syntax-exceptions). The pattern is followed by one or more {% data variables.product.prodname_dotcom %} usernames or team names using the standard `@username` or `@org/team-name` format. Users must have `read` access to the repository and teams must have explicit `write` access, even if the team's members already have access. You can also refer to a user by an email address that has been added to their account on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %}, for example `user@example.com`. +A CODEOWNERS file uses a pattern that follows most of the same rules used in [gitignore](https://git-scm.com/docs/gitignore#_pattern_format) files, with [some exceptions](#syntax-exceptions). The pattern is followed by one or more {% data variables.product.prodname_dotcom %} usernames or team names using the standard `@username` or `@org/team-name` format. Users must have `read` access to the repository and teams must have explicit `write` access, even if the team's members already have access. -{% data reusables.enterprise-accounts.emu-codeowners-note %} +{% ifversion fpt or ghec%}In most cases, you{% else %}You{% endif %} can also refer to a user by an email address that has been added to their account on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %}, for example `user@example.com`.{% ifversion fpt or ghec %} You cannot use an email address to refer to a {% data variables.product.prodname_managed_user %}. For more information about managed users, see "[About {% data variables.product.prodname_emus %}](/enterprise-cloud@latest/admin/identity-and-access-management/managing-iam-with-enterprise-managed-users/about-enterprise-managed-users){% ifversion fpt %}" in the {% data variables.product.prodname_ghe_cloud %} documentation.{% else %}."{% endif %} CODEOWNERS paths are case sensitive, because {% data variables.product.prodname_dotcom %} uses a case sensitive file system. Since CODEOWNERS are evaluated by {% data variables.product.prodname_dotcom %}, even systems that are case insensitive (for example, macOS) must use paths and files that are cased correctly in the CODEOWNERS file. diff --git a/data/reusables/enterprise-accounts/emu-codeowners-note.md b/data/reusables/enterprise-accounts/emu-codeowners-note.md deleted file mode 100644 index b973b1f1c5..0000000000 --- a/data/reusables/enterprise-accounts/emu-codeowners-note.md +++ /dev/null @@ -1,7 +0,0 @@ -{% ifversion ghec%} -{% note %} - -**Note**: If your enterprise uses {% data variables.product.prodname_emus %}, you cannot use email addresses in the CODEOWNERS file. - -{% endnote %} -{% endif %} From f4fe5ad8413553c0fc7150842acbd842ac7da6b1 Mon Sep 17 00:00:00 2001 From: Peter Reid Date: Thu, 14 Apr 2022 17:01:12 +0000 Subject: [PATCH 3/4] Terminate if in codeowners docs --- .../customizing-your-repository/about-code-owners.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners.md b/content/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners.md index fdf7b22b7a..b60d085c4e 100644 --- a/content/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners.md +++ b/content/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners.md @@ -49,7 +49,7 @@ To reduce the size of your CODEOWNERS file, consider using wildcard patterns to A CODEOWNERS file uses a pattern that follows most of the same rules used in [gitignore](https://git-scm.com/docs/gitignore#_pattern_format) files, with [some exceptions](#syntax-exceptions). The pattern is followed by one or more {% data variables.product.prodname_dotcom %} usernames or team names using the standard `@username` or `@org/team-name` format. Users must have `read` access to the repository and teams must have explicit `write` access, even if the team's members already have access. -{% ifversion fpt or ghec%}In most cases, you{% else %}You{% endif %} can also refer to a user by an email address that has been added to their account on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %}, for example `user@example.com`.{% ifversion fpt or ghec %} You cannot use an email address to refer to a {% data variables.product.prodname_managed_user %}. For more information about managed users, see "[About {% data variables.product.prodname_emus %}](/enterprise-cloud@latest/admin/identity-and-access-management/managing-iam-with-enterprise-managed-users/about-enterprise-managed-users){% ifversion fpt %}" in the {% data variables.product.prodname_ghe_cloud %} documentation.{% else %}."{% endif %} +{% ifversion fpt or ghec%}In most cases, you{% else %}You{% endif %} can also refer to a user by an email address that has been added to their account on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %}, for example `user@example.com`. {% ifversion fpt or ghec %} You cannot use an email address to refer to a {% data variables.product.prodname_managed_user %}. For more information about managed users, see "[About {% data variables.product.prodname_emus %}](/enterprise-cloud@latest/admin/identity-and-access-management/managing-iam-with-enterprise-managed-users/about-enterprise-managed-users){% ifversion fpt %}" in the {% data variables.product.prodname_ghe_cloud %} documentation.{% else %}."{% endif %}{% endif %} CODEOWNERS paths are case sensitive, because {% data variables.product.prodname_dotcom %} uses a case sensitive file system. Since CODEOWNERS are evaluated by {% data variables.product.prodname_dotcom %}, even systems that are case insensitive (for example, macOS) must use paths and files that are cased correctly in the CODEOWNERS file. From 54a63fc525b71963d258791df06d0443b0cfa7a8 Mon Sep 17 00:00:00 2001 From: Laura Coursen Date: Thu, 14 Apr 2022 15:07:59 -0500 Subject: [PATCH 4/4] Use product variable --- .../customizing-your-repository/about-code-owners.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners.md b/content/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners.md index b60d085c4e..d1c20f62fc 100644 --- a/content/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners.md +++ b/content/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners.md @@ -49,7 +49,7 @@ To reduce the size of your CODEOWNERS file, consider using wildcard patterns to A CODEOWNERS file uses a pattern that follows most of the same rules used in [gitignore](https://git-scm.com/docs/gitignore#_pattern_format) files, with [some exceptions](#syntax-exceptions). The pattern is followed by one or more {% data variables.product.prodname_dotcom %} usernames or team names using the standard `@username` or `@org/team-name` format. Users must have `read` access to the repository and teams must have explicit `write` access, even if the team's members already have access. -{% ifversion fpt or ghec%}In most cases, you{% else %}You{% endif %} can also refer to a user by an email address that has been added to their account on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %}, for example `user@example.com`. {% ifversion fpt or ghec %} You cannot use an email address to refer to a {% data variables.product.prodname_managed_user %}. For more information about managed users, see "[About {% data variables.product.prodname_emus %}](/enterprise-cloud@latest/admin/identity-and-access-management/managing-iam-with-enterprise-managed-users/about-enterprise-managed-users){% ifversion fpt %}" in the {% data variables.product.prodname_ghe_cloud %} documentation.{% else %}."{% endif %}{% endif %} +{% ifversion fpt or ghec%}In most cases, you{% else %}You{% endif %} can also refer to a user by an email address that has been added to their account on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %}, for example `user@example.com`. {% ifversion fpt or ghec %} You cannot use an email address to refer to a {% data variables.product.prodname_managed_user %}. For more information about {% data variables.product.prodname_managed_users %}, see "[About {% data variables.product.prodname_emus %}](/enterprise-cloud@latest/admin/identity-and-access-management/managing-iam-with-enterprise-managed-users/about-enterprise-managed-users){% ifversion fpt %}" in the {% data variables.product.prodname_ghe_cloud %} documentation.{% else %}."{% endif %}{% endif %} CODEOWNERS paths are case sensitive, because {% data variables.product.prodname_dotcom %} uses a case sensitive file system. Since CODEOWNERS are evaluated by {% data variables.product.prodname_dotcom %}, even systems that are case insensitive (for example, macOS) must use paths and files that are cased correctly in the CODEOWNERS file.