Repository navigation
feat(review): Add fixed revision and remote reviews - #12
Conversation
Code Review SummaryAdds remote review support: 🚀 Key Improvements
💡 Minor Suggestions
|
|
This repository is not connected to any of your workspaces. Please connect it at https://app.sourceant.ai to get reviews on it. |
| return err | ||
| } | ||
| } else { | ||
| report(cmd.OutOrStdout(), agent.Reading{Status: result.Status, Review: result.Review}) |
There was a problem hiding this comment.
The reviewer's omitted-file list never reaches a human in the default text output, so binary or oversized files are silently dropped from a snapshot a user believes was complete. Print the omitted paths when the list is non-empty.
| report(cmd.OutOrStdout(), agent.Reading{Status: result.Status, Review: result.Review}) | |
| if len(result.Snapshot.Omitted) != 0 { | |
| fmt.Fprintf(cmd.ErrOrStderr(), "omitted %d file(s) from the snapshot: %s\n", len(result.Snapshot.Omitted), strings.Join(result.Snapshot.Omitted, ", ")) | |
| } | |
| report(cmd.OutOrStdout(), agent.Reading{Status: result.Status, Review: result.Review}) |
| if len(status) != 0 { | ||
| return snapshot, fmt.Errorf("commit tracked changes before submitting a remote snapshot") | ||
| } | ||
| diff, err := checkoutGit(ctx, folder, "diff", "--no-ext-diff", "--no-textconv", settings.base+"..."+settings.head) |
There was a problem hiding this comment.
git diff honours color.ui=always (and diff.wsErrorHighlight), so ANSI escapes can be embedded in the uploaded diff and make the --diff-file bytes.Equal check fail. Add --no-color so the patch is plain regardless of the user's git config.
| diff, err := checkoutGit(ctx, folder, "diff", "--no-ext-diff", "--no-textconv", settings.base+"..."+settings.head) | |
| diff, err := checkoutGit(ctx, folder, "diff", "--no-ext-diff", "--no-textconv", "--no-color", settings.base+"..."+settings.head) |
| "it is committed or not, and say whether it is ready to propose.", | ||
| Args: cobra.MaximumNArgs(1), | ||
| RunE: func(cmd *cobra.Command, args []string) error { | ||
| if format != "" && format != "json" && format != "text" { |
There was a problem hiding this comment.
--format text sets opts.asJSON = false, silently flipping output to text even when the global --json flag was passed; this mutates shared options state for the rest of the process. Only override when the user explicitly asked for json, or reject the combination outright.
| if format != "" && format != "json" && format != "text" { | |
| if format != "" && format != "json" && format != "text" { | |
| return fmt.Errorf("format must be json or text") | |
| } | |
| if format == "json" { | |
| opts.asJSON = true | |
| } |
Allow reviews of specific commits locally or through a remote reviewer. Remote reviews upload committed source and report omitted files.