dev#37
Merged
Merged
Conversation
doc: basic updates of missing gaps
add recursive search for `.issues` directory to enable cli commands from any subdirectories of a parent directory that is initialised
Use updatedAt from GitHub to skip issues where updatedAt <= syncedAt. Fan out comment fetches with 20 concurrent workers. Build local index once per sync instead of re-scanning on every pullOne call. Cold sync: ~500s -> 42s. Warm sync: ~500s -> 12s (list call only).
There was a problem hiding this comment.
6 issues found across 17 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="cmd/push.go">
<violation number="1" location="cmd/push.go:130">
P2: Draft detection is too narrow; it ignores comments with metadata but no ID. Those local comments are not pushed.</violation>
</file>
<file name="cmd/merge.go">
<violation number="1" location="cmd/merge.go:120">
P2: `mergeOnlineLocal` commits local merge metadata before remote deletion succeeds. This can leave incorrect local history on error paths.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
|
|
||
| pushed := 0 | ||
| for _, c := range local { | ||
| if c.Metadata == nil { |
There was a problem hiding this comment.
P2: Draft detection is too narrow; it ignores comments with metadata but no ID. Those local comments are not pushed.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At cmd/push.go, line 130:
<comment>Draft detection is too narrow; it ignores comments with metadata but no ID. Those local comments are not pushed.</comment>
<file context>
@@ -104,5 +112,38 @@ func pushOne(root string, iss *issue.Issue) error {
+
+ pushed := 0
+ for _, c := range local {
+ if c.Metadata == nil {
+ if err := gh.AddComment(iss.Number, c.Body); err != nil {
+ return err
</file context>
Suggested change
| if c.Metadata == nil { | |
| if c.Metadata == nil || c.Metadata.ID == "" { |
| return fmt.Errorf("reading comments: %w", err) | ||
| } | ||
| comments = append(comments, &issue.Comment{Body: commentBody}) | ||
| if err := issue.WriteComments(commentsPath, comments); err != nil { |
There was a problem hiding this comment.
P2: mergeOnlineLocal commits local merge metadata before remote deletion succeeds. This can leave incorrect local history on error paths.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At cmd/merge.go, line 120:
<comment>`mergeOnlineLocal` commits local merge metadata before remote deletion succeeds. This can leave incorrect local history on error paths.</comment>
<file context>
@@ -0,0 +1,172 @@
+ return fmt.Errorf("reading comments: %w", err)
+ }
+ comments = append(comments, &issue.Comment{Body: commentBody})
+ if err := issue.WriteComments(commentsPath, comments); err != nil {
+ return fmt.Errorf("saving comment: %w", err)
+ }
</file context>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by cubic
Adds first-class comment support with local drafts and a new
issues mergecommand for handling duplicates. Sync is much faster by skipping unchanged issues and fetching comments in parallel, and commands now work from subdirectories.New Features
.comments.jsonwith metadata;issues comment <number>drafts;issues view <number> -cprints;issues pushposts drafts and refreshes IDs;issues pull/pushhandle comments for all or a single issue.issues merge <a> <b>adds cross-reference comments and closes the duplicate; works for GitHub↔local and local↔local with safe prompts..issuesso commands work from nested folders.Performance
updatedAtvs localsyncedAt.Written for commit da40e4f. Summary will update on new commits.