Skip to content

chore: initial commit for new commands#46

Open
general-maximus-decimus wants to merge 3 commits into
mainfrom
r/release.29.06.2026.stallion-cli-commands
Open

chore: initial commit for new commands#46
general-maximus-decimus wants to merge 3 commits into
mainfrom
r/release.29.06.2026.stallion-cli-commands

Conversation

@general-maximus-decimus

@general-maximus-decimus general-maximus-decimus commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

⚠️ Automated review could not be completed. The AI analysis encountered an error. Please review this PR manually.


Generated by StallionDevX

@stalliondevx stalliondevx Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🤖 StallionDevX AI Review

Quality Score: ░░░░░░░░░░ 0/100

Verdict: comment

Summary

⚠️ Automated review could not be completed. The AI analysis encountered an error. Please review this PR manually.

@stalliondevx stalliondevx Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🤖 StallionDevX AI Review

Quality Score: ░░░░░░░░░░ 0/100

Verdict: comment

Summary

⚠️ Automated review could not be completed. The AI analysis encountered an error. Please review this PR manually.

@stalliondevx stalliondevx Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🤖 StallionDevX AI Review

Quality Score: ██████████ 95/100

Verdict: approve

Summary

This pull request introduces a significant set of new commands for listing resources (organizations, projects, buckets, bundles, releases) and managing CLI context. It also includes a major overhaul of the command-line interface's branding and user experience, moving to a new UI module and @inquirer/prompts. The architectural changes, particularly the user-client.ts module, centralize logic for resolving context and making authenticated API calls, which is a good improvement for maintainability. Overall, the changes are well-structured and enhance the CLI's functionality and usability.

⚠️ Warning (2)

  • 🧹 Untyped API Response Datasrc/api/user-client.ts:129
    The API responses for ENDPOINTS.PROJECT.LIST and ENDPOINTS.BUCKET.LIST are typed as any[]. This reduces type safety and makes the code harder to maintain and refactor, as the structure of p and b objects is inferred at runtime.
  • 🧹 Hardcoded Default Region 'ap'src/api/user-client.ts:13
    The default region 'ap' is hardcoded as a fallback when parsing the CI token region or retrieving it from the context. While 'ap' might be the primary region, hardcoding it could lead to issues if the CLI is used in environments where 'ap' is not the default or if a token/context genuinely lacks region information and a different default is expected.

Comment thread src/api/user-client.ts
/**
* Resolve a project id. Precedence: explicit flag > saved context (when it
* belongs to this org) > interactive pick. An interactive pick is saved back
* to the context. Pass useSaved: false to force a fresh pick.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ WARNING | 🧹 maintainability

Untyped API Response Data

The API responses for ENDPOINTS.PROJECT.LIST and ENDPOINTS.BUCKET.LIST are typed as any[]. This reduces type safety and makes the code harder to maintain and refactor, as the structure of p and b objects is inferred at runtime.

Suggested change
* to the context. Pass useSaved: false to force a fresh pick.
Define specific TypeScript interfaces (e.g., `ProjectSummary`, `BucketSummary`) for the expected structure of project and bucket objects returned by the API. Update the `client.post` calls to use these interfaces, for example: `client.post<{ data: ProjectSummary[] }>(...)`.

Comment thread src/api/user-client.ts
/**
* Build an ApiClient authenticated with a CI token (x-ci-token). Region is
* derived from the token itself. Used by the non-interactive --ci-token path of
* the project-scoped read commands.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ WARNING | 🧹 maintainability

Hardcoded Default Region 'ap'

The default region 'ap' is hardcoded as a fallback when parsing the CI token region or retrieving it from the context. While 'ap' might be the primary region, hardcoding it could lead to issues if the CLI is used in environments where 'ap' is not the default or if a token/context genuinely lacks region information and a different default is expected.

Suggested change
* the project-scoped read commands.
Consider making the default region configurable (e.g., via an environment variable or a global CLI config) or ensure that all tokens and context entries always contain a valid region to avoid relying on a hardcoded fallback.

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.

1 participant