Added new API to get list of github issues (#16533)
Co-authored-by: Praveen Kuttappan <praveen.kuttappan@gmail.com>
This commit is contained in:
Родитель
0d32845762
Коммит
f1d504555a
|
@ -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)]
|
||||
|
|
Загрузка…
Ссылка в новой задаче