Skip to content

Commit 43f6f95

Browse files
committed
Exclude bots from welcome comment
1 parent beead1b commit 43f6f95

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.github/workflows/reusable-welcome-new-contributors.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,15 @@ jobs:
99
welcome:
1010
runs-on: ubuntu-latest
1111
steps:
12+
- name: detect bot author
13+
id: bot-author-check
14+
uses: actions/github-script@v8
15+
with:
16+
result-encoding: string
17+
script: return String(context.payload.sender.type === 'Bot' || context.payload.sender.login?.endsWith('[bot]'));
18+
1219
- name: First Interaction
20+
if: steps.bot-author-check.outputs.result != 'true'
1321
uses: actions/first-interaction@v3
1422
with:
1523
repo_token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)