Skip to content

Commit a50f346

Browse files
authored
Check fork PRs before running coverage (#8487)
1 parent 6a81713 commit a50f346

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/test_coverage.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ jobs:
263263
with:
264264
fetch-depth: 0
265265
- name: Access to Metrics Service
266-
if: ${{ env.METRICS_SERVICE_SECRET != '' }} && (github.event.action != 'closed' || github.event.pull_request.merged)
266+
if: github.event.pull_request.head.repo.full_name == github.repository && (github.event.action != 'closed' || github.event.pull_request.merged)
267267
run: |
268268
# Install gcloud sdk
269269
curl https://sdk.cloud.google.com > install.sh
@@ -280,7 +280,7 @@ jobs:
280280
with:
281281
path: /Users/runner/test
282282
- name: Compare Diff and Post a Report
283-
if: github.event.pull_request.merged != true && github.event.action != 'closed' && env.METRICS_SERVICE_SECRET != ''
283+
if: github.event.pull_request.merged != true && github.event.action != 'closed' && github.event.pull_request.head.repo.full_name == github.repository
284284
env:
285285
base_commit: ${{ github.event.pull_request.base.sha }}
286286
run: |
@@ -315,7 +315,7 @@ jobs:
315315
bundle exec ruby post_incremental_coverage_in_pr.rb
316316
fi
317317
- name: Update New Coverage Data
318-
if: github.event.pull_request.merged && env.METRICS_SERVICE_SECRET != ''
318+
if: github.event.pull_request.merged && github.event.pull_request.head.repo.full_name == github.repository
319319
run: |
320320
if [ -d "${{steps.download.outputs.download-path}}" ]; then
321321
cd scripts/code_coverage_report/generate_code_coverage_report

0 commit comments

Comments
 (0)