Added new API to get list of github issues (#3170)

Co-authored-by: Praveen Kuttappan <praveen.kuttappan@gmail.com>
This commit is contained in:
Azure SDK Bot 2021-12-08 13:55:26 -08:00 committed by GitHub
parent ef12972c5c
commit ccb435daa8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -187,6 +187,33 @@ function New-GitHubIssue {
-MaximumRetryCount 3
}
function Get-GitHubIssues {
param (
[Parameter(Mandatory = $true)]
$RepoOwner,
[Parameter(Mandatory = $true)]
$RepoName,
$CreatedBy,
[Parameter(Mandatory = $true)]
$Labels,
[ValidateNotNullOrEmpty()]
[Parameter(Mandatory = $true)]
$AuthToken
)
$uri = "$GithubAPIBaseURI/$RepoOwner/$RepoName/issues?labels=$Labels"
if ($CreatedBy) {
$uri += "&creator=$CreatedBy"
}
return Invoke-RestMethod `
-Method GET `
-Uri $uri `
-Headers (Get-GitHubApiHeaders -token $AuthToken) `
-MaximumRetryCount 3
}
function Add-GitHubIssueComment {
param (
[Parameter(Mandatory = $true)]