]> us-delaporte.pagekite.me Git - dotfiles.git/blob - psmodules/dash.psm1
Update dashboard sections to be switched
[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=$true,
17 [switch]$todolist=$false,
18 [switch]$orphans=$false
19 )
20 if($todocount){
21 Measure-JournalTodos
22 Write-Host ""
23 Write-Host "## Todo items for today: $env:todocount"
24 chart -var todocount
25 }
26 if($agenda){
27 Write-Host ""
28 Write-Host "## Agenda for today:"
29 Get-JournalAgenda
30 }
31 if($github) {
32 Write-Host ""
33 Write-Host "## GitHub Status (gh status)"
34 Invoke-Expression "gh status"
35 }
36 if($bugs) {
37 Write-Host ""
38 Write-Host "## Known Bugs"
39 Invoke-AgileCmd "gh issue list -S 'label:bug'"
40 }
41 if($todolist) {
42 Write-Host ""
43 Write-Host "## Todo List"
44 todolist
45 }
46 if($orphans) {
47 Write-Host ""
48 Write-Host "## Issues with No Milestone"
49 Invoke-AgileCmd "gh issue list -S 'is:open is:issue no:milestone'"
50 }
51 }
52
53 function Show-MyTeamWork() {
54 $team = @('ddriddle', 'zcarrington', 'tzturner', 'mpitcel', 'edthedev')
55 $team | ForEach-Object {
56 "## $_ - Issues Assigned"
57 Get-AgileQuery -Assignee $_ | Invoke-AgileQuery | Show-MarkdownFromGitHub
58 }
59 }
60
61 Export-ModuleMember -Function Show-MyDashboard
62 Export-ModuleMember -Function Show-MyTeamWork