Skip to content

ci: Disable GitHub merge button (maintainers land changes via Copybara)#6086

Closed
Jacksunwei wants to merge 4 commits into
mainfrom
ci/block-github-merge
Closed

ci: Disable GitHub merge button (maintainers land changes via Copybara)#6086
Jacksunwei wants to merge 4 commits into
mainfrom
ci/block-github-merge

Conversation

@Jacksunwei

@Jacksunwei Jacksunwei commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds .github/workflows/block-merge.yml, an always-failing check that keeps the GitHub merge button disabled on every PR.
  • Maintainers land changes internally and Copybara syncs them back to this repo; PRs are not merged through the GitHub UI.
  • The job runs standalone (no needs: dependents) so it does not block or cancel other CI checks — they still run and report normally.

On the PR page the check appears as:

Do Not Merge on GitHub / Do not merge — maintainers land changes via Copybara

with the annotation:

Do NOT merge this pull request on GitHub. A maintainer will land the change internally, and Copybara will sync it back to this repository automatically.

Follow-up (manual, GitHub UI)

After this merges, create a branch ruleset to require the check:

  1. Settings → Rules → Rulesets → New branch ruleset
  2. Name: Block GitHub Merge, Enforcement: Active
  3. Target branches → Include default branch
  4. Rules → Require status checks to pass → add check Do not merge — maintainers land changes via Copybara
  5. Create

The check name appears in the picker after this workflow runs once; otherwise type it manually.

Test plan

  • Confirm the merge-block check appears and fails on this PR
  • Confirm other CI checks still run and report independently
  • After ruleset is added, confirm the merge button is grayed out

Adds an always-failing required check so the GitHub merge button stays
disabled on every PR. Changes are submitted through Piper CL, not merged
via GitHub. The job runs standalone and does not block or gate other CI
checks; it only keeps the merge button grayed out via a branch ruleset
that requires this check.

Change-Id: I28524399b467cd5c2c237331c6ea85e71d1ddc94
@adk-bot adk-bot added the tools [Component] This issue is related to tools label Jun 11, 2026
Rename the workflow and job so the PR checks row reads as an instruction
("Do Not Merge on GitHub / Submit via Piper CL"), and expand the error
annotation to explain the mirror/Piper flow.

Change-Id: I1fa1408bed9dab4cc4b49434183776006f011417
Update the check name and annotation to clarify that maintainers land
changes internally and Copybara syncs them back, rather than merging on
GitHub.

Change-Id: I7add290fcc17125014ebcbee5ce00d02fd359f17
@Jacksunwei Jacksunwei changed the title ci: Disable GitHub merge button to enforce Piper-only submission ci: Disable GitHub merge button (maintainers land changes via Copybara) Jun 11, 2026
Rename the job so the PR check row reads "Do Not Merge on GitHub /
maintainers will submit via Copybara".

Change-Id: I6b186ef0e02fd189edb5d8db071429fb61dda72f
copybara-service Bot pushed a commit that referenced this pull request Jun 11, 2026
Merge #6086

## Summary
- Adds `.github/workflows/block-merge.yml`, an always-failing check that keeps the GitHub merge button disabled on every PR.
- Maintainers land changes internally and Copybara syncs them back to this repo; PRs are not merged through the GitHub UI.
- The job runs standalone (no `needs:` dependents) so it does **not** block or cancel other CI checks — they still run and report normally.

On the PR page the check appears as:

> **Do Not Merge on GitHub / Do not merge — maintainers land changes via Copybara**

with the annotation:

> Do NOT merge this pull request on GitHub. A maintainer will land the change internally, and Copybara will sync it back to this repository automatically.

## Follow-up (manual, GitHub UI)
After this merges, create a branch ruleset to require the check:
1. Settings → Rules → Rulesets → **New branch ruleset**
2. Name: `Block GitHub Merge`, Enforcement: **Active**
3. Target branches → **Include default branch**
4. Rules → **Require status checks to pass** → add check **`Do not merge — maintainers land changes via Copybara`**
5. **Create**

The check name appears in the picker after this workflow runs once; otherwise type it manually.

## Test plan
- [ ] Confirm the merge-block check appears and fails on this PR
- [ ] Confirm other CI checks still run and report independently
- [ ] After ruleset is added, confirm the merge button is grayed out

Co-authored-by: Wei Sun (Jack) <weisun@google.com>
COPYBARA_INTEGRATE_REVIEW=#6086 from google:ci/block-github-merge 587a03a
PiperOrigin-RevId: 930808152
@adk-bot

adk-bot commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

Thank you @Jacksunwei for your contribution! 🎉

Your changes have been successfully imported and merged via Copybara in commit f4743cd.

Closing this PR as the changes are now in the main branch.

@adk-bot adk-bot added the merged [Status] This PR is merged label Jun 11, 2026
@adk-bot adk-bot closed this Jun 11, 2026
@Jacksunwei Jacksunwei deleted the ci/block-github-merge branch June 13, 2026 05:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged [Status] This PR is merged tools [Component] This issue is related to tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants