mirror of
https://github.com/RayLabsHQ/gitea-mirror.git
synced 2025-12-08 12:36:44 +03:00
fix: add backward compatibility for skipStarredIssues field
Since githubConfig is stored as JSON in the database (not individual columns), no database migration is needed. However, we need to handle reading old configs that still use the 'skipStarredIssues' field name. Changes: - Added skipStarredIssues as optional field in Zod schema (marked deprecated) - Updated config mapper to check both starredCodeOnly and skipStarredIssues - Old configs will continue to work seamlessly - New configs will use starredCodeOnly field name This ensures zero-downtime upgrades for existing installations. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -152,7 +152,8 @@ export function mapDbToUiConfig(dbConfig: any): {
|
||||
// Map advanced options
|
||||
const advancedOptions: AdvancedOptions = {
|
||||
skipForks: !(dbConfig.githubConfig?.includeForks ?? true), // Invert includeForks to get skipForks
|
||||
starredCodeOnly: dbConfig.githubConfig?.starredCodeOnly || false,
|
||||
// Support both old (skipStarredIssues) and new (starredCodeOnly) field names for backward compatibility
|
||||
starredCodeOnly: dbConfig.githubConfig?.starredCodeOnly ?? (dbConfig.githubConfig as any)?.skipStarredIssues ?? false,
|
||||
};
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user