Fix drone build pipeline #1
@ -29,7 +29,12 @@ function Send-PRComment {
|
||||
param (
|
||||
[Parameter(Mandatory = $false, HelpMessage = 'HelpMessage')]
|
||||
[ValidateSet('Add', 'Edit', 'Renew')]
|
||||
[string]$Mode = 'Renew'
|
||||
[string]$Mode = 'Renew',
|
||||
|
||||
[Parameter(Mandatory = $false, HelpMessage = 'Gitea user for drone bot')]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string]$GiteaUser= 'drone-bot'
|
||||
|
||||
)
|
||||
|
||||
begin {
|
||||
@ -89,7 +94,7 @@ function Send-PRComment {
|
||||
if ($Mode -eq 'Renew') {
|
||||
$Comments = Invoke-RestMethod -Method 'Get' -Headers $APIHeaders -Uri $CommentAPICall
|
||||
$DroneComments = $Comments | Where-Object {
|
||||
$_.user.login -eq 'drone'
|
||||
$_.user.login -eq $GiteaUser
|
||||
} | Select-Object -ExpandProperty 'id'
|
||||
Write-Debug -Message ('Found Drone comments: {0}.' -f ($DroneComments -join ', '))
|
||||
foreach ($id in $DroneComments) {
|
||||
|
Reference in New Issue
Block a user