X-Git-Url: https://us-delaporte.pagekite.me/gitweb/dotfiles.git/blobdiff_plain/c6464464e3cbf777cca45728e2fa88fbbdb4b92e..3000302e7e283507dd67e77f6931d602e186e866:/psmodules/edgithub.psm1?ds=inline diff --git a/psmodules/edgithub.psm1 b/psmodules/edgithub.psm1 index 76b7feb..949974e 100644 --- a/psmodules/edgithub.psm1 +++ b/psmodules/edgithub.psm1 @@ -21,6 +21,28 @@ function Get-GHClosed { } +<# +.SYNPOSIS + +Fetch GitHub issues that are tagged to discuss this morning. + +#> +function Get-GHToDiscuss { + param( + [int]$days = -14 + ) + $repos = @('SecOps-Tools', 'secdev-job-aids', 'awscli-login') + $issueSearchParams = @{ State = 'open'; OwnerName = 'techservicesillinois' } + $closed = @() + $repos | ForEach-Object { + $closed += Get-GitHubIssue -RepositoryName $_ @issueSearchParams + } + $issues = $issues | Where-Object { $_.labels -Contains 'DiscussAtStandUp' } + + return $issues +} + + <# .SYNOPSIS @@ -103,9 +125,24 @@ function Show-GHUnsized() { } } +function Show-GHToDiscuss() { + Get-GHToDiscuss | Show-GHIssuesAsMarkdown +} + + +function Show-GHIssuesAsMarkdown() { + process + { + # Markdown output + " + [" + $_.Title + " (" + $_.Number + ")](" + $_.html_url + ")" + $_.labels + } +} + + Export-ModuleMember -Function Get-GHClosed Export-ModuleMember -Function Show-GHClosed Export-ModuleMember -Function Get-GHMine Export-ModuleMember -Function Show-GHMine Export-ModuleMember -Function Get-GHUnsized -Export-ModuleMember -Function Show-GHUnsized \ No newline at end of file +Export-ModuleMember -Function Show-GHUnsized +Export-ModuleMember -Function Show-GHToDiscuss \ No newline at end of file