X-Git-Url: https://us-delaporte.pagekite.me/gitweb/dotfiles.git/blobdiff_plain/09ad9c3d49b6ba61ef9bd48ad9623877444ee888..9ae21ab320e7b5b57c562ddce26d173da12d1cfa:/psmodules/edgithub.psm1?ds=inline diff --git a/psmodules/edgithub.psm1 b/psmodules/edgithub.psm1 index 0f26e24..2ccb330 100644 --- a/psmodules/edgithub.psm1 +++ b/psmodules/edgithub.psm1 @@ -39,5 +39,41 @@ function Show-GHClosed() { } +<# +.SYNPOSIS + +Fetch GitHub issues I am working on. + +#> +function Get-GHMine() { + $repos = @('SecOps-Tools', 'secdev-job-aids', 'awscli-login') + $issueSearchParams = @{ Assignee = 'edthedev'; State = 'open'; OwnerName = 'techservicesillinois' } + $issues = @() + $repos | ForEach-Object { + $issues += Get-GitHubIssue -RepositoryName $_ @issueSearchParams + } + + # Ignore issues that have been updated in the last day. + $issues = $issues | Where-Object { $_.updated_at -lt (Get-Date).AddDays(-1) } + + return $issues +} + +<# +.SYNOPSIS + +Show GitHub issues I am working on. + +#> +function Show-GHMine() { + Get-GHMine | ForEach-Object { + # Markdown output + " + [" + $_.Title + " (" + $_.Number + ")](" + $_.html_url + ")" + } +} + + Export-ModuleMember -Function Get-GHClosed -Export-ModuleMember -Function Show-GHClosed \ No newline at end of file +Export-ModuleMember -Function Show-GHClosed +Export-ModuleMember -Function Get-GHMine +Export-ModuleMember -Function Show-GHMine \ No newline at end of file