governance: add .gitignore housekeeping and regular audits; implement audit script and CI step; update templates, proposal, and docs
Some checks failed
ci / test (push) Has been cancelled
Some checks failed
ci / test (push) Has been cancelled
This commit is contained in:
43
scripts/audit.sh
Normal file
43
scripts/audit.sh
Normal file
@@ -0,0 +1,43 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
root_dir="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
|
||||
failures=0
|
||||
check() {
|
||||
local msg="$1"; shift
|
||||
if "$@"; then
|
||||
echo "[ok] $msg"
|
||||
else
|
||||
echo "[fail] $msg" >&2
|
||||
failures=$((failures+1))
|
||||
fi
|
||||
}
|
||||
|
||||
cd "$root_dir"
|
||||
|
||||
# Structure checks
|
||||
for d in collab docs prompts templates scripts meta .gitea; do
|
||||
check "dir exists: $d" test -d "$d"
|
||||
done
|
||||
|
||||
# .gitignore housekeeping
|
||||
if [ -f .gitignore ]; then
|
||||
if grep -q '^runs/' .gitignore; then
|
||||
echo "[ok] .gitignore includes runs/"
|
||||
else
|
||||
echo "[fail] .gitignore missing runs/" >&2; failures=$((failures+1))
|
||||
fi
|
||||
else
|
||||
echo "[warn] no .gitignore at repo root"
|
||||
fi
|
||||
|
||||
# CI presence
|
||||
check "Gitea workflow exists" test -f .gitea/workflows/ci.yml
|
||||
|
||||
# Docker compose for local parity
|
||||
check "docker/compose.yml exists" test -f docker/compose.yml
|
||||
|
||||
echo "[summary] failures=$failures"
|
||||
exit "$failures"
|
||||
|
Reference in New Issue
Block a user