Skip to content

Commit 2883b5b

Browse files
committed
Fix conditions in pr-checks workflow
1 parent ba79a4f commit 2883b5b

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

‎.github/workflows/pr-checks.yml‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -148,12 +148,11 @@ jobs:
148148
149149
- name: Fetch base commit
150150
id: fetch-base
151-
# Forks and Dependabot PRs don't have permission to write comments, so skip the repo size
152-
# check in those cases.
151+
# Skip this (and subsequent steps) if the PR originates from a fork, since this workflow
152+
# won't have the necessary permissions to post comments on the PR.
153153
if: >-
154154
github.event_name == 'pull_request' &&
155-
github.event.pull_request.head.repo.full_name == github.repository &&
156-
github.event.pull_request.user.login != 'dependabot[bot]'
155+
github.event.pull_request.head.repo.full_name == github.repository
157156
env:
158157
BASE_SHA: ${{ github.event.pull_request.base.sha }}
159158
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
@@ -212,7 +211,7 @@ jobs:
212211
if: >-
213212
github.event_name == 'pull_request' &&
214213
github.event.pull_request.head.repo.full_name == github.repository &&
215-
github.event.pull_request.user.login != 'dependabot[bot]' &&
214+
github.triggering_actor != 'dependabot[bot]' &&
216215
needs.other-checks.result == 'success'
217216
permissions:
218217
contents: read

0 commit comments

Comments
 (0)