From 1f29f102e41775b45c75fd6cd3fe8e2c57f42b47 Mon Sep 17 00:00:00 2001 From: paoloredis Date: Fri, 1 Aug 2025 15:29:05 +0200 Subject: [PATCH 1/2] Rename staging links autocomment workflow --- .../{autocomment.yaml => autocomment_staging_links.yaml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{autocomment.yaml => autocomment_staging_links.yaml} (99%) diff --git a/.github/workflows/autocomment.yaml b/.github/workflows/autocomment_staging_links.yaml similarity index 99% rename from .github/workflows/autocomment.yaml rename to .github/workflows/autocomment_staging_links.yaml index 7c980ef21..1e711a808 100644 --- a/.github/workflows/autocomment.yaml +++ b/.github/workflows/autocomment_staging_links.yaml @@ -1,4 +1,4 @@ -name: Auto Comment on PR +name: autocomment_staging_links on: pull_request: From 01de3691f496a93f6bc3442b248af2517a6afd6a Mon Sep 17 00:00:00 2001 From: paoloredis Date: Mon, 4 Aug 2025 09:15:51 +0200 Subject: [PATCH 2/2] Fix suffix bug --- .github/workflows/autocomment_staging_links.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/autocomment_staging_links.yaml b/.github/workflows/autocomment_staging_links.yaml index 1e711a808..2c0ead5f5 100644 --- a/.github/workflows/autocomment_staging_links.yaml +++ b/.github/workflows/autocomment_staging_links.yaml @@ -50,7 +50,7 @@ jobs: -H "Authorization: Bearer ${GITHUB_TOKEN}" \ $FILES_URL \ | jq -r --arg prefix $BRANCH_NAME/ '.[] | select(((.filename | test("content/(?!.*embed).*\\.md")) and .status != "removed")) | ($prefix + .filename)' \ - | sed -E -e 's|(^[^/]+/)([^/]+/)|\1|' -e 's|^|https://redis.io/docs/staging/|' -e 's|\/(_?index)?\.md|\/|' \ + | sed -E -e 's|(^[^/]+/)([^/]+/)|\1|' -e 's|^|https://redis.io/docs/staging/|' -e 's|(\/_?index)?\.md|\/|' \ | sort \ | uniq)