Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions scripts/compliance-audit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -127,36 +127,36 @@ detect_ecosystems() {
local tree
tree=$(gh_api "repos/$ORG/$repo/git/trees/HEAD?recursive=1" --jq '.tree[].path' 2>/dev/null || echo "")

if echo "$tree" | grep -qE '(^|/)package\.json$'; then
if grep -qE '(^|/)package\.json$' <<< "$tree"; then
ECOSYSTEMS+=("npm")
fi
if echo "$tree" | grep -qE '(^|/)pnpm-lock\.yaml$'; then
if grep -qE '(^|/)pnpm-lock\.yaml$' <<< "$tree"; then
# Override npm with pnpm if lock file present, or add pnpm directly
if [[ " ${ECOSYSTEMS[*]} " == *" npm "* ]]; then
ECOSYSTEMS=("${ECOSYSTEMS[@]/npm/pnpm}")
else
ECOSYSTEMS+=("pnpm")
fi
fi
if echo "$tree" | grep -qE '(^|/)go\.mod$'; then
if grep -qE '(^|/)go\.mod$' <<< "$tree"; then
ECOSYSTEMS+=("go")
fi
if echo "$tree" | grep -qE '(^|/)Cargo\.toml$'; then
if grep -qE '(^|/)Cargo\.toml$' <<< "$tree"; then
ECOSYSTEMS+=("rust")
fi
if echo "$tree" | grep -qE '(^|/)(pyproject\.toml|requirements\.txt)$'; then
if grep -qE '(^|/)(pyproject\.toml|requirements\.txt)$' <<< "$tree"; then
ECOSYSTEMS+=("python")
fi
if echo "$tree" | grep -qE '\.tf$'; then
if grep -qE '\.tf$' <<< "$tree"; then
ECOSYSTEMS+=("terraform")
fi
if echo "$tree" | grep -qE '\.github/workflows/.*\.yml$'; then
if grep -qE '\.github/workflows/.*\.ya?ml$' <<< "$tree"; then
ECOSYSTEMS+=("github-actions")
fi
# BMAD Method: detected via either the active install dir (`_bmad/`) or
# the planning artifacts output dir (`_bmad-output/`). Repos may have one,
# the other, or both depending on the BMAD workflow stage.
if echo "$tree" | grep -qE '(^|/)_bmad(-output)?/'; then
if grep -qE '(^|/)_bmad(-output)?/' <<< "$tree"; then
ECOSYSTEMS+=("bmad-method")
fi
}
Expand Down