Skip to content

Commit 5b46eb5

Browse files
ci: exclude bots in pr-sort.yml
1 parent e8ebc1b commit 5b46eb5

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/pr-sort.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,14 @@ jobs:
2323
process-changes:
2424
runs-on: ubuntu-latest
2525
# Only check for merged PR when triggered by a pull_request event
26-
if: github.event_name != 'pull_request' || github.event.pull_request.merged == true
26+
# And skip if PR was merged by a bot
27+
if: >-
28+
(github.event_name != 'pull_request' ||
29+
(github.event.pull_request.merged == true &&
30+
!contains(github.event.pull_request.user.login, '[bot]') &&
31+
!contains(github.event.pull_request.user.login, '-bot') &&
32+
github.event.pull_request.user.login != 'dependabot' &&
33+
github.event.pull_request.user.login != 'github-actions'))
2734
steps:
2835
- name: Checkout repository
2936
uses: actions/checkout@v4

0 commit comments

Comments
 (0)