fix(vcs): thread CommitID through abstraction layer (#114) #117
@@ -108,6 +108,7 @@ func (c *Client) PostReview(ctx context.Context, owner, repo string, number int,
|
|||||||
} else if payload.CommitID != comment.CommitID {
|
} else if payload.CommitID != comment.CommitID {
|
||||||
|
|
|||||||
return nil, ErrConflictingCommitIDs
|
return nil, ErrConflictingCommitIDs
|
||||||
}
|
}
|
||||||
|
// else: matching SHA is a no-op by design
|
||||||
}
|
}
|
||||||
payload.Comments = append(payload.Comments, reviewCommentEntry{
|
payload.Comments = append(payload.Comments, reviewCommentEntry{
|
||||||
Path: comment.Path,
|
Path: comment.Path,
|
||||||
|
|||||||
+2
-1
@@ -97,6 +97,7 @@ type ReviewRequest struct {
|
|||||||
// CommitID anchors the review to a specific commit SHA.
|
// CommitID anchors the review to a specific commit SHA.
|
||||||
// If empty, the platform defaults to the current PR head.
|
// If empty, the platform defaults to the current PR head.
|
||||||
// Adapters use this as the primary commit anchor for the review submission.
|
// Adapters use this as the primary commit anchor for the review submission.
|
||||||
|
sonnet-review-bot
commented
[NIT] Inconsistent alignment: **[NIT]** Inconsistent alignment: `CommitID string` has extra whitespace padding (`string `json:...`) that doesn't match the adjacent `Event ReviewEvent` field. Likely a gofmt artefact from editing — should be cleaned up so `go vet`/`gofmt` stays clean.
|
|||||||
CommitID string `json:"commit_id,omitempty"`
|
CommitID string `json:"commit_id,omitempty"`
|
||||||
|
|
||||||
Comments []ReviewComment `json:"comments,omitempty"`
|
Comments []ReviewComment `json:"comments,omitempty"`
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user
[NIT] The comment
// else: matching SHA is a no-op by designis helpful but slightly inconsistent with Go style (comments above the code they describe, not as trailing-else). Minor style point with no functional impact.