Skip to content

Commit 59cd103

Browse files
ci: add @10xly-bot2 mention listener
1 parent baf9411 commit 59cd103

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.github/workflows/notify-bot.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Notify 10xly-bot2 of mentions
2+
on:
3+
issue_comment:
4+
types: [created]
5+
6+
jobs:
7+
notify:
8+
if: contains(github.event.comment.body, '@10xly-bot2')
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Trigger bot
12+
uses: actions/github-script@v7
13+
with:
14+
github-token: ${{ secrets.BOT_DISPATCH_TOKEN }}
15+
script: |
16+
await github.rest.repos.createDispatchEvent({
17+
owner: '10xly-bot2',
18+
repo: '10xly-bot-control',
19+
event_type: 'mention',
20+
client_payload: {
21+
repo: context.repo.repo,
22+
owner: context.repo.owner,
23+
issue_number: context.issue.number,
24+
comment_id: context.payload.comment.id,
25+
comment_body: context.payload.comment.body,
26+
comment_url: context.payload.comment.html_url
27+
}
28+
})

0 commit comments

Comments
 (0)