ci: add code-freeze check to block non-sync-bot PRs#122
Open
simonfaltum wants to merge 1 commit into
Open
Conversation
This repo is becoming a read-only mirror fed one-way by the databricks-ci-ghec GitHub Apps. The code-freeze workflow fails any PR not authored by databricks-ci-ghec-1[bot] or databricks-ci-ghec-2[bot], and passes for the sync bots. It only hard-blocks once added as a required status check on the main ruleset; both sync apps are already bypass actors there, so their syncs are unaffected. Co-authored-by: Isaac Signed-off-by: simon <simon.faltum@databricks.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This repository is becoming a read-only mirror, synced one-way by the internal
databricks-ci-ghec-1/databricks-ci-ghec-2GitHub Apps. This adds acode-freezeworkflow that fails any pull request not authored by those sync bots, so direct contributions are rejected.Before: anyone with write access can open and merge PRs.
Now: every non-bot PR gets a red
code-freezecheck; the two sync apps pass.How it works
pull_requestandmerge_group(so it reports green to the merge queue and never stalls it).databricks-ci-ghec-1[bot]anddatabricks-ci-ghec-2[bot]; fails everyone else with a "read-only mirror" message.permissions: {}(no token scopes needed); it only reads the PR author from the event.Enforcement (follow-up)
The workflow only produces a check result. It hard-blocks merges only once
code-freezeis added as a required status check on themainruleset. Both sync apps are already bypass actors on that ruleset, so their syncs are unaffected. Repo admins also retain bypass.Documentation safety checklist
ALL PRIVILEGES, admin tokens, or broad scopes)This pull request and its description were written by Isaac.