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:
@@ -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,
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user