Skip to content

CLI: Allow single output template#5882

Merged
qwerty287 merged 7 commits into
woodpecker-ci:mainfrom
qwerty287:single-output-tmpl
Jan 20, 2026
Merged

CLI: Allow single output template#5882
qwerty287 merged 7 commits into
woodpecker-ci:mainfrom
qwerty287:single-output-tmpl

Conversation

@qwerty287

Copy link
Copy Markdown
Contributor

closes #5841

@qwerty287 qwerty287 requested a review from a team December 19, 2025 11:26
@qwerty287 qwerty287 added enhancement improve existing features cli labels Dec 19, 2025
@woodpecker-bot

woodpecker-bot commented Dec 19, 2025

Copy link
Copy Markdown
Contributor

Surge PR preview deployment was removed

@anbraten

Copy link
Copy Markdown
Member

As there is already a way to achieve this without any unusual workaround, the FR would be a no fix for me. Especially as we would need to add similar functions to all other commands for consistency again.

@xoxys

xoxys commented Dec 19, 2025

Copy link
Copy Markdown
Member

Can you explain why adding this as additional output format is bad? Yes this would need to be added to all other cli commands. However, we could move this to an output package to avoid code duplication but I dont see why we should not add it at all.

Comment thread cli/repo/repo.go
@qwerty287

Copy link
Copy Markdown
Contributor Author

@anbraten are you still against this change? Or can we continue and merge this?

@anbraten

anbraten commented Jan 8, 2026

Copy link
Copy Markdown
Member

I'm still not quite convinded that it's worth the code as you can already achieve the same formatting. And writing --output 'go-template={{range . }}{{printf "%d %s %s\n" .ID .Name .FullName}}{{end -}}' vs --output 'go-format={{printf "%d %s %s" .ID .Name .FullName}}' is not really that much of an issue IMO 🤔

@qwerty287

Copy link
Copy Markdown
Contributor Author

I also don't really think it's a big issue, but I can understand it… I mainly opened this PR to fix the issue, not because I need it. So from my side we can also close the issue as wontfix. But I also don't think adding this hurts.
@xoxys what do you think?

@xoxys

xoxys commented Jan 10, 2026

Copy link
Copy Markdown
Member

We maintain dead code (e.g. encryption) and many other rarely used code and this one is pretty trivial and easy to maintain, so add it. If you dont want to I can take over to finish it.

@qwerty287

Copy link
Copy Markdown
Contributor Author

What is to finish here? From my side this was ready to merge

@xoxys

xoxys commented Jan 10, 2026

Copy link
Copy Markdown
Member

Needs to be added to all commands that support custom outputs already.

@qwerty287

Copy link
Copy Markdown
Contributor Author

@xoxys added it for the pipelines as well.

@qwerty287 qwerty287 changed the title Allow output template with single repos Allow single output template Jan 19, 2026
@xoxys

xoxys commented Jan 19, 2026

Copy link
Copy Markdown
Member

Can you please also add the test case to repo_test?

@qwerty287

Copy link
Copy Markdown
Contributor Author

@anbraten As you're the only one who's against this, can we merge this?

@qwerty287 qwerty287 merged commit a5e0af2 into woodpecker-ci:main Jan 20, 2026
7 checks passed
@qwerty287 qwerty287 deleted the single-output-tmpl branch January 20, 2026 11:57
@woodpecker-bot woodpecker-bot mentioned this pull request Jan 20, 2026
1 task
@6543 6543 changed the title Allow single output template CLI: Allow single output template Jan 28, 2026
@woodpecker-bot woodpecker-bot mentioned this pull request Apr 1, 2026
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.

add simpler repo output format in cli

5 participants