fix(alerting): Gitea issues not being closed (#1122)

Fix Gitea issues not being closed: do not ask for page 100, but pagesize (limit) 100. URL must use Index, not ID.
This commit is contained in:
miggland 2025-05-29 01:11:25 +02:00 committed by GitHub
parent d9d5815488
commit 35985017a8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -140,7 +140,7 @@ func (provider *AlertProvider) Send(ep *endpoint.Endpoint, alert *alert.Alert, r
State: gitea.StateOpen,
CreatedBy: cfg.username,
ListOptions: gitea.ListOptions{
Page: 100,
PageSize: 100,
},
},
)
@ -153,7 +153,7 @@ func (provider *AlertProvider) Send(ep *endpoint.Endpoint, alert *alert.Alert, r
_, _, err = cfg.giteaClient.EditIssue(
cfg.repositoryOwner,
cfg.repositoryName,
issue.ID,
issue.Index,
gitea.EditIssueOption{
State: &stateClosed,
},