feat(database): implement project and repository management functions#4
Conversation
…rojects functions
…et-GcRepoCollaboratorsUrl function
| return $dbstore | ||
| } | ||
|
|
||
| function Reset-DatabaseStore{ |
Check warning
Code scanning / PSScriptAnalyzer
Function 'Reset-DatabaseStore' has verb that could change system state. Therefore, the function has to support 'ShouldProcess'. Warning
| # Extra functions not needed by INCLUDE DATABASE V2 | ||
| $function = "Reset-$($MODULE_NAME)DatabaseStore" | ||
| if(-not (Test-Path -Path function:$function)){ | ||
| function Reset-MyModuleDatabaseStore{ |
Check warning
Code scanning / PSScriptAnalyzer
Function 'Reset-MyModuleDatabaseStore' has verb that could change system state. Therefore, the function has to support 'ShouldProcess'. Warning
| return $ret | ||
| } | ||
|
|
||
| function Reset-DatabaseKey{ |
Check warning
Code scanning / PSScriptAnalyzer
Function 'Reset-DatabaseKey' has verb that could change system state. Therefore, the function has to support 'ShouldProcess'. Warning
| @@ -0,0 +1,39 @@ | |||
| function Get-GcDatabaseProjects{ | |||
Check warning
Code scanning / PSScriptAnalyzer
The cmdlet 'Get-GcDatabaseProjects' uses a plural noun. A singular noun should be used instead. Warning
| return $db | ||
| } | ||
|
|
||
| function Save-GcDatabaseProjects{ |
Check warning
Code scanning / PSScriptAnalyzer
The cmdlet 'Save-GcDatabaseProjects' uses a plural noun. A singular noun should be used instead. Warning
| return $all | ||
| } else { | ||
| $item = $all.$ItemId | ||
|
|
Check notice
Code scanning / PSScriptAnalyzer
Line has trailing whitespace Note
| if(-Not $item){ | ||
| throw ("Item not found: "+$ItemId) | ||
| } | ||
|
|
Check notice
Code scanning / PSScriptAnalyzer
Line has trailing whitespace Note
| @@ -0,0 +1,30 @@ | |||
| class ValidRepoNames : System.Management.Automation.IValidateSetValuesGenerator { [String[]] GetValidValues() { return GetValidRepoNames}} | |||
|
|
|||
| function New-GcProjectItemIssue{ | |||
Check notice
Code scanning / PSScriptAnalyzer
The cmdlet 'New-GcProjectItemIssue' does not have a help comment. Note
| Owner = $owner | ||
| ProjectNumber = $p.number | ||
| Url = $p.url | ||
|
|
Check notice
Code scanning / PSScriptAnalyzer
Line has trailing whitespace Note
| Url = $p.url | ||
|
|
||
| $result = Invoke-MyCommand -Command FindProjectByCreator -Parameters $params | ||
|
|
Check notice
Code scanning / PSScriptAnalyzer
Line has trailing whitespace Note
Introduce functions for managing GitHub projects and repositories, including creating issues, retrieving collaborators, and caching database results. Refactor existing code to utilize new functions for improved organization and maintainability.