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:
@@ -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}"
|
||||
|
||||
Reference in New Issue
Block a user