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

Add links and alignment functionality to the CLI formatter tooling #3327

Merged
merged 3 commits into from
Oct 1, 2024

Conversation

renanrodrigo
Copy link
Member

@renanrodrigo renanrodrigo commented Sep 30, 2024

Why is this needed?

This PR solves all of our problems because it implements some needed niceties on top of the CLI tools we are working on.

This is based on #3323 and should be merged after that. (It is the same context though, I didn't push the commits there because that one is kinda approved I guess)

Test Steps

Unit tests cover functionality, integration will come because the new CLI commands depend on this.


  • (un)check this to re-run the checklist action

Copy link

github-actions bot commented Sep 30, 2024

PR Checklist

How to use this checklist

How to use this checklist

PR Author

For each section, check a box when it is true.
Uncheck a box if it becomes un-true.
Then check the box at the bottom of the PR description to re-run the action that creates this checklist.
The action that creates and updates this comment will retain your edits.
The action will fail if the checklist is not completed.

PR Reviewer

Check that the PR checklist action did not fail.
Double check that the author filled out the checklist accurately.
If you disagree with a checklist item, start a conversation.
For example, the author may say they don't think integration tests are necessary, but you may disagree.

Bug References

None.

Confirm

  • I've properly referenced all bugs that this PR fixes
How to properly reference fixed bugs
  • If this PR is related to a Jira item, include an SC-1234 reference in the PR title
  • If this PR is fixes a GitHub issue, include a Fixes: #1234 reference in the commit that fixes the issue
  • If this PR is fixes a Launchpad bug, include a LP: #12345678 reference in the commit that fixes the issue

Test Updates

Unit Tests

  • I have updated or added any unit tests accordingly
  • No unit test changes are necessary for this change

Integration Tests

  • I have updated or added any integration tests accordingly
  • No integration test changes are necessary for this change

Documentation

  • Changes here need to be documented and I have referenced the docs PR in the description
  • No documentation updates are necessary for this change

Does this PR require review from someone outside the core ubuntu-pro-client team?

  • Yes, and I have requested those reviews via GitHub
  • No

@renanrodrigo renanrodrigo changed the title More cli and such Add links and alignment functionality to the CLI formatter tooling Sep 30, 2024
@renanrodrigo
Copy link
Member Author

Bad, bad Fix CI

Some of our tables may have columns which are right-aligned instead of
left-aligned. None of them are centered yet but this would follow
easily if we need it.

Signed-off-by: Renan Rodrigo <[email protected]>
Add a function to create rendered links for the terminal, and logic
to ignore anything but the text when calculating the length or
printing to a non-tty stdout

Signed-off-by: Renan Rodrigo <[email protected]>
Copy link
Collaborator

@orndorffgrant orndorffgrant left a comment

Choose a reason for hiding this comment

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

LGTM thanks!

@orndorffgrant orndorffgrant merged commit ae50645 into main Oct 1, 2024
19 of 24 checks passed
@orndorffgrant orndorffgrant deleted the more-cli-and-such branch October 1, 2024 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants