fix. harden Go review flow
Fix runner bootstrap and auth handling, preserve queued SHAs, make event/job acceptance atomic, fence stale runs, correct retries and prompts, add fake end-to-end coverage, and fix deployment defaults. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -8,7 +8,6 @@ import (
|
||||
"io"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
@@ -143,6 +142,9 @@ func (c *Client) PostIssueComment(ctx context.Context, repo string, number int,
|
||||
if err := json.Unmarshal(data, &p); err != nil {
|
||||
return 0, err
|
||||
}
|
||||
if p.ID <= 0 {
|
||||
return 0, fmt.Errorf("gitea comment response missing a positive id")
|
||||
}
|
||||
return p.ID, nil
|
||||
}
|
||||
func (c *Client) EditIssueComment(ctx context.Context, repo string, commentID int64, body string) (int64, error) {
|
||||
@@ -160,6 +162,9 @@ func (c *Client) EditIssueComment(ctx context.Context, repo string, commentID in
|
||||
if err := json.Unmarshal(data, &p); err != nil {
|
||||
return 0, err
|
||||
}
|
||||
if p.ID <= 0 {
|
||||
return 0, fmt.Errorf("gitea comment response missing a positive id")
|
||||
}
|
||||
return p.ID, nil
|
||||
}
|
||||
func (c *Client) GetIssueComments(ctx context.Context, repo string, number int) ([]map[string]any, error) {
|
||||
@@ -192,5 +197,3 @@ func (c *Client) GetIssueComment(ctx context.Context, repo string, commentID int
|
||||
}
|
||||
return p, nil
|
||||
}
|
||||
|
||||
var _ = strconv.Itoa
|
||||
|
||||
Reference in New Issue
Block a user