mirror of
https://github.com/immich-app/immich.git
synced 2025-08-11 09:16:31 -04:00
chore: fork PRs can't have previews (#20464)
* chore: fork PRs can't have previews * chore: fix formatting * chore: different close message for fork PRs --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
parent
89522daaac
commit
1283491cc2
14
.github/workflows/preview-label.yaml
vendored
14
.github/workflows/preview-label.yaml
vendored
@ -20,7 +20,7 @@ jobs:
|
|||||||
|
|
||||||
remove-label:
|
remove-label:
|
||||||
runs-on: ubuntu-latest
|
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:
|
permissions:
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
steps:
|
steps:
|
||||||
@ -33,3 +33,15 @@ jobs:
|
|||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
name: 'preview'
|
name: 'preview'
|
||||||
})
|
})
|
||||||
|
|
||||||
|
- uses: mshick/add-pr-comment@b8f338c590a895d50bcbfa6c5859251edc8952fc # v2.8.2
|
||||||
|
if: ${{ github.event.pull_request.head.repo.fork }}
|
||||||
|
with:
|
||||||
|
message-id: 'preview-status'
|
||||||
|
message: 'PRs from forks cannot have preview environments.'
|
||||||
|
|
||||||
|
- uses: mshick/add-pr-comment@b8f338c590a895d50bcbfa6c5859251edc8952fc # v2.8.2
|
||||||
|
if: ${{ !github.event.pull_request.head.repo.fork }}
|
||||||
|
with:
|
||||||
|
message-id: 'preview-status'
|
||||||
|
message: 'Preview environment has been removed.'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user