File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -187,6 +187,33 @@ function New-GitHubIssue {
187187 - MaximumRetryCount 3
188188}
189189
190+ function Get-GitHubIssues {
191+ param (
192+ [Parameter (Mandatory = $true )]
193+ $RepoOwner ,
194+ [Parameter (Mandatory = $true )]
195+ $RepoName ,
196+ $CreatedBy ,
197+ [Parameter (Mandatory = $true )]
198+ $Labels ,
199+ [ValidateNotNullOrEmpty ()]
200+ [Parameter (Mandatory = $true )]
201+ $AuthToken
202+ )
203+
204+ $uri = " $GithubAPIBaseURI /$RepoOwner /$RepoName /issues?labels=$Labels "
205+
206+ if ($CreatedBy ) {
207+ $uri += " &creator=$CreatedBy "
208+ }
209+
210+ return Invoke-RestMethod `
211+ - Method GET `
212+ - Uri $uri `
213+ - Headers (Get-GitHubApiHeaders - token $AuthToken ) `
214+ - MaximumRetryCount 3
215+ }
216+
190217function Add-GitHubIssueComment {
191218 param (
192219 [Parameter (Mandatory = $true )]
You can’t perform that action at this time.
0 commit comments