-
-
Notifications
You must be signed in to change notification settings - Fork 1
feat(project): enhance Update-ProjectRecent functionality #179
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
Conversation
… update query handling
| # Act - use the mock to run the project full sync to set the last recent update to today | ||
| MockCall_GetProject_700 | ||
|
|
||
| $result = Update-ProjectRecent -Owner $owner -ProjectNumber $projectNumber |
Check warning
Code scanning / PSScriptAnalyzer
The variable 'result' is assigned but never used. Warning
| return $last | ||
| } | ||
|
|
||
| function Set-EnvItem_Last_RecentUpdate{ |
Check warning
Code scanning / PSScriptAnalyzer
Function 'Set-EnvItem_Last_RecentUpdate' has verb that could change system state. Therefore, the function has to support 'ShouldProcess'. Warning
|
|
||
| } | ||
|
|
||
| function Set-EnvItem_Last_RecentUpdate_Today{ |
Check warning
Code scanning / PSScriptAnalyzer
Function 'Set-EnvItem_Last_RecentUpdate_Today' has verb that could change system state. Therefore, the function has to support 'ShouldProcess'. Warning
| # Arrange | ||
| $p = Get-Mock_Project_700 ; $owner = $p.owner ; $projectNumber = $p.number | ||
| $d = Get-Mock_Today ; $today = $d.today ; $pastDate = $d.past | ||
|
|
Check notice
Code scanning / PSScriptAnalyzer
Line has trailing whitespace Note
| } Export-ModuleMember -Function Update-ProjectRecent | ||
|
|
||
| function Set-EnvItem_Last_RecentUpdate_Today{ | ||
| function Get-UpdateRecentQuery{ |
Check notice
Code scanning / PSScriptAnalyzer
The cmdlet 'Get-UpdateRecentQuery' does not have a help comment. Note
| } | ||
| # If no last update return no filter to update all | ||
| if ($null -eq $last){ | ||
| return "" |
Check notice
Code scanning / PSScriptAnalyzer
The cmdlet 'Get-UpdateRecentQuery' returns an object of type 'System.String' but this type is not declared in the OutputType attribute. Note
Improve the Update-ProjectRecent function to handle recent update queries more effectively. This includes modifications to the query logic and the addition of new test cases to ensure proper functionality.