Skip to content

Commit 4d7db10

Browse files
authored
CI - PR approval check skips for external PRs (properly this time) (#4611)
# Description of Changes #4604 skipped the check run for external PRs, but because it needs to post a separate commit status (see #4578), this was not the right solution. We need to _run_ the check but trivially post a success on external PRs. Sigh. # API and ABI breaking changes None. # Expected complexity level and risk 1 # Testing I don't know how to test github workflows. Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
1 parent 408e54f commit 4d7db10

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/pr_approval_check.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ jobs:
2020
publish-approval-status:
2121
name: Set approval status
2222
runs-on: ubuntu-latest
23-
if: ${{ github.event_name != 'pull_request' || !github.event.pull_request.head.repo.fork }}
2423

2524
steps:
2625
- name: Evaluate and publish approval status
@@ -42,7 +41,10 @@ jobs:
4241
const pr = context.payload.pull_request;
4342
targetSha = pr.head.sha;
4443
45-
if (pr.user.login !== "clockwork-labs-bot") {
44+
if (pr.head.repo.fork) {
45+
state = "success";
46+
description = "Skipped for external PR";
47+
} else if (pr.user.login !== "clockwork-labs-bot") {
4648
state = "success";
4749
description = "PR author is not clockwork-labs-bot";
4850
} else {

0 commit comments

Comments
 (0)