Skip to content

Conversation

@skerbis
Copy link
Member

@skerbis skerbis commented Nov 16, 2025

πŸš€ Features

GitHub Sync Status

  • βœ… Smart Update Detection: Compare GitHub commit dates with REDAXO update dates
  • βœ… Intelligent Buttons: Show 'Update' (orange) when GitHub is newer, 'Reload' (gray) when current
  • βœ… Date Display: Show both GitHub and REDAXO dates in sync status column
  • βœ… Support for Modules & Templates: Full sync tracking for both content types

Performance Optimization

  • βœ… GitHubItemCache System: Efficient database-backed caching
  • βœ… 1-hour Cache Lifetime: Minimize GitHub API requests
  • βœ… Auto-Cache Update: Automatically refresh cache on install/update
  • βœ… Rate Limit Friendly: Only check GitHub once per hour per item

Technical Changes

  • πŸ†• New GitHubItemCache class for cache management
  • πŸ†• Database table rex_github_installer_items for metadata storage
  • πŸ†• install.php and uninstall.php for table management
  • πŸ“ Extended GitHubApi::getLastCommitDate() method
  • πŸ“ Updated RepositoryManager::getModulesWithStatus() and getTemplatesWithStatus()
  • πŸ“ Cache integration in NewInstallManager and UpdateManager
  • 🌐 New translations: modules_update, modules_reload, template_sync_status

🎯 Version

  • Version bump: 1.4.0 β†’ 1.5.0

πŸ“Έ UI Changes

  • New 'Sync-Status' column in modules and templates tables
  • Color-coded badges: Orange 'Update' vs Green 'Current'
  • Timestamp display for last GitHub commit and REDAXO update

⚠️ Breaking Changes

None - fully backward compatible

πŸ“¦ Database Migration

  • Requires re-installation or table creation via install.php
  • Safe to upgrade - no data loss

- Add GitHub commit date comparison for modules and templates
- Show 'Update' button when GitHub version is newer, 'Reload' when current
- Display GitHub and REDAXO dates in sync status column
- Implement GitHubItemCache for efficient API rate limit management
- Cache GitHub data for 1 hour to minimize API requests
- Automatically update cache on install/update operations
- Add database table for persistent GitHub metadata storage
- Support for both modules and templates sync tracking
- Version bump to 1.5.0
Copilot AI review requested due to automatic review settings November 16, 2025 18:57
@skerbis skerbis merged commit 5f51f5d into main Nov 16, 2025
2 checks passed
@skerbis skerbis deleted the feature/github-update-status branch November 16, 2025 18:57
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a comprehensive GitHub sync status feature with intelligent caching to track whether installed modules and templates are up-to-date with their GitHub repositories. The implementation adds visual indicators showing when updates are available and optimizes API usage through a 1-hour cache system.

Key changes:

  • Database-backed caching system (GitHubItemCache) to minimize GitHub API requests
  • Enhanced status tracking comparing GitHub commit dates with REDAXO update dates
  • UI improvements with color-coded sync status badges and timestamp displays

Reviewed Changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
install.php Creates database table for GitHub item cache with proper indexes
uninstall.php Handles cleanup by dropping cache table on addon removal
lib/GitHubItemCache.php New cache manager class for storing and retrieving GitHub metadata
lib/GitHubApi.php Added method to fetch last commit date for files/folders
lib/RepositoryManager.php Extended module/template status methods to include sync information
lib/NewInstallManager.php Integrated cache updates during fresh installations
lib/UpdateManager.php Integrated cache updates during module/template updates
pages/modules.php Added sync status column with date comparisons and smart button logic
pages/templates.php Added sync status column with date comparisons and smart button logic
package.yml Version bump from 1.4.0 to 1.5.0
lang/de_de.lang German translations for new sync status features
lang/en_gb.lang English translations for new sync status features

πŸ’‘ Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants