Skip to content

Commit

Permalink
Better anti-bot recursion
Browse files Browse the repository at this point in the history
  • Loading branch information
Pandapip1 authored and RaphaelHardFork committed Jan 30, 2024
1 parent c6d4bae commit 4f44abb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/auto-review-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,19 @@ jobs:
runs-on: ubuntu-latest
name: Trigger
steps:
- name: Stop Bot Recursion
run: exit 1
if: (endsWith(github.event.sender.login, '-bot') || endsWith(github.event.sender.login, '[bot]')) && github.event.sender.login != 'renovate[bot]'

- name: Write PR Number - PR Target
run: echo $PR_NUMBER > pr-number.txt
if: github.event_name == 'pull_request_target' && ((!endsWith(github.event.sender.login, '-bot') && !endsWith(github.event.sender.login, '[bot]')) || github.event.sender.login == 'renovate[bot]')
if: github.event_name == 'pull_request_target'
env:
PR_NUMBER: ${{ github.event.number }}

- name: Write PR Number - PR Review
run: echo $PR_NUMBER > pr-number.txt
if: github.event_name == 'pull_request_review' && !endsWith(github.event.sender.login, '-bot') && !endsWith(github.event.sender.login, '[bot]')
if: github.event_name == 'pull_request_review'
env:
PR_NUMBER: ${{ github.event.pull_request.number }}

Expand Down

0 comments on commit 4f44abb

Please sign in to comment.