en-US/about_ProjectDemo.help.txt
TOPIC about_ProjectDemo AUTHOR rulasg COPYRIGHT (c) rulasg. All rights reserved. SHORT DESCRIPTION Module to create a Project for a Demo LONG DESCRIPTION Module to create a Project for a Demo KEYWORDS Powershell Testing UnitTest Module TestingHelper SEE ALSO https://github.com/rulasg/TestingHelper/ FULL SET OF FUNCTIONALITY 1. New-ProjectDemo 2. Get-ProjectDemo 3. Get-Environment 4. Get-ProjectNumber 5. Find-RepoDemo 6. Add-IssuesToRepo 7. Add-ItemsToProject 8. New-RepoDemo 9. Add-ItemsToProjectFromARepo 10. Update-Update-FieldValueSingleSelectToProjec 11. Add-FieldSingleSelectToProject 12. Add-FieldSingleSelectToProject 13. Add-TimeTrackerFieldToProject 14. Remove-ProjectDemo 15. Find-ProjectDemo 16. Open-ProjectDemo FULL DEMO FLOW $name = "testproject" $owner = "solidifydemo" New-ProjectDemo -Owner $owner -Name $name Open-ProjectDemo -Owner $owner -Name $name Get-ProjectDemo -Owner $owner -Name $name Get-ProjectNumber -Owner $owner -Name $nam Add-ItemsToProject -Owner $owner -Name $name $projectNumber = Get-ProjectNumber -Name $name -Owner $owner Update-FieldValueWithSingleSelect -Owner $owner -ProjectNumber $projectNumber -FieldName Status Add-CommentFieldToProject -owner $owner -ProjectNumber $projectNumber -Update Add-PriorityFieldToProject -owner $owner -ProjectNumber $projectNumber -Update Add-SeverityFieldToProject -owner $owner -ProjectNumber $projectNumber -Update Add-TimeTrackerFieldToProject -owner $owner -ProjectNumber $projectNumber -Update Add-StoryPointsFieldToProject -owner $owner -ProjectNumber $projectNumber -Update Find-ProjectDemo -Owner $owner Remove-ProjectDemo -Name $name -Owner $owner 1. CREATE A PROJECT FOR DEMO If you want to demo GitHub Projects you need a fre repos with issues and a project that will be used to manage the issues. Use New-ProjectDemo to create a project, 2 repos and issues. > New-ProjectDemo -name testproject -Owner solidifydemo https://github.com/orgs/SolidifyDemo/projects/120 https://github.com/SolidifyDemo/testproject-repo-front https://github.com/SolidifyDemo/testproject-repo-back ..... ..... .......... 2. GET PROJECT DEMO You can use Get-ProjectDemo to confirm that the demo has been created properly. > Get-ProjectDemo -name testproject -Owner solidifydemo ProjectDemo Item Name Test ----------- ---- ---- ---- testproject Repo1 SolidifyDemo/testproject-repo-front True testproject Repo2 SolidifyDemo/testproject-repo-back True testproject Proj… testproject True 3. DEFAULT PROJECTDEMO ENVIRONMENT VALUES To build the demo we use standard values for the repos and issues. You can use Get-Environment to get the values. > Get-Environment -name testproject -Owner solidifydemo Name : testproject Owner : solidifydemo DefaultOwner : SolidifyDemo Topic : projectdemo-testproject RepoFront : testproject-repo-front RepoBack : testproject-repo-back RepoFrontWithOwner : solidifydemo/testproject-repo-front RepoBackWithOwner : solidifydemo/testproject-repo-back IssuesAmount : 5 4. GET THE PROJECT NUMBER For some gh commands the project number is used to identify the project. You can use Get-ProjectNumber to get the project number. > Get-ProjectNumber -Name testproject -Owner Solidifydemo 87 5. FIND PROJECTDEMO REPOS ProjectDemo uses topics to scope the repos that belongs to a demo. Find-RepoDemoAll finds all repos that belong to any demo using the default topic "projectdemo" > gh repo list solidifydemo --topic projectdemo Showing 4 of 4 repositories in @SolidifyDemo that match your search SolidifyDemo/testproject2-repo-back Repo part of Project Demo public 0m SolidifyDemo/testproject2-repo-front Repo part of Project Demo public 0m SolidifyDemo/testproject-repo-back Repo part of Project Demo public 5m SolidifyDemo/testproject-repo-front Repo part of Project Demo public 5m To find the repos of a particular demo use the topic Topic = "projectdemo-" + $Name > gh repo list solidifydemo --topic projectdemo-testproject2 Showing 2 of 2 repositories in @SolidifyDemo that match your search SolidifyDemo/testproject2-repo-back Repo part of Project Demo public 2m SolidifyDemo/testproject2-repo-front Repo part of Project Demo public 2m 6. ADD MORE ISSUES TO REPO There is a default of issues that are added to the demo repos during New-ProjectDemo. Is possible that to make a better demo you need more issued on the demo repos. Use Add-IssuesToRepo to add mode issues to a repo. > Add-IssuesToRepo -Owner solidifydemo -Repo testproject2-repo-back -Amount 5 1. Creating Issue e97444a6 for repo [solidifydemo/testproject2-repo-back] 2. Creating Issue ae0c3bfb for repo [solidifydemo/testproject2-repo-back] 3. Creating Issue 92a7ce82 for repo [solidifydemo/testproject2-repo-back] 4. Creating Issue 77850d3c for repo [solidifydemo/testproject2-repo-back] 5. Creating Issue 3a262c6e for repo [solidifydemo/testproject2-repo-back] 7. ADD ALL DEMO REPOS ISSUES TO DEMO PROJECT On demo creation issues are not added to the project. This allows to show the projet emptuy of issues. When needed use Add-ItemsToProject to add all the demo repo issues to the demo project. > Add-ItemsToProject ..... ..... 8. CREATE AN EXTRA REPO FOR THE DEMO If you need an extra repo to show a 3 repo project planning follow this steps. Use the environments topics to link the repo to the demo for later removal. > $e = Get-Environment -Name testproject -Owner solidifydemo > New-RepoDemo -Name testproject -Owner solidifydemo testproject-repo-apendix https://github.com/SolidifyDemo/testproject-repo-apendix > Add-IssuesToRepo -Owner SolidifyDemo -Repo testproject-repo-apendix -Amount 5 ..... 9. ADD ISSUES OF A DIFFERENT REPO It may be useful to add issues from a different repo to the demo project. Use Add-ItemsToProjectFromARepo to add issues from a different repo to the demo project. > $pn = Get-ProjectNumber -Name testproject -Owner Solidifydemo > Add-ItemsToProjectFromARepo -Owner solidifydemo -ProjectNumber $pn -Repo testproject-repo-apendix ..... 10. SHUFFLE STATUS VALUE ON ISSUES Once added the issues to the project the Status field is not set. Use the Update-FieldValueWithSingleSelect command to set the status field to a random value. > Update-FieldValueWithSingleSelect -Owner Solidifydemo -ProjectNumber 116 -FieldName Status ............... You can use this command to SHUFFLE values of any other SINGLE SELECT field. 11. ADD PRIORITY FIELD TO THE PROJECT Priority is a field very commonly used. Use Add-FieldSingleSelectToProject to add the Priority field to the project. Use Update-FieldValueWithSingleSelect to set a random value to the field. > Add-FieldSingleSelectToProject -Owner SolidifyDemo -ProjectNumber 116 -FieldName "Priority" -Options "🔥Critical,🥵High,😊Normal,🥶Low" Add Priority ot project 116 > Update-FieldValueWithSingleSelect -ProjectNumber 116 -FieldName Priority ............... Or directly use Add-PriorityFieldToProject to add the field and set a random value. > Add-PriorityFieldToProject -ProjectNumber 128 -owner solidifydemo 12. ADD OTHER SINGLE SELECT FIELDS LIKE SEVERITY Other fields are also interesting to be added to allow a good demo. Consider adding the Severity Field using Add-SeverityFieldToProject and set a random value using Update-FieldValueWithSingleSelect. > Add-FieldSingleSelectToProject -ProjectNumber 116 -FieldName "Severity" -Options "Critical⭐️⭐️⭐️⭐️,Important⭐️⭐️⭐️,Needed⭐️⭐️,Nice⭐️" Add Severity ot project 116 > update-FieldValueSingleSelectToProject -ProjectNumber 116 -FieldName Severity ............... Or directly use Add-SeverityFieldToProject to add the field and set a random value. 13. ADD NUMBER FIELDS LIKE TIMETRACKER FIELD IN PROJECT To show the Field SUM feature you need a field type numeric with values. Use Add-FieldNumber to add a field to the project and use Update-FieldValueWithNumber to add a random value the items in the project. Or use Add-TimeTrackerFieldToProject to it TimeTracker directly with -update flag to add random values to the items. > Add-TimeTrackerFieldToProject -owner solidifydemo -ProjectNumber 116 -Update Created field ..................... 14. REMOVE A PROJECTDEMO Once done, with the philosophy of create, use, destroy, you should remove the demo. > Remove-ProjectDemo -name testproject -Owner solidifydemo Removed project [91] in [solidifydemo] Deleted repo [SolidifyDemo/testproject-repo-back] Deleted repo [SolidifyDemo/testproject-repo-front] 15. FIND PROJECTDEMO If you can't remember the projects you have created use Find-ProrojectDemo > Find-ProjectDemo Name : testproject2 User : raulgeu Title : testproject2 Owner : SolidifyDemo Url : https://github.com/orgs/SolidifyDemo/projects/114 Name : testproject User : rulasg Title : testproject Owner : SolidifyDemo Url : https://github.com/orgs/SolidifyDemo/projects/113 Filter by user to find yours > find-projectdemo -user rulasg Name : testproject User : rulasg Title : testproject Owner : SolidifyDemo Url : https://github.com/orgs/SolidifyDemo/projects/113 Pipe the output of Find-ProjectDemo to Remove-ProjectDemo to remove the project > find-projectdemo -user rulasg | Remove-ProjectDemo Removed project [113] in [SolidifyDemo] Deleted repo [SolidifyDemo/testproject-repo-back] Deleted repo [SolidifyDemo/testproject-repo-front] |