Skip to content
Merged
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
38 changes: 13 additions & 25 deletions .github/workflows/pr-policy.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: PR Policy

# Enforces PR requirements before merge. Make the "Milestone assigned" check required
# (repo ruleset / branch protection) so it actually blocks merging.
# Thin caller — the policy logic lives in
# pimcore/workflows-collection-public/.github/workflows/reusable-pr-policy.yml
# and changes there apply automatically. Make the "PR Policy / Milestone assigned"
# check required (repo ruleset / branch protection) so it actually blocks merging.

on:
pull_request:
Expand All @@ -12,31 +14,17 @@ on:
- ready_for_review
- milestoned
- demilestoned
- labeled
- unlabeled

permissions:
contents: read

jobs:
milestone:
name: Milestone assigned
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest

steps:
- name: Check milestone
env:
MILESTONE: ${{ github.event.pull_request.milestone.title }}
AUTHOR: ${{ github.event.pull_request.user.login }}
run: |
# Automated sync PRs (repo-file-sync-action) never carry a milestone.
if [ "$AUTHOR" = "pimcore-deployments" ]; then
echo "Skipping milestone check for automated PR by $AUTHOR"
exit 0
fi
concurrency:
group: pr-policy-${{ github.event.pull_request.number }}
cancel-in-progress: true

if [ -z "$MILESTONE" ]; then
echo "::error::A milestone must be assigned before this pull request can be merged."
exit 1
fi

echo "Milestone assigned: $MILESTONE"
jobs:
pr-policy:
name: PR Policy
uses: pimcore/workflows-collection-public/.github/workflows/reusable-pr-policy.yml@main
Loading