Skip to content

Add support for multiple git repositories in prompt sync extension#2

Merged
MatFillion merged 9 commits intomainfrom
copilot/fix-1
Sep 17, 2025
Merged

Add support for multiple git repositories in prompt sync extension#2
MatFillion merged 9 commits intomainfrom
copilot/fix-1

Conversation

Copy link
Contributor

Copilot AI commented Sep 15, 2025

This PR implements support for syncing prompts from multiple Git repositories simultaneously, addressing the need for users who collaborate across multiple projects or maintain prompt collections in different repositories.

Key Changes

🔧 Configuration Schema Updates

  • Added promptsSync.repositories array setting to support multiple repository URLs
  • Maintained backward compatibility with existing promptsSync.repository single repository setting
  • Updated VS Code extension manifest with proper JSON schema validation

🚀 Enhanced Sync Logic

  • Multi-Repository Processing: The sync manager now iterates through all configured repositories sequentially
  • Individual Error Handling: Each repository is processed independently - failures in one repository don't prevent others from syncing
  • Aggregated Results: Combines results from all repositories to provide comprehensive sync statistics

📊 Improved User Experience

  • Partial Success Notifications: New notification system handles scenarios where some repositories succeed while others fail
  • Detailed Status Display: Shows repository count and individual repository URLs in the status view
  • Enhanced Error Reporting: Repository-specific error messages help users troubleshoot issues

🔄 Backward Compatibility

The implementation ensures existing configurations continue working without changes:

  • If promptsSync.repositories is empty or undefined, falls back to promptsSync.repository
  • All existing settings and behaviors remain unchanged
  • No breaking changes for current users

Example Configuration

{
  "promptsSync.repositories": [
    "https://github.com/your-org/prompts-main",
    "https://github.com/your-org/prompts-experimental", 
    "https://github.com/another-org/shared-prompts"
  ]
}

Error Handling

The extension gracefully handles various scenarios:

  • Complete Success: All repositories sync successfully
  • Partial Success: Some repositories succeed, others fail (shows warning with details)
  • Complete Failure: All repositories fail (shows error notification)

Each scenario provides appropriate user feedback with actionable next steps.

Fixes #1.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copy link
Contributor Author

Copilot AI commented Sep 15, 2025

@MatFillion 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs.

I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review.

Co-authored-by: MatFillion <7029537+MatFillion@users.noreply.github.com>
Copilot AI changed the title [WIP] Support multiple git repositories for prompt sync Add support for multiple git repositories in prompt sync extension Sep 15, 2025
Copilot AI requested a review from MatFillion September 15, 2025 02:28
@NathBo470 NathBo470 marked this pull request as ready for review September 17, 2025 15:57
@jeanplevesque
Copy link
Member

@NathBo470 Please add screenshots of how it looks in VS Code to setup the multi-repos.

@MatFillion
Copy link
Member

image Looks like this @NathBo470 @jeanplevesque

@MatFillion MatFillion merged commit 9c25852 into main Sep 17, 2025
1 check failed
@MatFillion MatFillion deleted the copilot/fix-1 branch October 17, 2025 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support multiple git repositories for prompt sync

4 participants