Handle 201 when ensuring ticket is open
This commit is contained in:
parent
a59088dc35
commit
ee703b08e4
|
|
@ -636,7 +636,7 @@ func (c *Client) EditIssue(owner, repo string, number int64, req EditIssueReques
|
||||||
}
|
}
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
|
|
||||||
if resp.StatusCode != http.StatusOK {
|
if resp.StatusCode != http.StatusOK && resp.StatusCode != http.StatusCreated {
|
||||||
respBody, _ := io.ReadAll(resp.Body)
|
respBody, _ := io.ReadAll(resp.Body)
|
||||||
return fmt.Errorf("forgejo API returned %d: %s", resp.StatusCode, string(respBody))
|
return fmt.Errorf("forgejo API returned %d: %s", resp.StatusCode, string(respBody))
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue