Skip to content
Merged
Show file tree
Hide file tree
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
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/3-bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,17 @@ body:
validations:
required: true

- type: input
id: version
attributes:
label: Kagenti Version
description: |
If this bug is for the Kagenti platform, which version were you running? Check with:
helm list -n kagenti-system (app version column), or the git tag you checked out.
placeholder: "v0.6.0"
validations:
required: false

- type: textarea
id: additional
attributes:
Expand Down
28 changes: 28 additions & 0 deletions scripts/hooks/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/env bash
set -euo pipefail

COMMIT_MSG_FILE="$1"
TEMP_FILE=$(mktemp)

# Check if any AI co-author trailers exist before stripping
HAS_AI_TRAILER=false
if grep -qi -E '^Co-authored-by:.*(Claude|Cursor|anthropic)' "$COMMIT_MSG_FILE"; then
HAS_AI_TRAILER=true
fi

# Strip Co-authored-by lines for Claude/Cursor and Made-with lines
grep -vi -E '^Co-authored-by:.*(Claude|Cursor|anthropic|cursor)' "$COMMIT_MSG_FILE" \
| grep -vi '^Made-with:' \
> "$TEMP_FILE" || true

# Remove trailing blank lines (awk is portable across macOS/Linux unlike sed labels)
awk '/^[[:space:]]*$/{buf=buf $0 ORS; next} {if(buf) printf "%s",buf; buf=""; print}' "$TEMP_FILE" > "$COMMIT_MSG_FILE"

# If AI trailers were present, add Assisted-By instead
if [ "$HAS_AI_TRAILER" = true ]; then
# Ensure there's a blank line before the trailer
echo "" >> "$COMMIT_MSG_FILE"
echo "Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com>" >> "$COMMIT_MSG_FILE"
fi

rm -f "$TEMP_FILE"
Loading