]> us-delaporte.pagekite.me Git - dotfiles.git/blob - psmodules/dash.psm1
Add helper to list all open stakeholder requests
[dotfiles.git] / psmodules / dash.psm1
1 function Get-JournalAgenda() {
2 agenda.exe -path "$HOME/Journal/{YYYY}/{MM}-{DD}.md"
3 }
4
5 function Measure-JournalTodos() {
6 $todocount = todolist | Measure-Object -Line
7 $env:todocount += '|'
8 $env:todocount += $todocount.lines
9 }
10
11 function Show-MyDashBoard() {
12 param(
13 # [switch]$todocount=$true,
14 [switch]$agenda=$true,
15 [switch]$gitHub=$false,
16 [switch]$bugs=$false,
17 [switch]$todo=$false,
18 [switch]$pr=$false,
19 [switch]$requested=$false,
20 [switch]$orphans=$false
21 )
22 $todocount = $true
23 if($todocount){
24 Measure-JournalTodos
25 Write-Host ""
26 Write-Host "## Todo items for today: $env:todocount"
27 chart -var todocount
28 }
29 if($agenda){
30 Write-Host ""
31 Write-Host "## Agenda for today:"
32 Get-JournalAgenda
33 }
34 if($github) {
35 Write-Host ""
36 Write-Host "## GitHub Status (gh status)"
37 Invoke-Expression "gh status"
38 }
39 if($bugs) {
40 Write-Host ""
41 Write-Host "## Known Bugs"
42 Invoke-AgileCmd "gh issue list -S 'label:bug'"
43 }
44 if($todo) {
45 Write-Host ""
46 Write-Host "## Todo List"
47 todolist
48 }
49 if($requested){
50 Write-Host ""
51 Write-Host "## Open Stakeholder Requests"
52 invoke-agilecmd "gh issue list -S 'label:requested'"
53 }
54 if($pr) {
55 Write-Host ""
56 Write-Host "## Open Pull Requests"
57 Invoke-AgileCmd "gh pr list"
58 }
59 if($orphans) {
60 Write-Host ""
61 Write-Host "## Issues with No Milestone"
62 Invoke-AgileCmd "gh issue list -S 'is:open is:issue no:milestone'"
63 }
64 }
65
66 function Show-MyTeamWork() {
67 $team = @('ddriddle', 'zcarrington', 'tzturner', 'mpitcel', 'edthedev')
68 $team | ForEach-Object {
69 "## $_ - Issues Assigned"
70 Get-AgileQuery -Assignee $_ | Invoke-AgileQuery | Show-MarkdownFromGitHub
71 }
72 }
73
74 Export-ModuleMember -Function Show-MyDashboard
75 Export-ModuleMember -Function Show-MyTeamWork