Skip to content

fix(addComment): staged AddComment flow#159

Merged
rulasg merged 5 commits intomainfrom
fix-addcommand-staged
Oct 15, 2025
Merged

fix(addComment): staged AddComment flow#159
rulasg merged 5 commits intomainfrom
fix-addcommand-staged

Conversation

@rulasg
Copy link
Owner

@rulasg rulasg commented Oct 15, 2025

Update timestamps and comment bodies in mock data. Implement a function to set the last comment and enhance the retrieval of project items to include a skip parameter. Update tests to reflect these changes and ensure proper functionality.

$i = $p.issue

$comment = "New comment"
$comment = "New comment"

Check notice

Code scanning / PSScriptAnalyzer

Line has trailing whitespace Note

Line has trailing whitespace
# Act the edit part
Edit-ProjectItem -Owner $owner -ProjectNumber $projectNumber -ItemId $i.id -FieldName "AddComment" -Value $comment

Check notice

Code scanning / PSScriptAnalyzer

Line has trailing whitespace Note

Line has trailing whitespace
$p = Get-Mock_Project_700; $Owner = "octodemo" ; $ProjectNumber = 700

$i = $p.issue

Check notice

Code scanning / PSScriptAnalyzer

Line has trailing whitespace Note

Line has trailing whitespace
# Check if is staged
if($database.Staged.$ItemId){


Check notice

Code scanning / PSScriptAnalyzer

Line has trailing whitespace Note

Line has trailing whitespace
}
}

function Set-LastComment{

Check warning

Code scanning / PSScriptAnalyzer

Function 'Set-LastComment' has verb that could change system state. Therefore, the function has to support 'ShouldProcess'. Warning

Function 'Set-LastComment' has verb that could change system state. Therefore, the function has to support 'ShouldProcess'.
[CmdletBinding()]
[OutputType([string])]
param(
[Parameter(Position = 0)][object[]]$Database,

Check warning

Code scanning / PSScriptAnalyzer

The parameter 'Database' has been declared but not used. Warning

The parameter 'Database' has been declared but not used.
[OutputType([string])]
param(
[Parameter(Position = 0)][object[]]$Database,
[Parameter(ValueFromPipeline, Position = 1)][hashtable]$Item,

Check warning

Code scanning / PSScriptAnalyzer

Command accepts pipeline input but has not defined a process block. Warning

Command accepts pipeline input but has not defined a process block.
}
}

function Remove-ItemStaged{

Check warning

Code scanning / PSScriptAnalyzer

Function 'Remove-ItemStaged' has verb that could change system state. Therefore, the function has to support 'ShouldProcess'. Warning

Function 'Remove-ItemStaged' has verb that could change system state. Therefore, the function has to support 'ShouldProcess'.
@rulasg rulasg merged commit f33f9dc into main Oct 15, 2025
3 checks passed
@rulasg rulasg deleted the fix-addcommand-staged branch October 15, 2025 22:37
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