Skip to content

Commit ac22dae

Browse files
committed
docs: filter bot PRs in examples
1 parent ea962de commit ac22dae

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,10 @@ on:
7474
jobs:
7575
analyze:
7676
runs-on: ubuntu-latest
77-
# Skip if already labeled
78-
if: "!contains(github.event.pull_request.labels.*.name, 'skip-review')"
77+
# Skip if already labeled or opened by a bot account
78+
if: |
79+
\!contains(github.event.pull_request.labels.*.name, 'skip-review') &&
80+
github.event.pull_request.user.type == 'User' # Exclude bot-created PRs
7981
8082
permissions:
8183
contents: read

examples/workflow.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@ jobs:
1818
name: Analyze PR for Skip-Review
1919
runs-on: ubuntu-latest
2020

21-
# Skip if PR already has the skip-review label
22-
if: "!contains(github.event.pull_request.labels.*.name, 'skip-review')"
21+
# Skip if PR already labeled or opened by a bot account
22+
if: |
23+
\!contains(github.event.pull_request.labels.*.name, 'skip-review') &&
24+
github.event.pull_request.user.type == 'User' # Exclude bot-created PRs
2325
2426
permissions:
2527
contents: read

0 commit comments

Comments
 (0)