Skip to content

Commit 2da18a4

Browse files
markubraclaude
andauthored
fix(get_values): lowercase clean_branch_name outputs (#287)
* fix(get_values): lowercase clean_branch_name outputs Branches with uppercase characters (e.g. claude/move-mcp-server-cardRrDNj) produced clean_branch_name / clean_branch_name_with_suffix values that preserved case. Downstream consumers use these as Helm release names, DNS hostnames, npm dist-tags and other identifiers that require lowercase, so multi-staging deployments and canary npm publishes failed on such branches (see apify/apify-core#27626). Normalize to lowercase at the source so every consumer gets a DNS-1123 / npm-safe slug without each call site re-implementing the fix. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(get_values): clarify suffix is SHA-1 of branch name, not branch SHA Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent be0ad17 commit 2da18a4

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

.github/workflows/get_values.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ on:
1919
description: Short commit sha
2020
value: ${{ jobs.get_values.outputs.short_commit_sha }}
2121
clean_branch_name:
22-
description: Branch name stripped of non-alphanumeric characters and capped at length of 35
22+
description: Branch name stripped of non-alphanumeric characters, lowercased, and capped at length of 35
2323
value: ${{ jobs.get_values.outputs.clean_branch_name }}
2424
clean_branch_name_with_suffix:
25-
description: Branch name stripped of non-alphanumeric characters and capped at length of 28 concatenated with first 6 chars of branch SHA
25+
description: Branch name stripped of non-alphanumeric characters, lowercased, and capped at length of 28 concatenated with the first 6 hex chars of its SHA-1
2626
value: ${{ jobs.get_values.outputs.clean_branch_name_with_suffix }}
2727
commit_author:
2828
description: Author of last commit
@@ -53,6 +53,7 @@ jobs:
5353
fi
5454
5555
_BRANCH_NAME=${BRANCH_NAME//[^[:alnum:]]/}
56+
_BRANCH_NAME=$(echo "${_BRANCH_NAME}" | tr '[:upper:]' '[:lower:]')
5657
CLEAN_BRANCH_NAME=$(echo ${_BRANCH_NAME} | cut -c 1-35)
5758
CLEAN_BRANCH_NAME_WITH_SUFFIX=$(echo ${_BRANCH_NAME} | cut -c 1-28)-$(echo ${_BRANCH_NAME} | shasum -a 1 | cut -c 1-6)
5859

0 commit comments

Comments
 (0)