From 467797ac10d116a4fd6c9a88f0ef322a9d2df867 Mon Sep 17 00:00:00 2001 From: bo0tzz Date: Thu, 31 Jul 2025 14:11:21 +0200 Subject: [PATCH] chore: fork PRs can't have previews --- .github/workflows/preview-label.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/preview-label.yaml b/.github/workflows/preview-label.yaml index edd9dfdae9..b8242ab4ba 100644 --- a/.github/workflows/preview-label.yaml +++ b/.github/workflows/preview-label.yaml @@ -20,7 +20,7 @@ jobs: remove-label: runs-on: ubuntu-latest - if: ${{ github.event.action == 'closed' && contains(github.event.pull_request.labels.*.name, 'preview') }} + if: ${{ (github.event.action == 'closed' || github.event.pull_request.head.repo.fork) && contains(github.event.pull_request.labels.*.name, 'preview') }} permissions: pull-requests: write steps: @@ -33,3 +33,8 @@ jobs: repo: context.repo.repo, name: 'preview' }) + + - uses: mshick/add-pr-comment@b8f338c590a895d50bcbfa6c5859251edc8952fc # v2.8.2 + with: + message-id: 'preview-status' + message: 'Preview environment has been removed.'