[PR #318] [MERGED] feat: Add multi-repository support #348

Open
opened 2025-11-20 04:14:18 -05:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/community-scripts/ProxmoxVE-Local/pull/318
Author: @michelroegl-brunner
Created: 11/13/2025
Status: Merged
Merged: 11/13/2025
Merged by: @michelroegl-brunner

Base: mainHead: feat/add_repo


📝 Commits (6)

  • 72ffc55 feat: Add multi-repository support for script synchronization
  • 498249a fix: Update import extension for repositoryService in githubJsonService
  • 955d0e7 refactor: consolidate scriptDownloader to single JavaScript implementation
  • 5cb7bc9 Add filter Buttons
  • ac23d01 Add helper Text
  • 9608aff Change Position of text

📊 Changes

433 files changed (+2600 additions, -2807 deletions)

View changed files

prisma/migrations/20251113125441_add_repositories/migration.sql (+14 -0)
📝 prisma/schema.prisma (+13 -0)
scripts/json/2fauth.json (+0 -44)
📝 scripts/json/actualbudget.json (+2 -1)
📝 scripts/json/add-iptag.json (+2 -1)
📝 scripts/json/add-netbird-lxc.json (+2 -1)
📝 scripts/json/add-tailscale-lxc.json (+2 -1)
📝 scripts/json/adguard.json (+2 -1)
📝 scripts/json/adventurelog.json (+2 -1)
📝 scripts/json/agentdvr.json (+2 -1)
📝 scripts/json/all-templates.json (+2 -1)
📝 scripts/json/alpine-it-tools.json (+2 -1)
📝 scripts/json/alpine-redlib.json (+2 -1)
📝 scripts/json/alpine-tinyauth.json (+2 -1)
📝 scripts/json/alpine.json (+2 -1)
📝 scripts/json/apache-cassandra.json (+2 -1)
📝 scripts/json/apache-couchdb.json (+2 -1)
📝 scripts/json/apache-guacamole.json (+2 -1)
📝 scripts/json/apache-tika.json (+2 -1)
📝 scripts/json/apache-tomcat.json (+2 -1)

...and 80 more files

📄 Description

Feature: Multi-Repository Support

This PR adds comprehensive multi-repository support, allowing users to manage multiple GitHub repositories as script sources, configure which repositories are active, and filter scripts by repository.

Key Features

Repository Management

  • Multiple Repository Support: Add and manage multiple GitHub repositories as script sources
  • Enable/Disable Repositories: Control which repositories are active and synced
  • Default Repositories: System includes Main (ProxmoxVE) and Dev (ProxmoxVED) repositories that cannot be deleted
  • Repository Priority: Repositories are processed in priority order during sync operations
  • Repository Filtering: Scripts from disabled repositories are automatically excluded from the Available Scripts tab

Repository Filter Buttons

  • Visual Filtering: When multiple repositories are enabled, filter buttons appear in the filter bar
  • Toggle Visibility: Click repository buttons to toggle showing/hiding scripts from that repository
  • Smart Display: Filter buttons only appear when more than one repository is enabled
  • Visual Feedback: Active repository buttons are highlighted with primary styling

Enhanced Help Documentation

  • New Repository Management Section: Added comprehensive top-level "Repositories" section to Help Modal
  • Repository Structure Guide: Documents required repository structure (JSON files in frontend/public/json/, script files in ct/, install/, tools/, vm/ subdirectories)
  • Enable/Disable Behavior: Explains what enabling/disabling repositories does
  • Filter Button Usage: Documents how repository filter buttons work

Implementation Details

Backend Changes

  • src/server/api/routers/scripts.ts: Filters getScriptCardsWithCategories to only include scripts from enabled repositories
  • Repository service integration for fetching enabled repositories

Frontend Changes

  • src/app/_components/FilterBar.tsx: Added repository filter buttons UI with toggle functionality
  • src/app/_components/ScriptsGrid.tsx: Added client-side repository filtering logic
  • src/app/_components/DownloadedScriptsTab.tsx: Added repository filtering support
  • src/app/_components/HelpModal.tsx: Added comprehensive Repository Management documentation section

Data Model

  • Added selectedRepositories field to FilterState interface for tracking selected repository filters
  • Filter state integrates with existing filter persistence system

User Experience

  • Seamless Integration: Repository filtering works alongside existing filters (search, types, categories, etc.)
  • Intuitive Controls: Clear visual indication of which repositories are active and selected
  • Flexible Workflow: Users can enable/disable repositories in settings and filter by repository in the UI
  • Comprehensive Documentation: Help modal provides complete guide to repository management and filtering

Repository Structure Requirements

For a repository to work with this system, it must follow this structure:

  • JSON files: Located in frontend/public/json/ folder at repository root
  • Script files: Organized in subdirectories (ct/, install/, tools/, vm/)

This feature enables users to manage multiple script sources, customize their script library, and efficiently filter scripts by repository source.


🔄 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/community-scripts/ProxmoxVE-Local/pull/318 **Author:** [@michelroegl-brunner](https://github.com/michelroegl-brunner) **Created:** 11/13/2025 **Status:** ✅ Merged **Merged:** 11/13/2025 **Merged by:** [@michelroegl-brunner](https://github.com/michelroegl-brunner) **Base:** `main` ← **Head:** `feat/add_repo` --- ### 📝 Commits (6) - [`72ffc55`](https://github.com/community-scripts/ProxmoxVE-Local/commit/72ffc5597fd1b3a17b5674463dd43611f5db7e07) feat: Add multi-repository support for script synchronization - [`498249a`](https://github.com/community-scripts/ProxmoxVE-Local/commit/498249a25b879ce835771fe9f917a195c6e1e1da) fix: Update import extension for repositoryService in githubJsonService - [`955d0e7`](https://github.com/community-scripts/ProxmoxVE-Local/commit/955d0e72d711cf814c905a449bcaba25d30f5df2) refactor: consolidate scriptDownloader to single JavaScript implementation - [`5cb7bc9`](https://github.com/community-scripts/ProxmoxVE-Local/commit/5cb7bc95fa667e6c0bc838347d54d58f989f2559) Add filter Buttons - [`ac23d01`](https://github.com/community-scripts/ProxmoxVE-Local/commit/ac23d015e0f10c88d13f2d7c2855087a1f7bf627) Add helper Text - [`9608aff`](https://github.com/community-scripts/ProxmoxVE-Local/commit/9608affcf6adc8df4709266d01fb840fd7c8d221) Change Position of text ### 📊 Changes **433 files changed** (+2600 additions, -2807 deletions) <details> <summary>View changed files</summary> ➕ `prisma/migrations/20251113125441_add_repositories/migration.sql` (+14 -0) 📝 `prisma/schema.prisma` (+13 -0) ➖ `scripts/json/2fauth.json` (+0 -44) 📝 `scripts/json/actualbudget.json` (+2 -1) 📝 `scripts/json/add-iptag.json` (+2 -1) 📝 `scripts/json/add-netbird-lxc.json` (+2 -1) 📝 `scripts/json/add-tailscale-lxc.json` (+2 -1) 📝 `scripts/json/adguard.json` (+2 -1) 📝 `scripts/json/adventurelog.json` (+2 -1) 📝 `scripts/json/agentdvr.json` (+2 -1) 📝 `scripts/json/all-templates.json` (+2 -1) 📝 `scripts/json/alpine-it-tools.json` (+2 -1) 📝 `scripts/json/alpine-redlib.json` (+2 -1) 📝 `scripts/json/alpine-tinyauth.json` (+2 -1) 📝 `scripts/json/alpine.json` (+2 -1) 📝 `scripts/json/apache-cassandra.json` (+2 -1) 📝 `scripts/json/apache-couchdb.json` (+2 -1) 📝 `scripts/json/apache-guacamole.json` (+2 -1) 📝 `scripts/json/apache-tika.json` (+2 -1) 📝 `scripts/json/apache-tomcat.json` (+2 -1) _...and 80 more files_ </details> ### 📄 Description ## Feature: Multi-Repository Support This PR adds comprehensive multi-repository support, allowing users to manage multiple GitHub repositories as script sources, configure which repositories are active, and filter scripts by repository. ### Key Features #### Repository Management - **Multiple Repository Support**: Add and manage multiple GitHub repositories as script sources - **Enable/Disable Repositories**: Control which repositories are active and synced - **Default Repositories**: System includes Main (ProxmoxVE) and Dev (ProxmoxVED) repositories that cannot be deleted - **Repository Priority**: Repositories are processed in priority order during sync operations - **Repository Filtering**: Scripts from disabled repositories are automatically excluded from the Available Scripts tab #### Repository Filter Buttons - **Visual Filtering**: When multiple repositories are enabled, filter buttons appear in the filter bar - **Toggle Visibility**: Click repository buttons to toggle showing/hiding scripts from that repository - **Smart Display**: Filter buttons only appear when more than one repository is enabled - **Visual Feedback**: Active repository buttons are highlighted with primary styling #### Enhanced Help Documentation - **New Repository Management Section**: Added comprehensive top-level "Repositories" section to Help Modal - **Repository Structure Guide**: Documents required repository structure (JSON files in `frontend/public/json/`, script files in `ct/`, `install/`, `tools/`, `vm/` subdirectories) - **Enable/Disable Behavior**: Explains what enabling/disabling repositories does - **Filter Button Usage**: Documents how repository filter buttons work ### Implementation Details #### Backend Changes - `src/server/api/routers/scripts.ts`: Filters `getScriptCardsWithCategories` to only include scripts from enabled repositories - Repository service integration for fetching enabled repositories #### Frontend Changes - `src/app/_components/FilterBar.tsx`: Added repository filter buttons UI with toggle functionality - `src/app/_components/ScriptsGrid.tsx`: Added client-side repository filtering logic - `src/app/_components/DownloadedScriptsTab.tsx`: Added repository filtering support - `src/app/_components/HelpModal.tsx`: Added comprehensive Repository Management documentation section #### Data Model - Added `selectedRepositories` field to `FilterState` interface for tracking selected repository filters - Filter state integrates with existing filter persistence system ### User Experience - **Seamless Integration**: Repository filtering works alongside existing filters (search, types, categories, etc.) - **Intuitive Controls**: Clear visual indication of which repositories are active and selected - **Flexible Workflow**: Users can enable/disable repositories in settings and filter by repository in the UI - **Comprehensive Documentation**: Help modal provides complete guide to repository management and filtering ### Repository Structure Requirements For a repository to work with this system, it must follow this structure: - **JSON files**: Located in `frontend/public/json/` folder at repository root - **Script files**: Organized in subdirectories (`ct/`, `install/`, `tools/`, `vm/`) This feature enables users to manage multiple script sources, customize their script library, and efficiently filter scripts by repository source. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2025-11-20 04:14:18 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/ProxmoxVE-Local#348