Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/pr-guardrails.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: PR Guardrails

# Thin, generic trigger. All guardrail logic lives in the central collection
# pimcore/workflows-collection-public. This file names no guardrails and no
# secrets (secrets: inherit), so it is identical across every repo and never
# needs editing when a guardrail or token is added/removed there.

on:
pull_request_target:
types: [opened, reopened, ready_for_review, converted_to_draft, edited, synchronize]
check_suite:
types: [completed]
Comment on lines +11 to +12

concurrency:
# One lock per PR. On pull_request_target → PR number. On check_suite there is
# no PR number, so use the PR from the check_suite payload (present for
# same-repo PRs) to share the same lock; fall back to the commit SHA for fork
# PRs, then to run_id so the key is never empty.
# A guardrail can convert the PR to draft, which fires converted_to_draft;
# give that its own group so it does not cancel the run still acting on the PR.
group: pr-guardrails-${{ github.event.action == 'converted_to_draft' && 'retract-' || '' }}${{ github.event.pull_request.number || github.event.check_suite.pull_requests[0].number || github.event.check_suite.head_sha || github.run_id }}
cancel-in-progress: true

jobs:
guardrails:
uses: pimcore/workflows-collection-public/.github/workflows/parent-pr-guardrails.yml@main
secrets:
MEMBERSHIP_GUARD_TOKEN: ${{ secrets.MEMBERSHIP_GUARD_TOKEN }}
ISSUE_LINK_GUARD_TOKEN: ${{ secrets.ISSUE_LINK_GUARD_TOKEN }}
CI_GUARD_TOKEN: ${{ secrets.CI_GUARD_TOKEN }}
Comment on lines +27 to +30
Loading