From 65ea41d6015c105900d72e1233eb295c2cd72640 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20G=C3=B3is?= Date: Tue, 22 Jul 2025 17:39:16 +0100 Subject: [PATCH] chore: AI flag cleanup better support advanced flag names (#10396) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://linear.app/unleash/issue/2-3709/improve-support-for-advanced-flag-names-in-ai-flag-cleanup Improves support for advanced flag names in AI flag cleanup. This is something I noticed when it tried to run against https://github.com/Unleash/unleash/issues/10395 — The dot (.) broke the previous logic. --- .github/workflows/ai-flag-cleanup-pr.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ai-flag-cleanup-pr.yml b/.github/workflows/ai-flag-cleanup-pr.yml index e3e87647af..22eedaac28 100644 --- a/.github/workflows/ai-flag-cleanup-pr.yml +++ b/.github/workflows/ai-flag-cleanup-pr.yml @@ -85,11 +85,10 @@ jobs: - name: Extract flag name id: extract_flag run: | - read -r TITLE <<'EOF' - ${{ fromJson(steps.get_issue.outputs.result).title }} - EOF + TITLE="${{ fromJson(steps.get_issue.outputs.result).title }}" - if [[ "$TITLE" =~ Flag[[:space:]]([a-zA-Z0-9_-]+)[[:space:]]marked ]]; then + if [[ $TITLE =~ Flag[[:space:]]+([^[:space:]]+)[[:space:]]+marked ]]; then + FLAG="${BASH_REMATCH[1]}" echo "flag-name=${BASH_REMATCH[1]}" >> $GITHUB_OUTPUT else MSG="Could not extract flag name from title: $TITLE"