Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sanitize strings in table output #4466

Merged
merged 2 commits into from
Nov 26, 2024
Merged

Sanitize strings in table output #4466

merged 2 commits into from
Nov 26, 2024

Conversation

xoxys
Copy link
Member

@xoxys xoxys commented Nov 26, 2024

Some commit messages contain newlines. While this might be a server issue, we should sanitize the output anyway.

Before:

❯ ./dist/woodpecker-cli pipeline ls --output table 14
NUMBER  STATUS   EVENT  BRANCH  MESSAGE  AUTHOR
13      success  push   main    trigger ci
        woodpecker
12      success  push  main  trigger ci

After:

❯ ./dist/woodpecker-cli pipeline ls --output table 14
NUMBER  STATUS   EVENT   BRANCH  MESSAGE                 AUTHOR
13      success  push    main    trigger ci              woodpecker
12      success  push    main    trigger ci              woodpecker

@xoxys xoxys requested a review from a team November 26, 2024 20:13
@xoxys xoxys added bug Something isn't working cli labels Nov 26, 2024
@woodpecker-bot
Copy link
Contributor

woodpecker-bot commented Nov 26, 2024

Deployment of preview was torn down

Copy link

codecov bot commented Nov 26, 2024

Codecov Report

Attention: Patch coverage is 87.50000% with 1 line in your changes missing coverage. Please review.

Project coverage is 27.99%. Comparing base (bf1750a) to head (c898e4e).
Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
cli/output/table.go 87.50% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4466      +/-   ##
==========================================
+ Coverage   27.94%   27.99%   +0.04%     
==========================================
  Files         383      384       +1     
  Lines       28044    28052       +8     
==========================================
+ Hits         7837     7852      +15     
+ Misses      19519    19511       -8     
- Partials      688      689       +1     

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

@6543 6543 merged commit 7cedda7 into main Nov 26, 2024
9 checks passed
@6543 6543 deleted the fix-cli-table branch November 26, 2024 21:15
@woodpecker-bot woodpecker-bot mentioned this pull request Nov 26, 2024
1 task
@woodpecker-bot woodpecker-bot mentioned this pull request Dec 14, 2024
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cli
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants