From 79d6632b1409ba738bfdf24400c72c2745454263 Mon Sep 17 00:00:00 2001 From: Brandon Morelli Date: Thu, 1 May 2025 12:30:56 -0700 Subject: [PATCH 1/5] Create comment-on-removed-files.yml --- .../workflows/comment-on-removed-files.yml | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 .github/workflows/comment-on-removed-files.yml diff --git a/.github/workflows/comment-on-removed-files.yml b/.github/workflows/comment-on-removed-files.yml new file mode 100644 index 0000000000..72b099acf3 --- /dev/null +++ b/.github/workflows/comment-on-removed-files.yml @@ -0,0 +1,64 @@ +name: Comment on removed .md files + +on: + pull_request: + types: [opened, synchronize, reopened] + +jobs: + detect-removed-markdown: + runs-on: ubuntu-latest + permissions: + pull-requests: write + + steps: + - uses: actions/github-script@v7 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + const prNumber = context.payload.pull_request.number; + + // Get all files in the PR + const { data: files } = await github.rest.pulls.listFiles({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: prNumber + }); + + // Filter for removed .md files + const removedMd = files + .filter(f => f.status === 'removed' && f.filename.endsWith('.md')) + .map(f => `- \`${f.filename}\``); + + if (removedMd.length > 0) { + // Prepare comment body + const body = [ + "## :warning: Markdown Files Removed", + "", + removedMd.length === 1 + ? "The following Markdown file was removed in this PR:" + : `The following ${removedMd.length} Markdown files were removed in this PR:`, + ...removedMd, + "", + "### Action Required", + "", + "We currently do not have an easy way to implement redirects for removed files. If possible, please:", + "", + "- Keep files whenever possible and exclude them from the TOC by using [`exclude`](https://docs-v3-preview.elastic.dev/elastic/docs-builder/tree/main/configure/content-set/navigation#exclude)", + "- Add a notice at the top of the file indicating that the page has moved with a link to the new location", + "- Ensure you've updated `redirects.yml` accordingly if the file must be removed", + "", + "Thank you!" + ].join("\n"); + + // Post the comment on the PR + await github.rest.issues.createComment({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: prNumber, + body + }); + + console.log(`Comment added about ${removedMd.length} removed Markdown files`); + } else { + console.log("No Markdown files were removed in this PR"); + } From 029472d6e78a4a7f49db2425dd65099045ec237e Mon Sep 17 00:00:00 2001 From: Brandon Morelli Date: Thu, 1 May 2025 12:49:41 -0700 Subject: [PATCH 2/5] Update comment-on-removed-files.yml --- .../workflows/comment-on-removed-files.yml | 49 ++++++++++++++----- 1 file changed, 38 insertions(+), 11 deletions(-) diff --git a/.github/workflows/comment-on-removed-files.yml b/.github/workflows/comment-on-removed-files.yml index 72b099acf3..9e6981bf35 100644 --- a/.github/workflows/comment-on-removed-files.yml +++ b/.github/workflows/comment-on-removed-files.yml @@ -28,24 +28,51 @@ jobs: const removedMd = files .filter(f => f.status === 'removed' && f.filename.endsWith('.md')) .map(f => `- \`${f.filename}\``); + + // Filter for renamed .md files + const renamedMd = files + .filter(f => f.status === 'renamed' && f.filename.endsWith('.md')) + .map(f => `- \`${f.previous_filename}\` → \`${f.filename}\``); + + // Create a comment if there are any removed or renamed files + if (removedMd.length > 0 || renamedMd.length > 0) { + // Build sections based on what changes were detected + const sections = []; + + // Add removed files section if there are any + if (removedMd.length > 0) { + sections.push( + removedMd.length === 1 + ? "The following Markdown file was **removed** in this PR:" + : `The following ${removedMd.length} Markdown files were **removed** in this PR:`, + ...removedMd, + "" + ); + } + + // Add renamed files section if there are any + if (renamedMd.length > 0) { + sections.push( + renamedMd.length === 1 + ? "The following Markdown file was **renamed** in this PR:" + : `The following ${renamedMd.length} Markdown files were **renamed** in this PR:`, + ...renamedMd, + "" + ); + } - if (removedMd.length > 0) { // Prepare comment body const body = [ - "## :warning: Markdown Files Removed", - "", - removedMd.length === 1 - ? "The following Markdown file was removed in this PR:" - : `The following ${removedMd.length} Markdown files were removed in this PR:`, - ...removedMd, + "## :warning: Markdown file changes detected", "", + ...sections, "### Action Required", "", - "We currently do not have an easy way to implement redirects for removed files. If possible, please:", + "We currently do not have an easy way to implement redirects for removed or renamed files. If possible, please:", "", - "- Keep files whenever possible and exclude them from the TOC by using [`exclude`](https://docs-v3-preview.elastic.dev/elastic/docs-builder/tree/main/configure/content-set/navigation#exclude)", + "- Keep files whenever possible and hide them from the TOC by using [`hidden`](https://elastic.github.io/docs-builder/configure/content-set/navigation/#hidden-files)", "- Add a notice at the top of the file indicating that the page has moved with a link to the new location", - "- Ensure you've updated `redirects.yml` accordingly if the file must be removed", + "- Ensure you've updated `redirects.yml` accordingly if files must be removed or renamed", "", "Thank you!" ].join("\n"); @@ -58,7 +85,7 @@ jobs: body }); - console.log(`Comment added about ${removedMd.length} removed Markdown files`); + console.log("Comment added about renamed or removed Markdown files"); } else { console.log("No Markdown files were removed in this PR"); } From ec0c7616693380bf756359af76b905a836e99214 Mon Sep 17 00:00:00 2001 From: Colleen McGinnis Date: Thu, 1 May 2025 14:58:15 -0500 Subject: [PATCH 3/5] test delete and rename --- cloud-account/add-a-login-method.md | 32 ------------------- ...-password.md => change-your-password-2.md} | 0 cloud-account/index.md | 4 +-- cloud-account/toc.yml | 3 +- .../configure-saml-authentication.md | 2 +- 5 files changed, 4 insertions(+), 37 deletions(-) delete mode 100644 cloud-account/add-a-login-method.md rename cloud-account/{change-your-password.md => change-your-password-2.md} (100%) diff --git a/cloud-account/add-a-login-method.md b/cloud-account/add-a-login-method.md deleted file mode 100644 index b3cd2bd7a1..0000000000 --- a/cloud-account/add-a-login-method.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -mapped_pages: - - https://www.elastic.co/guide/en/cloud/current/ec-change-login-method.html -applies_to: - serverless: all - deployment: - ess: all ---- - -# Add a login method [ec-change-login-method] - -When you create your account, you can choose one of the the following methods to log in: - -* A password-based login -* Log in with Google -* Log in with Microsoft - -After your account is created, you and can an additional login method. You can’t remove a login method after it’s added. - -## Enable password-based login [ec_enable_password_based_login] - -To enable password-based login in addition to Google or Microsoft sign-in, go to the [Forgot password](https://cloud.elastic.co/forgot) page and enter your email address. This will trigger the forgot password flow and will allow you to create a password for your account. - -After you create a password, log in. You’ll be prompted to [enable multifactor authentication](multifactor-authentication.md). - -You will now be able to change the email address in your [user settings](https://cloud.elastic.co/user/settings). Refer to [Update your email address](/cloud-account/update-your-email-address.md) for more information. - -## Enable Google or Microsoft sign-in [ec_enable_google_or_microsoft_sign_in] - -To enable Google or Microsoft sign-in in addition to password-based login, go to the [Login](https://cloud.elastic.co/login) page and select **Log in with Google** or **Log in with Microsoft**. - - diff --git a/cloud-account/change-your-password.md b/cloud-account/change-your-password-2.md similarity index 100% rename from cloud-account/change-your-password.md rename to cloud-account/change-your-password-2.md diff --git a/cloud-account/index.md b/cloud-account/index.md index 3c8b8d0727..114d4fdbee 100644 --- a/cloud-account/index.md +++ b/cloud-account/index.md @@ -13,11 +13,11 @@ applies_to: Your {{ecloud}} account allows you to manage your personal settings, including your email address, password, and authentication methods. You can perform the following tasks at any time from your user profile: * [Update your email address](/cloud-account/update-your-email-address.md) -* [Add an additional login method](/cloud-account/add-a-login-method.md): Choose from password-based login, Google sign-in, and Microsoft sign-in. + If you use password-based login, then you can perform the following additional tasks: -* [Change your password](/cloud-account/change-your-password.md) +* [Change your password](/cloud-account/change-your-password-2.md) * [Configure multifactor authentication](/cloud-account/multifactor-authentication.md) Additionally, you can manage your organization membership, including joining or leaving an organization. Refer to [Join or leave an organization](/cloud-account/join-or-leave-an-organization.md) for more information. diff --git a/cloud-account/toc.yml b/cloud-account/toc.yml index a17a96cfc7..8157e39311 100644 --- a/cloud-account/toc.yml +++ b/cloud-account/toc.yml @@ -3,7 +3,6 @@ toc: - file: index.md - file: join-or-leave-an-organization.md - file: update-your-email-address.md - - file: change-your-password.md - - file: add-a-login-method.md + - file: change-your-password-2.md - file: multifactor-authentication.md - file: dark-mode.md \ No newline at end of file diff --git a/deploy-manage/users-roles/cloud-organization/configure-saml-authentication.md b/deploy-manage/users-roles/cloud-organization/configure-saml-authentication.md index d2eca106b4..a42a5e12f1 100644 --- a/deploy-manage/users-roles/cloud-organization/configure-saml-authentication.md +++ b/deploy-manage/users-roles/cloud-organization/configure-saml-authentication.md @@ -53,7 +53,7 @@ Before you configure SAML SSO, familiarize yourself with the following risks and * If you enforce SSO authentication, you can be locked out of {{ecloud}} if your IdP is unavailable or misconfigured. You might need to work with Elastic Support to regain access to your account. To avoid being locked out, you should maintain and store an [{{ecloud}} API key](../../api-keys/elastic-cloud-api-keys.md#ec-api-keys) with organization owner level privileges so that an administrator can disable enforcement in an emergency. * If you do not enforce SSO authentication, users can still log in without authenticating with your IdP. You need to manage these users in {{ecloud}}. -* {{ecloud}} passwords are invalidated each time a user logs in using SSO. If a user needs sign in with their email and password again, they need to [change their password](../../../cloud-account/change-your-password.md). +* {{ecloud}} passwords are invalidated each time a user logs in using SSO. If a user needs sign in with their email and password again, they need to [change their password](../../../cloud-account/change-your-password-2.md). * Role mappings only take effect when your organization’s members authenticate using SSO. If SSO authentication is not enforced, users might have roles that are inconsistent with the role mapping when they log in using other methods. * Roles manually assigned using the {{ecloud}} Console are overwritten by the role mapping when the user logs in using SSO. From f23101a84fd67a9942c1b905ecb709c6b233ffdc Mon Sep 17 00:00:00 2001 From: Colleen McGinnis Date: Thu, 1 May 2025 15:00:15 -0500 Subject: [PATCH 4/5] Revert "test delete and rename" This reverts commit ec0c7616693380bf756359af76b905a836e99214. --- cloud-account/add-a-login-method.md | 32 +++++++++++++++++++ ...-password-2.md => change-your-password.md} | 0 cloud-account/index.md | 4 +-- cloud-account/toc.yml | 3 +- .../configure-saml-authentication.md | 2 +- 5 files changed, 37 insertions(+), 4 deletions(-) create mode 100644 cloud-account/add-a-login-method.md rename cloud-account/{change-your-password-2.md => change-your-password.md} (100%) diff --git a/cloud-account/add-a-login-method.md b/cloud-account/add-a-login-method.md new file mode 100644 index 0000000000..b3cd2bd7a1 --- /dev/null +++ b/cloud-account/add-a-login-method.md @@ -0,0 +1,32 @@ +--- +mapped_pages: + - https://www.elastic.co/guide/en/cloud/current/ec-change-login-method.html +applies_to: + serverless: all + deployment: + ess: all +--- + +# Add a login method [ec-change-login-method] + +When you create your account, you can choose one of the the following methods to log in: + +* A password-based login +* Log in with Google +* Log in with Microsoft + +After your account is created, you and can an additional login method. You can’t remove a login method after it’s added. + +## Enable password-based login [ec_enable_password_based_login] + +To enable password-based login in addition to Google or Microsoft sign-in, go to the [Forgot password](https://cloud.elastic.co/forgot) page and enter your email address. This will trigger the forgot password flow and will allow you to create a password for your account. + +After you create a password, log in. You’ll be prompted to [enable multifactor authentication](multifactor-authentication.md). + +You will now be able to change the email address in your [user settings](https://cloud.elastic.co/user/settings). Refer to [Update your email address](/cloud-account/update-your-email-address.md) for more information. + +## Enable Google or Microsoft sign-in [ec_enable_google_or_microsoft_sign_in] + +To enable Google or Microsoft sign-in in addition to password-based login, go to the [Login](https://cloud.elastic.co/login) page and select **Log in with Google** or **Log in with Microsoft**. + + diff --git a/cloud-account/change-your-password-2.md b/cloud-account/change-your-password.md similarity index 100% rename from cloud-account/change-your-password-2.md rename to cloud-account/change-your-password.md diff --git a/cloud-account/index.md b/cloud-account/index.md index 114d4fdbee..3c8b8d0727 100644 --- a/cloud-account/index.md +++ b/cloud-account/index.md @@ -13,11 +13,11 @@ applies_to: Your {{ecloud}} account allows you to manage your personal settings, including your email address, password, and authentication methods. You can perform the following tasks at any time from your user profile: * [Update your email address](/cloud-account/update-your-email-address.md) - +* [Add an additional login method](/cloud-account/add-a-login-method.md): Choose from password-based login, Google sign-in, and Microsoft sign-in. If you use password-based login, then you can perform the following additional tasks: -* [Change your password](/cloud-account/change-your-password-2.md) +* [Change your password](/cloud-account/change-your-password.md) * [Configure multifactor authentication](/cloud-account/multifactor-authentication.md) Additionally, you can manage your organization membership, including joining or leaving an organization. Refer to [Join or leave an organization](/cloud-account/join-or-leave-an-organization.md) for more information. diff --git a/cloud-account/toc.yml b/cloud-account/toc.yml index 8157e39311..a17a96cfc7 100644 --- a/cloud-account/toc.yml +++ b/cloud-account/toc.yml @@ -3,6 +3,7 @@ toc: - file: index.md - file: join-or-leave-an-organization.md - file: update-your-email-address.md - - file: change-your-password-2.md + - file: change-your-password.md + - file: add-a-login-method.md - file: multifactor-authentication.md - file: dark-mode.md \ No newline at end of file diff --git a/deploy-manage/users-roles/cloud-organization/configure-saml-authentication.md b/deploy-manage/users-roles/cloud-organization/configure-saml-authentication.md index a42a5e12f1..d2eca106b4 100644 --- a/deploy-manage/users-roles/cloud-organization/configure-saml-authentication.md +++ b/deploy-manage/users-roles/cloud-organization/configure-saml-authentication.md @@ -53,7 +53,7 @@ Before you configure SAML SSO, familiarize yourself with the following risks and * If you enforce SSO authentication, you can be locked out of {{ecloud}} if your IdP is unavailable or misconfigured. You might need to work with Elastic Support to regain access to your account. To avoid being locked out, you should maintain and store an [{{ecloud}} API key](../../api-keys/elastic-cloud-api-keys.md#ec-api-keys) with organization owner level privileges so that an administrator can disable enforcement in an emergency. * If you do not enforce SSO authentication, users can still log in without authenticating with your IdP. You need to manage these users in {{ecloud}}. -* {{ecloud}} passwords are invalidated each time a user logs in using SSO. If a user needs sign in with their email and password again, they need to [change their password](../../../cloud-account/change-your-password-2.md). +* {{ecloud}} passwords are invalidated each time a user logs in using SSO. If a user needs sign in with their email and password again, they need to [change their password](../../../cloud-account/change-your-password.md). * Role mappings only take effect when your organization’s members authenticate using SSO. If SSO authentication is not enforced, users might have roles that are inconsistent with the role mapping when they log in using other methods. * Roles manually assigned using the {{ecloud}} Console are overwritten by the role mapping when the user logs in using SSO. From feb09fd2db3990ec8a6c79b1b6448b157e80dba8 Mon Sep 17 00:00:00 2001 From: Brandon Morelli Date: Thu, 1 May 2025 13:00:44 -0700 Subject: [PATCH 5/5] Update comment-on-removed-files.yml