Add PR validation before creating PRs

- Create validate-pr.sh: runs shellcheck, JSON/YAML/Python syntax checks
- Update gitea-pr.sh: runs validation before creating PR
- Update CLAUDE.md: document PR review policy
  - ~/.claude repo: linting/validation only
  - Code repos: full code-reviewer agent review

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
OpenCode Test
2026-01-04 13:06:31 -08:00
parent 02f9cf7d8f
commit 652ceb55f0
3 changed files with 100 additions and 0 deletions

View File

@@ -1,9 +1,11 @@
#!/bin/bash
# Create a PR in Gitea for the current branch
# Usage: gitea-pr.sh [title] [body]
# Runs validation before creating PR
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
GITEA_URL="https://gitea-http.taildb3494.ts.net"
REPO="will/claude-code"
TOKEN_FILE="$HOME/.config/gitea-token"
@@ -23,6 +25,14 @@ if [[ "$BRANCH" == "main" ]]; then
exit 1
fi
# Run validation
echo "Running pre-PR validation..."
if ! "$SCRIPT_DIR/validate-pr.sh"; then
echo "Error: Validation failed. Fix issues before creating PR." >&2
exit 1
fi
echo ""
# Default title from branch name
TITLE="${1:-$BRANCH}"
BODY="${2:-Auto-generated PR for $BRANCH}"