[PR #208] [MERGED] feat: selective starred repo mirroring with autoMirrorStarred toggle #1586

Closed
opened 2026-04-24 18:20:38 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/RayLabsHQ/gitea-mirror/pull/208
Author: @arunavo4
Created: 3/3/2026
Status: Merged
Merged: 3/4/2026
Merged by: @arunavo4

Base: mainHead: fix/starred-repo-handling


📝 Commits (3)

  • 72f5506 feat: add autoMirrorStarred toggle for selective starred repo mirroring (#205)
  • 4873206 fix: log activity when repos are auto-imported during scheduled sync
  • 7471906 ci: set 10-minute timeout on all CI jobs

📊 Changes

16 files changed (+152 additions, -13 deletions)

View changed files

📝 .github/workflows/astro-build-test.yml (+1 -0)
📝 .github/workflows/docker-build.yml (+1 -0)
📝 .github/workflows/e2e-tests.yml (+1 -1)
📝 .github/workflows/helm-test.yml (+2 -0)
📝 .github/workflows/nix-build.yml (+1 -0)
📝 docs/ENVIRONMENT_VARIABLES.md (+1 -0)
📝 src/components/config/ConfigTabs.tsx (+1 -0)
📝 src/components/config/GitHubMirrorSettings.tsx (+25 -0)
📝 src/components/repositories/Repository.tsx (+10 -8)
📝 src/hooks/useConfigStatus.ts (+12 -0)
📝 src/lib/db/schema.ts (+1 -0)
📝 src/lib/env-config-loader.ts (+3 -0)
📝 src/lib/repository-cleanup-service.ts (+7 -0)
📝 src/lib/scheduler-service.ts (+83 -4)
📝 src/lib/utils/config-mapper.ts (+2 -0)
📝 src/types/config.ts (+1 -0)

📄 Description

Summary

Closes #205. Adds autoMirrorStarred config toggle (default: false) so users can import starred repos for browsing without auto-mirroring everything.

  • New toggle: githubConfig.autoMirrorStarred controls whether starred repos are included in scheduler auto-mirror, first-boot mirror, and "Mirror All" — manual per-repo mirroring always works
  • Bug fix: Cleanup service no longer treats starred repos as orphaned when includeStarred is disabled (prevents data loss)
  • Bug fix: First-boot performInitialAutoStart() now gates mirroring behind autoMirror config (previously mirrored all imported repos unconditionally)
  • Enhancement: Bulk mirror and action eligibility now include pending-approval status for force-push blocked repos
  • Env var: AUTO_MIRROR_STARRED=true to enable via environment

Test plan

  • bun run build passes
  • bun test passes (161 pass, 0 fail)
  • Manual: with autoMirrorStarred: false — starred repos import but scheduler/Mirror All skip them; individual mirror works
  • Manual: with autoMirrorStarred: true — everything mirrors automatically as before
  • Manual: disable includeStarred with already-mirrored starred repos — cleanup does NOT orphan them
  • Manual: first boot with autoMirror: false — no repos get auto-mirrored

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/RayLabsHQ/gitea-mirror/pull/208 **Author:** [@arunavo4](https://github.com/arunavo4) **Created:** 3/3/2026 **Status:** ✅ Merged **Merged:** 3/4/2026 **Merged by:** [@arunavo4](https://github.com/arunavo4) **Base:** `main` ← **Head:** `fix/starred-repo-handling` --- ### 📝 Commits (3) - [`72f5506`](https://github.com/RayLabsHQ/gitea-mirror/commit/72f5506c366420fb4a98db7e4718aab521d0c2a3) feat: add autoMirrorStarred toggle for selective starred repo mirroring (#205) - [`4873206`](https://github.com/RayLabsHQ/gitea-mirror/commit/48732061e101d11a4d5612a36f83a1ab4db07114) fix: log activity when repos are auto-imported during scheduled sync - [`7471906`](https://github.com/RayLabsHQ/gitea-mirror/commit/747190693213eb9bf510ac6182a2e3026309a276) ci: set 10-minute timeout on all CI jobs ### 📊 Changes **16 files changed** (+152 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/astro-build-test.yml` (+1 -0) 📝 `.github/workflows/docker-build.yml` (+1 -0) 📝 `.github/workflows/e2e-tests.yml` (+1 -1) 📝 `.github/workflows/helm-test.yml` (+2 -0) 📝 `.github/workflows/nix-build.yml` (+1 -0) 📝 `docs/ENVIRONMENT_VARIABLES.md` (+1 -0) 📝 `src/components/config/ConfigTabs.tsx` (+1 -0) 📝 `src/components/config/GitHubMirrorSettings.tsx` (+25 -0) 📝 `src/components/repositories/Repository.tsx` (+10 -8) 📝 `src/hooks/useConfigStatus.ts` (+12 -0) 📝 `src/lib/db/schema.ts` (+1 -0) 📝 `src/lib/env-config-loader.ts` (+3 -0) 📝 `src/lib/repository-cleanup-service.ts` (+7 -0) 📝 `src/lib/scheduler-service.ts` (+83 -4) 📝 `src/lib/utils/config-mapper.ts` (+2 -0) 📝 `src/types/config.ts` (+1 -0) </details> ### 📄 Description ## Summary Closes #205. Adds `autoMirrorStarred` config toggle (default: `false`) so users can import starred repos for browsing without auto-mirroring everything. - **New toggle**: `githubConfig.autoMirrorStarred` controls whether starred repos are included in scheduler auto-mirror, first-boot mirror, and "Mirror All" — manual per-repo mirroring always works - **Bug fix**: Cleanup service no longer treats starred repos as orphaned when `includeStarred` is disabled (prevents data loss) - **Bug fix**: First-boot `performInitialAutoStart()` now gates mirroring behind `autoMirror` config (previously mirrored all imported repos unconditionally) - **Enhancement**: Bulk mirror and action eligibility now include `pending-approval` status for force-push blocked repos - **Env var**: `AUTO_MIRROR_STARRED=true` to enable via environment ## Test plan - [x] `bun run build` passes - [x] `bun test` passes (161 pass, 0 fail) - [x] Manual: with `autoMirrorStarred: false` — starred repos import but scheduler/Mirror All skip them; individual mirror works - [x] Manual: with `autoMirrorStarred: true` — everything mirrors automatically as before - [x] Manual: disable `includeStarred` with already-mirrored starred repos — cleanup does NOT orphan them - [x] Manual: first boot with `autoMirror: false` — no repos get auto-mirrored --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-24 18:20:38 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea-mirror#1586