Skip to main content

Github Local Mirror

@evrardjp/github-local-mirrorv2026.07.23.2· 4d agoMODELSREPORTS
01README

Swamp-backed local GitHub mirror: keeps a local git object cache plus queryable Swamp metadata for PRs, issues, comments, reviews, checks, patch revisions, and local review worktrees.

02Release Notes

2026.07.23.2

Added: The @evrardjp/github-repo-review-focus report classifies every mirrored open pull request into a deterministic reviewer action queue and includes reviewer load, label concentration, large changes, path overlap, and stale backlog summaries in Markdown and JSON.

Changed: Model definitions can configure reviewerHandles and reviewFocusStaleDays. Report rendering uses stored mirror data only and marks missing current-HEAD or collection data as incomplete instead of ready.

Upgrade note: Existing models remain valid with no configured reviewer handles and a 14-day stale threshold. Configure reviewerHandles to enable the personal Re-review and Requested From You queues.

03Models1
@evrardjp/github-local-mirrorv2026.07.23.2github_local_mirror.ts

Global Arguments

ArgumentTypeDescription
ownerstring
repostring
githubToken?string
gitObjectPathstringPath to the managed bare git object repository used by the mirror
workspaceRootstringDirectory where prepare_worktree creates editable worktrees
artifactRootstringDirectory where sync stores durable mirror artifacts and cursors
gitRemotestring
gitRemoteUrl?string
sshRemoteBasestring
syncOverlapMinutesnumber
firstSyncSince?string
knownRemotesrecord
timelineCodeGranularityenum
needsClarificationLabelsarray
reviewerHandlesarray
reviewFocusStaleDaysnumber
maxApiPagesnumber
fn sync(budgetSeconds?: number)
Fetch GitHub refs plus full PR/issue metadata into the local mirror and Swamp index
ArgumentTypeDescription
budgetSeconds?number
fn prepare_worktree(prNumber: number, identity?: string)
Create an editable local worktree for the latest mirrored PR head without calling GitHub
ArgumentTypeDescription
prNumbernumber
identity?string
fn prepare_review_context(subjectType: enum, number: number)
Validate a mirrored review subject and refresh local worktree evidence
ArgumentTypeDescription
subjectTypeenum
numbernumber
fn record_pr_analysis(prNumber: number, headSha: string, generator: string, codePathWalkthrough: string, reviewAttentionMap: string, evidenceRefs: array)
Record generated review evidence for the current PR head
ArgumentTypeDescription
prNumbernumber
headShastring
generatorstring
codePathWalkthroughstring
reviewAttentionMapstring
evidenceRefsarray
fn analyze_worktrees()
Analyze registered worktrees for stale PR heads, dirty state, missing paths, and local commits
fn close_merged_worktrees()
Remove non-dirty worktrees for merged pull requests while retaining their review branches
fn status()
Write and return the current local mirror status summary

Resources

mirrorState(infinite)— Durable mirror cursors and sync state
repoSnapshot(infinite)— GitHub repository metadata snapshot
prSnapshot(infinite)— Pull request snapshot with branch, state, and remote metadata
prRevision(infinite)— Observed PR head revision and local patch artifact references
prHeadState(infinite)— Current PR head read from the fetched local Git ref
prFileSnapshot(infinite)— Changed file metadata for one PR revision
issueSnapshot(infinite)— Issue snapshot
activityEvent(infinite)— Issue/PR comments, reviews, review comments, and timeline events
subjectReference(infinite)— References between mirrored GitHub subjects
prCommit(infinite)— Commit belonging to a pull request
collectionStatus(infinite)— Completeness status for a GitHub API subcollection
prAnalysisEvidence(infinite)— Generated review context tied to an exact PR head
reviewSelection(infinite)— PR or issue selected for the current context report
checkRunSnapshot(infinite)— GitHub check run status for PR heads
worktreeSnapshot(infinite)— Registered local review worktree
worktreeAnalysis(infinite)— Automated analysis of local review worktree freshness and state
worktreeCleanupRun(infinite)— Results from one merged pull request worktree cleanup run
syncRunSummary(infinite)— One sync run summary
mirrorStatus(infinite)— Current mirror status summary
04Reports3
@evrardjp/github-local-mirror-statusmodel
github_local_mirror_status.ts

Summarize sync freshness, local mirror paths, and registered worktree state for a GitHub local mirror model.

@evrardjp/github-pr-contextmodel
github_pr_context.ts

Render a complete local-mirror PR or issue context cluster, readiness, timeline, worktree state, and analysis evidence.

@evrardjp/github-repo-review-focusmodel
github_repo_review_focus.ts

Build a deterministic repository-wide reviewer action queue from stored local-mirror data.

05Previous Versions6
2026.07.23.1

2026.07.23.1

Fixed: Sync now updates canonical branches such as refs/heads/main in the managed bare repository instead of leaving them stale while fetching only into hard-coded refs/remotes/origin/* references.

Changed: The configured gitRemote now determines the remote-tracking namespace. Upstream branches are also available through canonical branch names, while local worktree branches remain independent.

Upgrade note: After pulling this version, run sync once to refresh stale canonical branch references in existing bare mirrors. If a custom gitRemote was previously used and origin is not a separate remote you need to retain, remove its legacy stale refs with git --git-dir <path> for-each-ref --format='delete %(refname)' refs/remotes/origin | git --git-dir <path> update-ref --stdin.

2026.07.22.2

2026.07.22.2

Added: The close_merged_worktrees method removes non-dirty worktrees after their pull requests are merged while retaining their review branches and local commits.

Changed: The local mirror status report now shows merged cleanup candidates, successful removals, and cleanup failures. One dirty worktree no longer prevents other eligible worktrees from being processed.

Upgrade note: Add close_merged_worktrees between sync and analyze_worktrees in scheduled mirror workflows to enable automatic cleanup.

Modified 1 models

2026.07.22.1

2026.07.22.1

Fixed: Bounded syncs now emit each repository-level collection status once when budgetSeconds expires, avoiding duplicate data instance names while still recording incomplete PR and issue collection state.

2026.07.21.1

Fixed: Context reports can be retrieved after prepare_review_context without resupplying method arguments, because the selected PR or issue is now retained in Swamp.

Fixed: Comment-only reviews no longer clear an active changes-requested state, dismissed reviews now clear it, and missing check-run data now leaves CI readiness Unknown instead of reporting that no fixes are needed.

Fixed: Commit timelines exclude commits dropped by a force-push, initial PR revisions use the Git merge base, and incremental PR listing stops once records are older than the sync window.

Fixed: Local repository references are matched case-insensitively and generated analysis commands safely quote model names.

Upgrade note: Run sync after upgrading so PR commits are recorded against their current head. Until an older PR is resynced, its legacy commit records remain visible; once current-head records exist, stale and legacy records are excluded from its timeline.

2026.07.21.1

2026.07.21.1

Fixed: Context reports can be retrieved after prepare_review_context without resupplying method arguments, because the selected PR or issue is now retained in Swamp.

Fixed: Comment-only reviews no longer clear an active changes-requested state, dismissed reviews now clear it, and missing check-run data now leaves CI readiness Unknown instead of reporting that no fixes are needed.

Fixed: Commit timelines exclude commits dropped by a force-push, initial PR revisions use the Git merge base, and incremental PR listing stops once records are older than the sync window.

Fixed: Local repository references are matched case-insensitively and generated analysis commands safely quote model names.

Upgrade note: Run sync after upgrading so PR commits are recorded against their current head. Until an older PR is resynced, its legacy commit records remain visible; once current-head records exist, stale and legacy records are excluded from its timeline.

Modified 1 models

2026.07.20.1

2026.07.20.1

Added: @evrardjp/github-pr-context provides a deterministic issue-centered PR/issue timeline with complete comments and event data, per-push or per-commit changed-file tables, local Git inspection commands, worktree state, and tri-state review readiness facts.

Added: PR and issue bodies, subject references, PR commits, richer review events, and collection-completeness records are retained in Swamp. External references remain unresolved and expose their URL when known.

Added: prepare_review_context selects a mirrored PR or issue, while record_pr_analysis stores code-path walkthrough and review-attention evidence tied to an exact PR head. The bundled github-pr-review skill asks before generating missing LLM evidence.

Changed: GitHub pagination is bounded and incomplete timeline, check, commit, or snapshot collection is recorded explicitly. Incomplete syncs no longer advance the successful cursor.

Fixed: Incomplete PR file pagination is retried for the same head until the complete changed-file set has been stored.

Upgrade note: Run sync after upgrading to populate the new context, relationship, commit, and collection-status resources. Existing snapshots remain compatible, but readiness remains Unknown until completeness records exist.

Modified 1 models. Added 1 reports. updated labels

2026.07.17.1

2026.07.17.1

Added: Initial @evrardjp/github-local-mirror extension with a repo mirror model, full-fidelity sync, prepare_worktree, analyze_worktrees, and status methods.

Added: Local patch revision artifacts, contributor fork remote discovery, Swamp-indexed PR/issue activity, check run snapshots, worktree snapshots, and worktree stale/dirty/ahead analysis.

Added: @evrardjp/github-local-mirror-status report for mirror freshness and local worktree state.

Upgrade note: This is a new extension and stores data separately from @evrardjp/github-project-activity.

06Stats
A
100 / 100
Downloads
0
Archive size
91.1 KB
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types (deprecated)1/1earned
  • Dependencies pass trust audit2/2earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License declared1/1earned
  • Verified public repository2/2earned
07Platforms
08Labels