4 Fetch closed GitHub issues that were updated in the last 14 days.
7 function Get-GHClosed {
11 $repos = @('SecOps-Tools', 'secdev-job-aids', 'awscli-login')
12 $issueSearchParams = @{ State = 'closed'; OwnerName = 'techservicesillinois' }
14 $repos | ForEach-Object {
15 $closed += Get-GitHubIssue -RepositoryName $_ @issueSearchParams
18 # Limit to past two weeks
19 $issues = $closed | Where-Object { $_.updated_at -gt (Get-Date).AddDays($days) }
27 Fetch GitHub issues that are tagged to discuss this morning.
30 function Get-GHToDiscuss {
34 $repos = @('SecOps-Tools', 'secdev-job-aids', 'awscli-login')
35 $issueSearchParams = @{ State = 'open'; OwnerName = 'techservicesillinois' }
37 $repos | ForEach-Object {
38 $closed += Get-GitHubIssue -RepositoryName $_ @issueSearchParams
40 $issues = $issues | Where-Object { $_.labels -Contains 'DiscussAtStandUp' }
49 Show closed GitHub issues that were updated in the last 14 days.
52 function Show-GHClosed() {
56 Get-GHClosed -days $days | ForEach-Object {
58 " + [" + $_.Title + " (" + $_.Number + ")](" + $_.html_url + ")"
60 # Format-Table -Property Number, Title, Url
67 Fetch GitHub issues I am working on.
70 function Get-GHMine() {
71 $repos = @('SecOps-Tools', 'secdev-job-aids', 'awscli-login')
72 $issueSearchParams = @{ Assignee = 'edthedev'; State = 'open'; OwnerName = 'techservicesillinois' }
74 $repos | ForEach-Object {
75 $issues += Get-GitHubIssue -RepositoryName $_ @issueSearchParams
78 # Ignore issues that have been updated in the last day.
79 $issues = $issues | Where-Object { $_.updated_at -lt (Get-Date).AddDays(-1) }
87 Show GitHub issues I am working on.
90 function Show-GHMine() {
91 Get-GHMine | ForEach-Object {
93 " + [" + $_.Title + " (" + $_.Number + ")](" + $_.html_url + ")"
100 Get GitHub issues that need sized.
104 Runs this GitHub search:
105 is:open is:issue -label:M -label:L -label:S -label:XL -label:XS
108 function Get-GHUnsized() {
109 $repos = @('SecOps-Tools', 'secdev-job-aids', 'awscli-login')
110 $issueSearchParams = @{ State = 'open'; OwnerName = 'techservicesillinois' }
112 $repos | ForEach-Object {
113 $issues += Get-GitHubIssue -RepositoryName $_ @issueSearchParams
116 # Ignore issues that have been updated in the last day.
117 $issues = $issues | Where-Object { -Not $_.labels -Contains 'XS' }
118 $issues = $issues | Where-Object { -Not $_.labels -Contains 'S' }
119 $issues = $issues | Where-Object { -Not $_.labels -Contains 'M' }
120 $issues = $issues | Where-Object { -Not $_.labels -Contains 'L' }
121 # Leave XL issues, as they need split.
126 function Get-GHNoMilestone() {
127 $repos = @('SecOps-Tools', 'secdev-job-aids', 'awscli-login')
128 $issueSearchParams = @{ State = 'open'; OwnerName = 'techservicesillinois' }
130 $repos | ForEach-Object {
131 $issues += Get-GitHubIssue -RepositoryName $_ @issueSearchParams
134 # Get open issues with empty milestone
135 $issues = $issues | Where-Object { $null -eq $_.milestone }
138 function Show-GHNoMilestone(){
139 Get-GHNoMilestone| Show-GHIssuesAsMarkdown
143 function Show-GHUnsized() {
144 Get-GHUnsized | ForEach-Object {
146 " + [" + $_.Title + " (" + $_.Number + ")](" + $_.html_url + ")" + $_.labels
150 function Show-GHByAssignee() {
151 $repos = @('SecOps-Tools', 'secdev-job-aids', 'awscli-login')
152 $issueSearchParams = @{ State = 'open'; OwnerName = 'techservicesillinois' }
154 $repos | ForEach-Object {
155 $issues += Get-GitHubIssue -RepositoryName $_ @issueSearchParams
158 # TODO: Group output by assignee.
165 function Show-GHToDiscuss() {
166 Get-GHToDiscuss | Show-GHIssuesAsMarkdown
170 function Show-GHIssuesAsMarkdown() {
174 " + [" + $_.Title + " (" + $_.Number + ")](" + $_.html_url + ")"
179 Export-ModuleMember -Function Get-GHClosed
180 Export-ModuleMember -Function Show-GHClosed
181 Export-ModuleMember -Function Get-GHMine
182 Export-ModuleMember -Function Show-GHMine
183 Export-ModuleMember -Function Get-GHUnsized
184 Export-ModuleMember -Function Show-GHUnsized
185 Export-ModuleMember -Function Show-GHToDiscuss
186 Export-ModuleMember -Function Show-GHNoMilestone