feat: trigger on issues opened when @cursor in title or body

Extend check-comment.sh to parse issues event payloads; document
issue_comment + issues opened as supported workflow triggers.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Frank Schwenk
2026-07-05 16:50:21 +02:00
parent 239e110b72
commit 6b6943262d
3 changed files with 19 additions and 7 deletions
+12 -3
View File
@@ -15,14 +15,18 @@ fi
OUTPUT_FILE="${GITHUB_OUTPUT:?GITHUB_OUTPUT is not set}"
COMMENT_BODY=$(jq -r '
COMMENT_BODY=$(jq -r \
--arg event_name "${GITHUB_EVENT_NAME:-}" \
'
if .comment?.body? then .comment.body
elif .review?.body? then .review.body
elif $event_name == "issues" then
((.issue.title // "") + "\n" + (.issue.body // ""))
else empty end
' "$EVENT_FILE")
' "$EVENT_FILE")
if [ -z "$COMMENT_BODY" ]; then
echo "No comment or review body in event payload — skipping."
echo "No @cursor trigger text in event payload — skipping."
echo "run_cursor=false" >> "$OUTPUT_FILE"
exit 0
fi
@@ -63,6 +67,11 @@ jq \
id: .review.id,
user: (.sender.login // "unknown")
}
elif ($event_name == "issues") and .issue then {
body: ((.issue.title // "") + "\n" + (.issue.body // "")),
id: null,
user: (.sender.login // .issue.user.login // "unknown")
}
else null end
),
issue: {