fix: remove requirement for dev/* branches in repo health check

The repo health workflow previously required at least one dev/* branch
to exist, which is too strict after the plain 'dev' branch was deleted.
This change removes that requirement while keeping the validation that
prohibits plain 'dev' branches. The workflow now:
- Allows dev/* branches (e.g., dev/01.00.00)
- Prohibits plain 'dev' branches
- Does not require any dev/* branch to exist

Co-authored-by: jmiller-moko <230051081+jmiller-moko@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-01-03 21:54:45 +00:00
parent 00f794b3f6
commit 22ead38402

View File

@@ -559,25 +559,17 @@ jobs:
git fetch origin --prune git fetch origin --prune
dev_paths=()
dev_branches=() dev_branches=()
# Look for remote branches matching origin/dev*. # Look for remote branches matching origin/dev*.
# A plain origin/dev is considered invalid; we require dev/<something> branches. # A plain origin/dev is prohibited; only dev/<something> branches are allowed.
while IFS= read -r b; do while IFS= read -r b; do
name="${b#origin/}" name="${b#origin/}"
if [ "${name}" = 'dev' ]; then if [ "${name}" = 'dev' ]; then
dev_branches+=("${name}") dev_branches+=("${name}")
else
dev_paths+=("${name}")
fi fi
done < <(git branch -r --list 'origin/dev*' | sed 's/^ *//') done < <(git branch -r --list 'origin/dev*' | sed 's/^ *//')
# If there are no dev/* branches, fail the guardrail.
if [ "${#dev_paths[@]}" -eq 0 ]; then
missing_required+=("dev/* branch (e.g. dev/01.00.00)")
fi
# If a plain dev branch exists (origin/dev), flag it as invalid. # If a plain dev branch exists (origin/dev), flag it as invalid.
if [ "${#dev_branches[@]}" -gt 0 ]; then if [ "${#dev_branches[@]}" -gt 0 ]; then
missing_required+=("invalid branch dev (must be dev/<version>)") missing_required+=("invalid branch dev (must be dev/<version>)")