feat: install shell completions for mergify-cli#25
Merged
Conversation
mergify-cli 2026.6.25.1 added a `mergify completions <shell>` command (clap_complete) that prints bash/zsh/fish/elvish/powershell scripts to stdout. Wire it into the formula via `generate_completions_from_executable` so `brew install` ships first-class completions instead of leaving users to generate and source them by hand. The command is pure clap introspection — no network or async runtime — so it's safe to invoke at install time. Add a `test do` assertion covering it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Change-Id: Iabd8eb510f60619f334cb7506bb6c55144d21d2a
Merge Protections🟢 All 6 merge protections satisfied — ready to merge. Show 6 satisfied protections🟢 🤖 Continuous Integration
🟢 👀 Review Requirements
🟢 Enforce conventional commitMake sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
🟢 🔎 Reviews
🟢 📕 PR description
🟢 🚦 Auto-queueWhen all merge protections are satisfied, this pull request will be queued automatically. |
There was a problem hiding this comment.
Pull request overview
This PR updates the mergify-cli Homebrew formula to automatically generate and install shell completions during brew install, leveraging the CLI’s new mergify completions <shell> subcommand.
Changes:
- Generate bash/zsh/fish completions at install time via
generate_completions_from_executable. - Add a formula test asserting the zsh completion output contains the expected
#compdefheader.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
remyduthu
approved these changes
Jun 25, 2026
sileht
approved these changes
Jun 25, 2026
|
Queued — the merge queue status continues in this comment ↓. |
Merge Queue Status
This pull request spent 9 seconds in the queue, including 2 seconds running CI. Required conditions to merge
|
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.
What
Wire
mergify-cli's newmergify completions <shell>command into the formula sobrew installships first-class shell completions (bash/zsh/fish) automatically — no more asking users to generate and source them by hand.Why now
mergify-cli2026.6.25.1(just bumped in #24) added acompletionssubcommand backed byclap_complete:It's pure clap introspection — it prints the script to stdout with no network or async runtime — so it's safe to invoke at install time.
generate_completions_from_executable(bin/"mergify", "completions")matches that CLI shape exactly (it runsmergify completions {bash,zsh,fish}).This had to land after #24: the previous pinned release (
2026.6.18.1) had nocompletionscommand, so the install-time call would have failed.Test
Added a
test doassertion:Verified locally against the real
2026.6.25.1aarch64-apple-darwin binary (checksum matchesSHA256SUMS);brew stylepasses clean.🤖 Generated with Claude Code