Skip to content

Refactoring#78

Open
kostyanf14 wants to merge 14 commits into
masterfrom
refactoring
Open

Refactoring#78
kostyanf14 wants to merge 14 commits into
masterfrom
refactoring

Conversation

@kostyanf14
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings May 27, 2026 11:47
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@gemini-code-assist
Copy link
Copy Markdown

Warning

Gemini encountered an error creating the review. You can try again by commenting /gemini review.

@kostyanf14
Copy link
Copy Markdown
Contributor Author

/gemini review

@kostyanf14 kostyanf14 requested a review from Copilot May 27, 2026 11:50
@gemini-code-assist
Copy link
Copy Markdown

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread tools/toolsHCK.ps1 Outdated
} elseif ($toolsHCKlist.Contains($cmd)) {
try {
$commandInfo = Get-Command -Name $cmd -CommandType Function -ErrorAction Stop
$invokeArgs = @([string[]]@($cmdlinelist.ToArray()))
kostyanf14 and others added 14 commits May 27, 2026 17:57
Add Test-ToolsHCKHelpExit and Assert-ToolsHCKNonEmptyParam for the repeated
interactive warning vs JSON throw patterns. Replace duplicated blocks across
actions to shorten the script and keep behavior aligned.

Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com>
Replace New-Object/Add-Member chains in New-* helpers with [pscustomobject]@{ }
for simpler JSON-oriented projection objects and smaller surface area.

Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com>
Use List[object]/List[string] with Add/AddRange instead of ArrayList, drop
redundant Out-Null after Add where the API returns void, and initialize the
action allowlist from a string array via the List constructor.

Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…InPool

Centralize root pool and machine resolution with optional custom error text
so delete/move/state flows keep their messages while other actions share the
detailed pool/machine wording.

Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Replace repeated -band checks in parsescheduleoptions with iteration over the
known DistributionOption flags and collect matching names into List[string].

Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Avoid two clock reads in gettimestamp so date and time strings always match
the same instant.

Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Build the Studio connection file path from WTTSTDIO using Join-Path so a
missing trailing separator does not break discovery.

Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Align New-ActionResult defaults and JSON error wrapping with PowerShell's
built-in null so strict mode and readability stay correct.

Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Match the variable casing used when loading connect.xml for the database name.

Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
New-ActionResult now copies array-shaped ConvertFrom-Json output with @()
instead of relying on SyncRoot, which is implementation-specific and easy to get
wrong across PowerShell versions.

Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Replace exit -1 with exit 1 when DB connection or TCP bind fails so shells and
automation see a conventional non-zero status.

Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Correct machine/state wording, target key labels, listmachinetargets typo,
hasn't/Queues/information, and related usage strings.

Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Validate WTTSTDIO, resolve kit DLL paths with Join-Path, and surface load
failures via Write-Error before exiting so missing Studio installs fail fast
with a clear reason.

Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
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