[PR #279] feat(github): Config to allow/disallow mirroring collaborator repos #2129

Open
opened 2026-05-03 03:06:00 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/RayLabsHQ/gitea-mirror/pull/279
Author: @nikhilbadyal
Created: 5/2/2026
Status: 🔄 Open

Base: mainHead: main


📝 Commits (1)

  • f93a08a feat(github): Config to allow/disallow mirroring collaborator repos

📊 Changes

4 files changed (+324 additions, -2 deletions)

View changed files

📝 src/components/config/GitHubMirrorSettings.tsx (+22 -1)
src/lib/github-collaborator-repos.test.ts (+295 -0)
📝 src/lib/github.ts (+6 -1)
📝 src/types/config.ts (+1 -0)

📄 Description

Summary

Filtered GitHub imports to only include owned repositories by default, preventing noise from collaborator repos.

Key Changes

  • API Filter: Added affiliation: 'owner' to GitHub repo fetching.
  • New Option: Added "Include collaborator repositories" toggle in /config UI.
  • Separation: Org-owned repos remain unaffected as they use a separate API path.
  • Testing: Added unit tests in github-collaborator-repos.test.ts.

Note

: GitHub's API defaults to including all accessible repos; this change gives users explicit control over collaborator repo mirroring.


🔄 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/279 **Author:** [@nikhilbadyal](https://github.com/nikhilbadyal) **Created:** 5/2/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (1) - [`f93a08a`](https://github.com/RayLabsHQ/gitea-mirror/commit/f93a08a3e4571c0f04ced475f848d72b02e1bb94) feat(github): Config to allow/disallow mirroring collaborator repos ### 📊 Changes **4 files changed** (+324 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/components/config/GitHubMirrorSettings.tsx` (+22 -1) ➕ `src/lib/github-collaborator-repos.test.ts` (+295 -0) 📝 `src/lib/github.ts` (+6 -1) 📝 `src/types/config.ts` (+1 -0) </details> ### 📄 Description ### Summary Filtered GitHub imports to only include **owned** repositories by default, preventing noise from collaborator repos. ### Key Changes * **API Filter**: Added `affiliation: 'owner'` to GitHub repo fetching. * **New Option**: Added "Include collaborator repositories" toggle in `/config` UI. * **Separation**: Org-owned repos remain unaffected as they use a separate API path. * **Testing**: Added unit tests in `github-collaborator-repos.test.ts`. > **Note**: GitHub's API defaults to including all accessible repos; this change gives users explicit control over collaborator repo mirroring. --- <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-05-03 03:06:00 -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#2129