Handle 201 when ensuring ticket is open

This commit is contained in:
Matthew Knight 2026-02-18 15:38:49 -08:00
parent a59088dc35
commit ee703b08e4
No known key found for this signature in database
1 changed files with 1 additions and 1 deletions

View File

@ -636,7 +636,7 @@ func (c *Client) EditIssue(owner, repo string, number int64, req EditIssueReques
}
defer resp.Body.Close()
if resp.StatusCode != http.StatusOK {
if resp.StatusCode != http.StatusOK && resp.StatusCode != http.StatusCreated {
respBody, _ := io.ReadAll(resp.Body)
return fmt.Errorf("forgejo API returned %d: %s", resp.StatusCode, string(respBody))
}