Skip to content

Commit 74ab11f

Browse files
committed
Add sync-label check: PRs need the maintainer-applied 'sync' label
This repo is a read-only mirror of the internal source of truth; the only PRs that should merge are release syncs. The check fails unless the PR carries the 'sync' label (triage+ permission to apply), so a merge always requires a deliberate maintainer act. Temporary until release automation takes over merging. Signed-off-by: Hector Castejon Diaz <hector.castejon@databricks.com>
1 parent 8de8d38 commit 74ab11f

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

.github/workflows/sync-label.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# This repository is a read-only mirror; the only PRs that should
2+
# merge are the release sync PRs from the internal source of truth.
3+
# This check fails unless the PR carries the `sync` label, which only
4+
# maintainers can apply — making every merge a deliberate act.
5+
# Temporary guard until release automation takes over merging.
6+
name: Sync label
7+
8+
on:
9+
pull_request:
10+
types: [opened, reopened, synchronize, labeled, unlabeled]
11+
12+
jobs:
13+
sync-label:
14+
name: sync-label
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Require the `sync` label
18+
if: ${{ !contains(github.event.pull_request.labels.*.name, 'sync') }}
19+
run: |
20+
echo "::error::This PR does not carry the 'sync' label. This repository is a read-only mirror — only release sync PRs merge here. If this IS a release sync PR, a maintainer must apply the 'sync' label; community contributions are re-applied in the internal repository instead (see CONTRIBUTING.md)."
21+
exit 1
22+
- name: Label present
23+
if: ${{ contains(github.event.pull_request.labels.*.name, 'sync') }}
24+
run: echo "sync label present — this is a release sync PR."

0 commit comments

Comments
 (0)