Skip to content

feat: add Name to the human readable output of the list command#28

Merged
feloy merged 2 commits intokortex-hub:mainfrom
feloy:list-text-name
Mar 9, 2026
Merged

feat: add Name to the human readable output of the list command#28
feloy merged 2 commits intokortex-hub:mainfrom
feloy:list-text-name

Conversation

@feloy
Copy link
Contributor

@feloy feloy commented Mar 9, 2026

Adds the Name to the human-readable output of the workspace list command

@coderabbitai
Copy link

coderabbitai bot commented Mar 9, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d0a1ea4c-53bd-445c-b719-598815444002

📥 Commits

Reviewing files that changed from the base of the PR and between abcadf8 and 7d37fc4.

📒 Files selected for processing (2)
  • pkg/cmd/workspace_list.go
  • pkg/cmd/workspace_list_test.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • pkg/cmd/workspace_list.go

📝 Walkthrough

Walkthrough

Added a single line to workspace list output to print each workspace's "Name" (using instance.GetName()), and expanded tests to assert the presence of ID, Name, Sources, and Configuration substrings in various listing scenarios including JSON paths and aliases.

Changes

Cohort / File(s) Summary
Workspace list command & tests
pkg/cmd/workspace_list.go, pkg/cmd/workspace_list_test.go
Inserted an additional textual output line showing Name: <name> for each workspace. Tests updated to assert "ID: <id>", " Name: <name>", " Sources: <path>", and " Configuration: <path/.kortex>" across single, multiple, alias, and JSON-output scenarios.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: adding the Name field to human-readable output of the list command.
Description check ✅ Passed The description is directly related to the changeset, explaining that it adds the Name to the human-readable output of the workspace list command.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@pkg/cmd/workspace_list_test.go`:
- Around line 126-128: The test currently asserts the raw name via
addedInstance.GetName(), which can pass even if the formatted "Name:" line
regresses; update the assertions to check the labeled formatted output (e.g.
assert that the output contains "  Name: "+addedInstance.GetName()) instead of
just the raw name, and apply the same change to the other related assertions
that verify multi-workspace and alias-path output so they validate the exact
"Name:" and alias/path labeled lines coming from manager.List().

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 882dcc51-552d-40db-9f2f-05fb01edc5bc

📥 Commits

Reviewing files that changed from the base of the PR and between 2bcefa0 and abcadf8.

📒 Files selected for processing (2)
  • pkg/cmd/workspace_list.go
  • pkg/cmd/workspace_list_test.go

@feloy feloy requested review from benoitf and jeffmaury March 9, 2026 11:14
feloy and others added 2 commits March 9, 2026 13:53
Signed-off-by: Philippe Martin <phmartin@redhat.com>
Signed-off-by: Philippe Martin <phmartin@redhat.com>

Co-Authored-By: Claude Code (Claude Sonnet 4.5) <noreply@anthropic.com>
@feloy feloy merged commit f627344 into kortex-hub:main Mar 9, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants