Skip to content

Enable completion support for cli#5552

Merged
xoxys merged 3 commits into
woodpecker-ci:mainfrom
marcusramberg:marcus/completion
Sep 28, 2025
Merged

Enable completion support for cli#5552
xoxys merged 3 commits into
woodpecker-ci:mainfrom
marcusramberg:marcus/completion

Conversation

@marcusramberg

Copy link
Copy Markdown
Contributor

This PR enables the built in urfave autocomplete generator.

ref https://cli.urfave.org/v3/examples/completions/customizations/
I'm using the customization to ensure it's included in the help text.
Also skipping the setup check to ensure you can generate completion at install
time.

@qwerty287 qwerty287 added enhancement improve existing features cli labels Sep 27, 2025
@woodpecker-bot

woodpecker-bot commented Sep 27, 2025

Copy link
Copy Markdown
Contributor

Surge PR preview deployment succeeded. View it at https://woodpecker-ci-woodpecker-pr-5552.surge.sh

@codecov

codecov Bot commented Sep 27, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 19.54%. Comparing base (f819e3c) to head (8b5cbc5).
⚠️ Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
cmd/cli/app.go 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5552      +/-   ##
==========================================
+ Coverage   19.52%   19.54%   +0.01%     
==========================================
  Files         416      417       +1     
  Lines       39567    39581      +14     
==========================================
+ Hits         7726     7736      +10     
- Misses      31144    31147       +3     
- Partials      697      698       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@qwerty287

qwerty287 commented Sep 28, 2025

Copy link
Copy Markdown
Contributor

Thanks! Just for understanding, why don't we use the defaults and hide it?

PS: Added Norwegian to our Weblate as you requested.

@marcusramberg

Copy link
Copy Markdown
Contributor Author

Thanks! Just for understanding, why don't we use the defaults and hide it?

PS: Added Norwegian to our Weblate as you requested.

Thank you. My thinking was that it's better if it appears in the help menu if someone downloads the binary and wants to add completion for their shell. The completion help also includes specific instructions for each shell. If you prefer that it's hidden I can update the PR. I'm planning to do a update to the nix package as well to use the completion once it's in a release.

@xoxys xoxys enabled auto-merge (squash) September 28, 2025 18:21
@xoxys xoxys merged commit d894d3a into woodpecker-ci:main Sep 28, 2025
7 checks passed
@woodpecker-bot woodpecker-bot mentioned this pull request Sep 28, 2025
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli enhancement improve existing features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants