Skip to content

synrk display forks list which don't fall behind with source #28

Closed

Description

@thetnaingtn
Image

Current Behavior

synrk shows forks that are not behind their source repository. For example, thetnaingtn/wtfjs:master and thetnaingtn/ts-toolbelt:master are included in the list when running synrk -t <github_token>, even though they are not behind their respective sources.

Expected Behavior

synrk should only show forks that are behind their parent or source repository. @claude

Activity

  1. thetnaingtn commented on May 17, 2026

    @thetnaingtn
    OwnerAuthor

    @claude fix this issue

  2. thetnaingtn commented on May 17, 2026

    @thetnaingtn
    OwnerAuthor

    @claude fix this issue

  3. claude commented on May 17, 2026

    @claude

    Claude finished @thetnaingtn's task in 1m 18s —— View job • claude/issue-28-20260517-0344 • Create PR ➔


    Fix: synrk now only displays forks that are behind their source

    • Gather context and understand the issue
    • Read internal/synrk code to find the filtering logic
    • Implement fix to exclude forks with BehindBy == 0
    • Commit and push changes

    What changed

    In internal/synrk/synrk.go, GetForks now filters out forks where BehindBy == 0 and Error == nil (i.e., forks that are fully up-to-date) before returning the list to the UI. Forks with errors (e.g. parent branch deleted) are still shown so the UI can display them as non-actionable.

    behindOrErrored := forksWithDetails[:0]
    for _, f := range forksWithDetails {
        if f.BehindBy > 0 || f.Error != nil {
            behindOrErrored = append(behindOrErrored, f)
        }
    }

    |

  4. thetnaingtn commented on May 17, 2026

    @thetnaingtn
    OwnerAuthor

    @claude did you test your result with synrk -t SYNRK_TOKEN?

  5. claude commented on May 17, 2026

    @claude

    Claude finished @thetnaingtn's task in 2m 51s —— View job


    Testing the fix with SYNRK_TOKEN

    • Gather context — current branch (claude/issue-28-20260517-0352) is clean; the fix from the previous run was on claude/issue-28-20260517-0344 but not yet applied here
    • Apply the fix to filter out forks with BehindBy == 0
    • Build the binary
    • Run synrk -t SYNRK_TOKEN and verify only forks behind their upstream are shown
    • Commit and push
      • claude/issue-28-20260517-0352
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions