Back to all errors

GIT023

GIT

PR validation failure

Error

The gh pr create command failed validation. Issues can include: title too long, invalid conventional commit format, missing PR body, markdown formatting errors, missing base branch label, or forbidden patterns in title/body.

Why this matters

Well-structured PRs are easier to review, generate clean changelogs, and integrate with automation. Title conventions enable automated release notes and semantic versioning.

How to fix

Title issues

# Use conventional commit format, max 50 chars:
gh pr create --title "feat(auth): add JWT validation" --body "..."

# Valid types: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert

Body issues

# Always include a body with --body or --body-file:
gh pr create --title "fix(api): handle timeout" --body "$(cat <<'EOF'
## Summary

- Fixed API timeout handling for slow connections

## Test plan

- [ ] Verify timeout behavior with mock server
EOF
)"

Base branch labels

# When targeting a non-default branch, add matching label:
gh pr create --title "fix(api): backport" --base release/1.0 --label "release/1.0"

Configuration

[validators.git.pr]
title_max_length = 50
title_conventional_commits = true
require_body = true
require_changelog = false
check_ci_labels = true
markdown_disabled_rules = ["MD013", "MD034", "MD041"]

Hook output

When this error is triggered, klaudiush writes JSON to stdout:

permissionDecisionReason (shown to Claude): [GIT023] PR validation failure. Fix the issue and retry gh pr create

systemMessage (shown to user): Formatted error with fix hint and reference URL.

additionalContext (behavioral guidance): Automated klaudiush validation check. Fix the reported errors and retry the same command.

© 2026 Smykla Skalski Labs