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

View File

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