-
-
Notifications
You must be signed in to change notification settings - Fork 1
improve bugs, performance and consistency #174
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
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
4a512dd
refactor(database): cache databaseRoot to avoid calling so much integ…
rulasg 65d7155
fix(database): allow force on Get-DatabaseStore for reset
rulasg b021f1e
style(database): format code for consistency and readability
rulasg 8f5917c
refactor(test): update Get-ProjectItemList references to Get-ProjectI…
rulasg c83289e
fix(test): update error message for unsaved changes in project item r…
rulasg ca150a8
refactor(project): update Search-ProjectItem to Get-ProjectItems with…
rulasg a53de42
refactor(item): remove Get-ProjectItemList
rulasg 3f69a63
refactor(include): sync with include modules
rulasg d71c084
faet(test_loging): add traceInvoke and mockfiles
rulasg a833744
style(invokeCommand): improve debug message formatting
rulasg 737faf2
refactor(MyWrite): rename functions for clarity and consistency
rulasg ad2cb9d
fix(ConvertTo-SingleSelect, ConvertFrom-SingleSelect, ConvertTo-Numbe…
rulasg d46d489
refactor(GetProjectItemByUrl): enhance functionality with PassThru pa…
rulasg 30a9f3c
refactor(Set-Project): update parameter attributes for pipeline compa…
rulasg d648c9b
refactor(Show-ProjectItem): enhance addJumpLine calls with descriptiv…
rulasg 548c292
fix(Get-ProjectIssue): update Get-ProjectItemByUrl call to include Pa…
rulasg 9139e82
fix(Test_SearchProjectItem_AND_Filter): update title string formattin…
rulasg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
|
|
||
| $MockCommandFile = $testRootPath | Join-Path -ChildPath "mockfiles.log" | ||
|
|
||
| function Trace-MockCommandFile{ | ||
| [CmdletBinding()] | ||
| param( | ||
| [string] $Command, | ||
| [string] $FileName | ||
| ) | ||
|
|
||
| # read content | ||
| $content = readMockCommandFile | ||
|
|
||
| # Check that the entry is already there | ||
| $result = $content | Where-Object{$_.command -eq $command} | ||
| if($null -ne $result) {return} | ||
|
|
||
| # add entry | ||
| $new = @{ | ||
| Command = $command | ||
| FileName = $fileName | ||
| } | ||
|
|
||
| $ret = @() | ||
| $ret += $content | ||
| $ret += $new | ||
|
|
||
| # Save list | ||
| writeMockCommandFile -Content $ret | ||
| } | ||
|
|
||
| function readMockCommandFile{ | ||
| $ret = Get-Content -Path $MockCommandFile | ConvertFrom-Json | ||
|
|
||
| # return an empty aray if content does not exists | ||
| $ret = $ret ?? @() | ||
|
|
||
| return $ret | ||
| } | ||
|
|
||
| function writeMockCommandFile($Content){ | ||
|
|
||
| $list = $Content | ConvertTo-Json | ||
|
|
||
Check noticeCode scanning / PSScriptAnalyzer Line has trailing whitespace Note
Line has trailing whitespace
|
||
| $sorted = $list | Sort-Object fileName | ||
|
|
||
Check noticeCode scanning / PSScriptAnalyzer Line has trailing whitespace Note
Line has trailing whitespace
|
||
| $sorted | Out-File -FilePath $MockCommandFile | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,154 @@ | ||
| [ | ||
| { | ||
| "FileName": "invoke-GitHubOrgProjectWithFields-octodemo-700-skipitems.json", | ||
| "Command": "Invoke-GitHubOrgProjectWithFields -Owner octodemo -ProjectNumber 700 -afterFields \"\" -afterItems \"\" -firstItems 0" | ||
| }, | ||
| { | ||
| "FileName": "invoke-addcomment-I_kwDOPrRnkc7KkwSq.json", | ||
| "Command": "Invoke-AddComment -SubjectId I_kwDOPrRnkc7KkwSq -Comment \"sample comment 1\"" | ||
| }, | ||
| { | ||
| "FileName": "invoke-getitem-PVTI_lADOAlIw4c4BCe3Vzgeio4o.json", | ||
| "Command": "Invoke-GetItem -ItemId PVTI_lADOAlIw4c4BCe3Vzgeio4o" | ||
| }, | ||
| { | ||
| "FileName": "invoke-getitem-PVTI_lADOAlIw4c4BCe3VzgeioBY.json", | ||
| "Command": "Invoke-GetItem -ItemId PVTI_lADOAlIw4c4BCe3VzgeioBY" | ||
| }, | ||
| { | ||
| "FileName": "invoke-addcomment-PR_kwDOPrRnkc6nndcE.json", | ||
| "Command": "Invoke-AddComment -SubjectId PR_kwDOPrRnkc6nndcE -Comment \"sample comment 1\"" | ||
| }, | ||
| { | ||
| "FileName": "invoke-GitHubOrgProjectWithFields-octodemo-700.json", | ||
| "Command": "Invoke-GitHubOrgProjectWithFields -Owner octodemo -ProjectNumber 700 -afterFields \"\" -afterItems \"\"" | ||
| }, | ||
| { | ||
| "FileName": "invoke-addSubIssue-I_kwDOPrRnkc7KkwSq-9.json", | ||
| "Command": "Invoke-AddSubIssue -IssueId I_kwDOPrRnkc7KkwSq -SubIssueUrl https://github.com/octodemo/rulasg-dev-1/issues/9 -ReplaceParent False" | ||
| }, | ||
| { | ||
| "FileName": "invoke-addSubIssue-I_kwDOPrRnkc7KkwSq-5.json", | ||
| "Command": "Invoke-AddSubIssue -IssueId I_kwDOPrRnkc7KkwSq -SubIssueUrl https://github.com/octodemo/rulasg-dev-1/issues/5 -ReplaceParent False" | ||
| }, | ||
| { | ||
| "FileName": "invoke-GitHubOrgProjectWithFields-octodemo-625.2-skipitems.json", | ||
| "Command": "Invoke-GitHubOrgProjectWithFields -Owner octodemo -ProjectNumber 625 -afterFields \"\" -afterItems \"\" -firstItems 0" | ||
| }, | ||
| { | ||
| "FileName": "invoke-getitem-PVTI_lADOAlIw4c4A0Lf4zgYNTc0.json", | ||
| "Command": "Invoke-GetItem -itemid PVTI_lADOAlIw4c4A0Lf4zgYNTc0" | ||
| }, | ||
| { | ||
| "FileName": "invoke-addcomment-I_kwDOPrRnkc7KkwSq.json", | ||
| "Command": "Invoke-AddComment -SubjectId I_kwDOPrRnkc7KkwSq -Comment \"New comment\"" | ||
| }, | ||
| { | ||
| "FileName": "invoke-addcomment-I_kwDOPrRnkc7KkwSq.json", | ||
| "Command": "Invoke-AddComment -SubjectId I_kwDOPrRnkc7KkwSq -Comment \"Another comment2\"" | ||
| }, | ||
| { | ||
| "FileName": "findprojectempty.json", | ||
| "Command": "Invoke-FindProject -Owner github -Pattern \"emptylistpattern\" -firstProject 100 -afterProject \"\"" | ||
| }, | ||
| { | ||
| "FileName": "findprojectwithlist.json", | ||
| "Command": "Invoke-FindProject -Owner github -Pattern \"kk\" -firstProject 100 -afterProject \"\"" | ||
| }, | ||
| { | ||
| "FileName": "invoke-getitem-PVTI_lADNJr_OADU3Ys4GAgVO.json", | ||
| "Command": "Invoke-GetItem -itemid PVTI_lADNJr_OADU3Ys4GAgVO" | ||
| }, | ||
| { | ||
| "FileName": "projectV2-skipitems.json", | ||
| "Command": "Invoke-GitHubOrgProjectWithFields -Owner SomeOrg -ProjectNumber 164 -afterFields \"\" -afterItems \"\" -firstItems 0" | ||
| }, | ||
| { | ||
| "FileName": "invoke-getitem-id1.json", | ||
| "Command": "Invoke-GetItem -itemid id1" | ||
| }, | ||
| { | ||
| "FileName": "invoke-getitem-id2.json", | ||
| "Command": "Invoke-GetItem -itemid id2" | ||
| }, | ||
| { | ||
| "FileName": "invoke-GetIssueOrPullRequest-26.json", | ||
| "Command": "Invoke-GetIssueOrPullRequest -Url https://github.com/octodemo/rulasg-dev-1/issues/26" | ||
| }, | ||
| { | ||
| "FileName": "invoke-getitem-PVTI_lADOAlIw4c4BCe3Vzgeiodc-updated.json", | ||
| "Command": "Invoke-GetItem -itemid PVTI_lADOAlIw4c4BCe3Vzgeiodc" | ||
| }, | ||
| { | ||
| "FileName": "invoke-getitem-PVTI_lADOAlIw4c4BCe3Vzgec8p8.json", | ||
| "Command": "Invoke-GetItem -ItemId PVTI_lADOAlIw4c4BCe3Vzgec8p8" | ||
| }, | ||
| { | ||
| "FileName": "invoke-repository-rulasg-dev-1.json", | ||
| "Command": "Invoke-Repository -Owner octodemo -Name rulasg-dev-1" | ||
| }, | ||
| { | ||
| "FileName": "invoke-getitem-PVTI_lADOAlIw4c4A0Lf4zgYNTxI.json", | ||
| "Command": "Invoke-GetItem -itemid PVTI_lADOAlIw4c4A0Lf4zgYNTxI" | ||
| }, | ||
| { | ||
| "FileName": "invoke-createDraftItem.json", | ||
| "Command": "Invoke-CreateDraftItem -ProjectId PVT_kwDOAlIw4c4BCe3V -Title \"DraftIssue created for test \" -Body \"Body of draftissue\"" | ||
| }, | ||
| { | ||
| "FileName": "invoke-createissue-R_kgDOPrRnkQ.json", | ||
| "Command": "Invoke-CreateIssue -RepositoryId R_kgDOPrRnkQ -Title \"Random value title\" -Body \"Random value body\"" | ||
| }, | ||
| { | ||
| "FileName": "invoke-getissueorpullrequest-46.json", | ||
| "Command": "Invoke-GetIssueOrPullRequest -Url https://github.com/octodemo/rulasg-dev-1/issues/46" | ||
| }, | ||
| { | ||
| "FileName": "invoke-additemtoproject-PVT_kwDOAlIw4c4BCe3V-I_kwDOPrRnkc7T2Al2.json", | ||
| "Command": "Invoke-AddItemToProject -ProjectId PVT_kwDOAlIw4c4BCe3V -ContentId I_kwDOPrRnkc7T2Al2" | ||
| }, | ||
| { | ||
| "FileName": "invoke-removeitemfromproject-PVT_kwDOAlIw4c4BCe3V-PVTI_lADOAlIw4c4BCe3VzggVZH8.json", | ||
| "Command": "Invoke-RemoveItemFromProject -ProjectId PVT_kwDOAlIw4c4BCe3V -ItemId PVTI_lADOAlIw4c4BCe3VzggVZH8" | ||
| }, | ||
| { | ||
| "FileName": "invoke-removeissue-any.json", | ||
| "Command": "Invoke-RemoveIssue -IssueId I_kwDOPrRnkc7T2Al2" | ||
| }, | ||
| { | ||
| "FileName": "projectV2.json", | ||
| "Command": "Invoke-GitHubOrgProjectWithFields -Owner SomeOrg -ProjectNumber 164 -afterFields \"\" -afterItems \"\"" | ||
| }, | ||
| { | ||
| "FileName": "invoke-addcomment-I_kwDOPrRnkc7KkwSq.json", | ||
| "Command": "Import-Module /Users/rulasg/code/ProjectHelper ; Invoke-AddComment -SubjectId I_kwDOPrRnkc7KkwSq -Comment \"new comment added\"" | ||
| }, | ||
| { | ||
| "FileName": "invoke-addcomment-PR_kwDOPrRnkc6nndcE.json", | ||
| "Command": "Import-Module /Users/rulasg/code/ProjectHelper ; Invoke-AddComment -SubjectId PR_kwDOPrRnkc6nndcE -Comment \"new comment added\"" | ||
| }, | ||
| { | ||
| "FileName": "invoke-clearProjectV2ItemFieldValue-PVT_kwDOAlIw4c4BCe3V-PVTI_lADOAlIw4c4BCe3Vzgeio4o-PVTF_lADOAlIw4c4BCe3Vzg0rhko.json", | ||
| "Command": "Import-Module /Users/rulasg/code/ProjectHelper ; Invoke-GitHubClearItemValues -ProjectId PVT_kwDOAlIw4c4BCe3V -ItemId PVTI_lADOAlIw4c4BCe3Vzgeio4o -FieldId PVTF_lADOAlIw4c4BCe3Vzg0rhko" | ||
| }, | ||
| { | ||
| "FileName": "invoke-clearProjectV2ItemFieldValue-PVT_kwDOAlIw4c4BCe3V-PVTI_lADOAlIw4c4BCe3Vzgeio4o-PVTSSF_lADOAlIw4c4BCe3Vzg0rhno.json", | ||
| "Command": "Import-Module /Users/rulasg/code/ProjectHelper ; Invoke-GitHubClearItemValues -ProjectId PVT_kwDOAlIw4c4BCe3V -ItemId PVTI_lADOAlIw4c4BCe3Vzgeio4o -FieldId PVTSSF_lADOAlIw4c4BCe3Vzg0rhno" | ||
| }, | ||
| { | ||
| "FileName": "invoke-clearProjectV2ItemFieldValue-PVT_kwDOAlIw4c4BCe3V-PVTI_lADOAlIw4c4BCe3Vzgeio4o-PVTF_lADOAlIw4c4BCe3Vzg0rhko.json", | ||
| "Command": "Invoke-GitHubClearItemValues -ProjectId PVT_kwDOAlIw4c4BCe3V -ItemId PVTI_lADOAlIw4c4BCe3Vzgeio4o -FieldId PVTF_lADOAlIw4c4BCe3Vzg0rhko" | ||
| }, | ||
| { | ||
| "FileName": "invoke-clearProjectV2ItemFieldValue-PVT_kwDOAlIw4c4BCe3V-PVTI_lADOAlIw4c4BCe3Vzgeio4o-PVTSSF_lADOAlIw4c4BCe3Vzg0rhno.json", | ||
| "Command": "Invoke-GitHubClearItemValues -ProjectId PVT_kwDOAlIw4c4BCe3V -ItemId PVTI_lADOAlIw4c4BCe3Vzgeio4o -FieldId PVTSSF_lADOAlIw4c4BCe3Vzg0rhno" | ||
| }, | ||
| { | ||
| "FileName": "invoke-GitHubOrgProjectWithFields-octodemo-625.json", | ||
| "Command": "Invoke-GitHubOrgProjectWithFields -Owner octodemo -ProjectNumber 625 -afterFields \"\" -afterItems \"\"" | ||
| }, | ||
| { | ||
| "FileName": "invoke-GitHubOrgProjectWithFields-octodemo-626.json", | ||
| "Command": "Invoke-GitHubOrgProjectWithFields -Owner octodemo -ProjectNumber 626 -afterFields \"\" -afterItems \"\"" | ||
| } | ||
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check notice
Code scanning / PSScriptAnalyzer
Line has trailing whitespace Note