You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] Truncated Git event text can end in half a character #850
truncate in services/api/internal/service/git/router.go cuts by bytes (s[:n]), so when the cut lands inside a multi-byte character the result ends with half a rune. It caps the issue/PR comment and review text sent to Git automations (500 / 2000 / 4000 bytes) and the inbox reason (400 bytes). A long comment with an emoji, accented letter or CJK text near the limit reaches the automation with a broken last character (a U+FFFD once it's JSON-encoded).
Area
API
Steps to reproduce
Link a repo and add an automation on "PR commented" that uses the comment text.
Post a PR comment longer than 2000 bytes where byte 2000 falls inside a multi-byte character, e.g. 1999 as followed by é.
The text the automation receives is the 1999 as plus a trailing �, instead of just the as.
Expected behavior
The text is cut at the last whole character before the limit. automation_consumer.go already does this with strings.ToValidUTF8(s[:n], "").
Activity
pullfrog commentedon Dec 2, 2026
dhananjay6561 commentedon Dec 2, 2026
Fix is up in #851.