]> apps.delaporte.us Git - dotfiles.git/blob - psmodules/dash.psm1
Add blockers
[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 <#
12
13 .SYNOPSIS
14
15 Show a text dashboard.
16
17 .EXAMPLE
18
19 Include `Todo` list.
20 Show-MyDashboard -todo
21
22 #>
23 function Show-MyDashBoard() {
24 param(
25 # [switch]$todocount=$true,
26 [switch]$agenda=$true,
27 [switch]$blocked,
28 [switch]$gitHub,
29 [switch]$help,
30 [switch]$leeroy,
31 [switch]$bugs,
32 [switch]$todo,
33 [switch]$pr,
34 [switch]$requested,
35 [switch]$orphans
36 )
37 $todocount = $true
38 if($todocount){
39 Measure-JournalTodos
40 Write-Host ""
41 Write-Host "## Todo items for today: $env:todocount"
42 chart -var todocount
43 }
44 if($agenda){
45 Write-Host ""
46 Write-Host "## Agenda for today:"
47 Get-JournalAgenda
48 }
49 if($blocked){
50 Write-Host ""
51 Write-Host "## Blocked & Blocker Issues:"
52 Invoke-AgileCmd "gh issue list -S 'label:blocked,blocker'"
53 }
54 if($github) {
55 Write-Host ""
56 Write-Host "## GitHub Status (gh status)"
57 Invoke-Expression "gh status"
58 }
59 if($leeroy){
60 Write-Host ""
61 Write-Host "## Leeroy Jenkins!:"
62 Invoke-AgileCmd "gh issue list -l 'leeroy jenkins'"
63 }
64 if($bugs) {
65 Write-Host ""
66 Write-Host "## Known Bugs"
67 Invoke-AgileCmd "gh issue list -S 'label:bug'"
68 }
69 if($todo) {
70 Write-Host ""
71 Write-Host "## Todo List"
72 todolist
73 }
74 if($requested){
75 Write-Host ""
76 Write-Host "## Open Stakeholder Requests"
77 invoke-agilecmd "gh issue list -S 'label:requested'"
78 }
79 if($pr) {
80 Write-Host ""
81 Write-Host "## Open Pull Requests"
82 Invoke-AgileCmd "gh pr list"
83 }
84 if($orphans) {
85 Write-Host ""
86 Write-Host "## Issues with No Milestone"
87 Invoke-AgileCmd "gh issue list -S 'is:open is:issue no:milestone'"
88 }
89 if($help) {
90 Write-Host "## Dasbhoard Help"
91 Get-Help Show-MyDashboard
92 }
93 }
94
95 function Show-MyTeamWork() {
96 $team = @('ddriddle', 'zcarrington', 'tzturner', 'mpitcel', 'edthedev')
97 $team | ForEach-Object {
98 "## $_ - Issues Assigned"
99 Get-AgileQuery -Assignee $_ | Invoke-AgileQuery | Show-MarkdownFromGitHub
100 }
101 }
102
103 Export-ModuleMember -Function Show-MyDashboard
104 Export-ModuleMember -Function Show-MyTeamWork