Merge pull request 'Handle 201 when ensuring ticket is open' (#62) from update-fix into main

Reviewed-on: https://git.ts.mattnite.net/mattnite/forgejo-tickets/pulls/62
This commit is contained in:
Matthew Knight 2026-02-18 23:40:02 +00:00
commit 0f4286032d
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))
}