Skip to content

feat: install shell completions for mergify-cli#25

Merged
mergify[bot] merged 1 commit into
mainfrom
devs/kozlek/shell-completions
Jun 25, 2026
Merged

feat: install shell completions for mergify-cli#25
mergify[bot] merged 1 commit into
mainfrom
devs/kozlek/shell-completions

Conversation

@kozlek

@kozlek kozlek commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

What

Wire mergify-cli's new mergify completions <shell> command into the formula so brew install ships first-class shell completions (bash/zsh/fish) automatically — no more asking users to generate and source them by hand.

def install
  bin.install "mergify"
  generate_completions_from_executable(bin/"mergify", "completions")
end

Why now

mergify-cli 2026.6.25.1 (just bumped in #24) added a completions subcommand backed by clap_complete:

$ mergify completions --help
Usage: mergify completions [OPTIONS] <SHELL>
  <SHELL>  ... [possible values: bash, elvish, fish, powershell, zsh]

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 runs mergify completions {bash,zsh,fish}).

This had to land after #24: the previous pinned release (2026.6.18.1) had no completions command, so the install-time call would have failed.

Test

Added a test do assertion:

assert_match "#compdef mergify", shell_output("#{bin}/mergify completions zsh")

Verified locally against the real 2026.6.25.1 aarch64-apple-darwin binary (checksum matches SHA256SUMS); brew style passes clean.

🤖 Generated with Claude Code

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
Copilot AI review requested due to automatic review settings June 25, 2026 09:30
@mergify mergify Bot deployed to Mergify Merge Protections June 25, 2026 09:30 Active
@mergify

mergify Bot commented Jun 25, 2026

Copy link
Copy Markdown

Merge Protections

🟢 All 6 merge protections satisfied — ready to merge.

Show 6 satisfied protections

🟢 🤖 Continuous Integration

  • check-success = all-greens

🟢 👀 Review Requirements

  • #approved-reviews-by >= 2

🟢 Enforce conventional commit

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert|ui)(?:\(.+\))?:

🟢 🔎 Reviews

  • #changes-requested-reviews-by = 0
  • #review-requested = 0
  • #review-threads-unresolved = 0

🟢 📕 PR description

  • body ~= (?ms:.{48,})

🟢 🚦 Auto-queue

When all merge protections are satisfied, this pull request will be queued automatically.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 #compdef header.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@kozlek kozlek requested a review from a team June 25, 2026 09:38
@kozlek kozlek requested a review from a team June 25, 2026 11:45
@mergify

mergify Bot commented Jun 25, 2026

Copy link
Copy Markdown

Queued — the merge queue status continues in this comment ↓.

@mergify

mergify Bot commented Jun 25, 2026

Copy link
Copy Markdown

Merge Queue Status

  • Entered queue2026-06-25 11:47 UTC · Rule: default · triggered by merge protections
  • Checks skipped · PR is already up-to-date
  • Merged2026-06-25 11:47 UTC · at 642fd9a883b2273ca46ce309e8b17fec1954c3bf · squash

This pull request spent 9 seconds in the queue, including 2 seconds running CI.

Required conditions to merge

@mergify mergify Bot added the queued label Jun 25, 2026
@mergify mergify Bot merged commit 3396f9c into main Jun 25, 2026
8 checks passed
@mergify mergify Bot removed the queued label Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants