@@ -3,24 +3,37 @@ name: Notify Chloé (Issue Triage)
33on :
44 issues :
55 types : [opened]
6+ issue_comment :
7+ types : [created]
68
79jobs :
810 notify :
911 runs-on : ubuntu-latest
12+ if : github.event.sender.type != 'Bot'
1013 steps :
1114 - name : Send to OpenClaw
1215 env :
16+ EVENT_NAME : ${{ github.event_name }}
17+ REPO : ${{ github.repository }}
18+ SENDER : ${{ github.event.sender.login }}
19+ ISSUE_NUMBER : ${{ github.event.issue.number }}
1320 ISSUE_TITLE : ${{ github.event.issue.title }}
14- ISSUE_BODY : ${{ github.event.issue.body }}
15- ISSUE_USER : ${{ github.event.issue.user.login }}
1621 ISSUE_URL : ${{ github.event.issue.html_url }}
17- ISSUE_NUMBER : ${{ github.event.issue.number }}
18- REPO : ${{ github.repository }}
22+ ISSUE_BODY : ${{ github.event.issue.body }}
23+ COMMENT_BODY : ${{ github.event.comment.body }}
24+ COMMENT_URL : ${{ github.event.comment.html_url }}
1925 run : |
20- MSG="New issue in ${REPO} — #${ISSUE_NUMBER}: ${ISSUE_TITLE}"
21- MSG+=$'\nAuthor: '"${ISSUE_USER}"
22- MSG+=$'\nURL: '"${ISSUE_URL}"
23- MSG+=$'\n\n'"${ISSUE_BODY}"
26+ if [ "$EVENT_NAME" = "issues" ]; then
27+ MSG="New issue in ${REPO} — #${ISSUE_NUMBER}: ${ISSUE_TITLE}"
28+ MSG+=$'\nAuthor: '"${SENDER}"
29+ MSG+=$'\nURL: '"${ISSUE_URL}"
30+ MSG+=$'\n\n'"${ISSUE_BODY}"
31+ else
32+ MSG="New comment on ${REPO} — #${ISSUE_NUMBER}: ${ISSUE_TITLE}"
33+ MSG+=$'\nFrom: '"${SENDER}"
34+ MSG+=$'\nURL: '"${COMMENT_URL}"
35+ MSG+=$'\n\n'"${COMMENT_BODY}"
36+ fi
2437 PAYLOAD=$(jq -n --arg msg "$MSG" --arg name "GitHub Issues" \
2538 '{message: $msg, name: $name, deliver: true, channel: "discord", to: "user:918237603617206303"}')
2639 curl -sf -X POST \
0 commit comments