From 735ed8560d0b9305292fc0952f1b43e48a04ec96 Mon Sep 17 00:00:00 2001 From: tanghao-xiaomi Date: Tue, 28 Jul 2026 20:04:50 +0800 Subject: [PATCH] ci: add brand-name check for 'VelaClaw' in Markdown Add a lightweight PR check that fails when the CamelCase brand form 'VelaClaw' appears in any Markdown file. The convention is to use 'openvelaClaw' (lowercase 'openvela' prefix, capital 'C') as the brand name in prose, to reduce trademark risk. The check is intentionally case-sensitive and does NOT flag: - lowercase code identifiers: velaclaw, @system.velaclaw, velaclaw_client_open, velaclaw_ask (real framework APIs) - uppercase macro: VELACLAW_DAEMON (real Kconfig / macro name) Note: this check depends on the brand rename in #636 being merged first. Otherwise the base branch's existing 'VelaClaw' occurrences would cause subsequent PRs to fail. --- .github/workflows/brand-name-check.yml | 46 ++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/brand-name-check.yml diff --git a/.github/workflows/brand-name-check.yml b/.github/workflows/brand-name-check.yml new file mode 100644 index 00000000..a034e99c --- /dev/null +++ b/.github/workflows/brand-name-check.yml @@ -0,0 +1,46 @@ +name: brand-name-check + +# Fails the PR when the CamelCase brand form 'VelaClaw' appears in Markdown. +# Please use 'openvelaClaw' (lowercase 'openvela' prefix, capital 'C') in prose. +# +# Intentionally NOT flagged: +# - lowercase code identifiers: 'velaclaw', '@system.velaclaw', +# 'velaclaw_client_open', 'velaclaw_ask' (real framework APIs) +# - uppercase macro: 'VELACLAW_DAEMON' (real Kconfig / macro name) + +on: + pull_request: + types: [opened, reopened, synchronize] + +jobs: + brand-name-check: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Scan Markdown for disallowed 'VelaClaw' brand form + run: | + set -u + echo "Scanning Markdown files for CamelCase brand form 'VelaClaw'..." + # grep is case-sensitive by default; 'VelaClaw' will NOT match + # 'openvelaClaw' (lowercase v) or 'VELACLAW_DAEMON' (all caps). + if matches=$(grep -rn --include='*.md' 'VelaClaw' .); then + echo "" + echo "::error::Disallowed brand form 'VelaClaw' found in Markdown." + echo "$matches" | while IFS= read -r line; do + file="${line%%:*}" + rest="${line#*:}" + lineno="${rest%%:*}" + echo "::error file=${file},line=${lineno}::Use 'openvelaClaw' instead of 'VelaClaw' in prose." + done + echo "" + echo "Per the openvela naming convention, please use 'openvelaClaw'" + echo "(lowercase 'openvela' prefix, capital 'C') as the brand name in prose." + echo "" + echo "The following identifiers are code / API names and must remain unchanged:" + echo " - lowercase: 'velaclaw', '@system.velaclaw', 'velaclaw_client_open', 'velaclaw_ask'" + echo " - uppercase: 'VELACLAW_DAEMON'" + exit 1 + fi + echo "OK: no 'VelaClaw' brand form found."