mirror of
https://github.com/RayLabsHQ/gitea-mirror.git
synced 2026-05-22 23:51:42 -05:00
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/RayLabsHQ/gitea-mirror/pull/281
Author: @arunavo4
Created: 5/4/2026
Status: ✅ Merged
Merged: 5/4/2026
Merged by: @arunavo4
Base:
main← Head:fix/auto-mirror-starred-trigger📝 Commits (1)
8ac0078fix: make autoMirrorStarred actually trigger auto-mirror (fixes #278)📊 Changes
2 files changed (+79 additions, -30 deletions)
View changed files
📝
src/lib/scheduler-service.test.ts(+45 -0)📝
src/lib/scheduler-service.ts(+34 -30)📄 Description
Summary
Fixes #278. The "Auto-mirror new starred repositories" checkbox under GitHub settings did nothing on its own — it was only a filter layered on top of
scheduleConfig.autoMirror, andautoMirroris only settable via theAUTO_MIRROR_REPOSenv var (no UI). Users who checked the box saw their starred repos auto-imported but never mirrored, contradicting the label.This PR makes
autoMirrorandautoMirrorStarredindependent triggers in the scheduler:autoMirror=true→ auto-mirror owned (and self-starred) reposautoMirrorStarred=true→ auto-mirror repos starred from other ownersChanges are localized to
src/lib/scheduler-service.ts(two spots:runScheduledSyncandperformInitialAutoStart). No schema change, no migration, no new UI.Also normalized the owner comparison to lowercase since GitHub usernames are case-insensitive — previously a self-starred repo whose stored owner casing differed from the configured
githubConfig.ownerwould be misclassified as a third-party star and silently skipped.Behavior change to flag in release notes
Anyone who currently has the starred checkbox on (broken state) will start getting starred repos mirrored on upgrade. Users with
AUTO_MIRROR_REPOS=truesee no change.autoMirrorautoMirrorStarredTest plan
bun test src/lib/scheduler-service.test.ts— added a truth-table test pinning all 4 quadrants, plus case-insensitive owner matchbun test— full suite, 234 pass / 0 failbunx tsc --noEmitonsrc/lib/scheduler-service.ts— no type errors introducedautoMirrorStarred=truewithautoMirror=falseon a config withincludeStarred=trueand confirm new stars get mirrored on the next scheduler tick🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.