Skip to content

GitHub stars sync starts at ?page=2 instead of ?page=1 #8

@bengreeno

Description

@bengreeno

Summary

The GitHub Stars plugin appears to start syncing from ?page=2 instead of ?page=1, which causes the first page of starred repos to be skipped.

What I observed

On a fresh karakeep-sync run with only GitHub stars enabled, the logs show the first GitHub request as:

fetching GitHub stars with params: ?page=2

The sync then processes only the items from that page and completes.

In my case, page 2 contained 7 items, and the sync created 7 bookmarks.

Additional behavior

On subsequent runs, the sync logs show:

5 consecutive existing posts found, stopping sync

So once page 2 items already exist in Karakeep, the sync stops early and still never reaches page 1.

Expected behavior

The first GitHub Stars request should start at ?page=1 (or equivalent default first page behavior), then follow pagination normally.

Actual behavior

The stream is seeded with page 2, so the first page of starred repositories is skipped.

Source location

I traced this to:

crates/sync/src/plugin/github_stars.rs

Current code seeds the stream with:

stream::unfold(Some("?page=2".to_string()), ...)

Changing that to:

stream::unfold(Some("?page=1".to_string()), ...)

fixed the issue locally in my test setup.

Environment

  • karakeep-sync image: ghcr.io/sidoshi/karakeep-sync:latest
  • Karakeep self-hosted via Docker Compose
  • GitHub stars plugin enabled
  • Other plugins disabled

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions