github_analyzer 0.1.6 copy "github_analyzer: ^0.1.6" to clipboard
github_analyzer: ^0.1.6 copied to clipboard

Analyze GitHub repositories and generate AI context for LLMs with cross-platform support

Changelog #

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

0.1.6 - 2025-11-03 #

πŸ”₯ Breaking Changes #

Removed Automatic .env Loading

  • Removed: Automatic .env file loading due to macOS sandbox restrictions
  • Changed: Users must now explicitly pass githubToken parameter
  • Reason: File system access in sandboxed environments (macOS apps) causes permission errors
  • Migration: Pass tokens directly via parameters or use environment variables

Before (v0.1.5 and earlier):

// Token automatically loaded from .env file
final result = await analyzeForLLM('https://github.com/user/repo');

After (v0.1.6+):

// Token must be passed explicitly
final result = await analyzeForLLM(
  'https://github.com/user/repo',
  githubToken: 'ghp_your_token_here',
);

// Or load from environment variables
import 'dart:io';
final token = Platform.environment['GITHUB_TOKEN'];
final result = await analyzeForLLM(
  'https://github.com/user/repo',
  githubToken: token,
);

πŸ› Critical Fixes #

Fixed Cache Respecting useCache: false Parameter

  • Fixed: Cache was being created even when useCache: false was explicitly set
  • Root Cause: Cache save logic only checked config.enableCache, ignoring useCache parameter
  • Impact: Users couldn't force fresh analysis without modifying config

Technical Details:

// Before (v0.1.5)
if (config.enableCache && cacheService != null) {
  await cacheService!.set(repositoryUrl, cacheKey, result);
}

// After (v0.1.6)
if (useCache && config.enableCache && cacheService != null) {
  await cacheService!.set(repositoryUrl, cacheKey, result);
}

Usage:

// Now correctly bypasses cache
final result = await analyzer.analyze(
  'https://github.com/user/repo',
  useCache: false, // βœ… Cache won't be created
);

πŸ—‘οΈ Removed #

  • EnvLoader: Removed src/common/env_loader.dart (no longer exported)
  • Auto .env Loading: Removed from GithubAnalyzerConfig.create(), .quick(), .forLLM()
  • Service Locator .env: Removed automatic token loading from DI container

✨ Added #

  • Explicit Token Passing: All functions now support direct githubToken parameter
  • DartDoc Documentation: Added comprehensive English documentation to all public APIs
  • Security Guidelines: Added best practices for token management in README

πŸ“ Documentation #

  • Updated README: Reflects new explicit token passing requirement
  • Security Section: Added examples for environment variables and secure storage
  • Migration Guide: Clear before/after examples for upgrading from v0.1.5

πŸ”§ Configuration Changes #

  • autoLoadEnv parameter: Deprecated (kept for backward compatibility, no longer functional)
  • Token Source: Users must provide tokens via:
    • Direct parameter passing
    • Platform.environment['GITHUB_TOKEN']
    • Secure storage (flutter_secure_storage)
    • Build-time environment variables

πŸ“Š Affected Functions #

All convenience functions now require explicit token passing:

  • analyze()
  • analyzeQuick(githubToken: token)
  • analyzeForLLM(githubToken: token)
  • analyzeAndGenerate()

⚠️ Migration Required #

For Public Repositories: No changes needed - works without token.

For Private Repositories:

// Option 1: Environment variable
import 'dart:io';
final token = Platform.environment['GITHUB_TOKEN'];

final result = await analyzeForLLM(
  'https://github.com/user/private-repo',
  githubToken: token,
);

// Option 2: Secure storage (Flutter)
import 'package:flutter_secure_storage/flutter_secure_storage.dart';

final storage = FlutterSecureStorage();
final token = await storage.read(key: 'github_token');

final result = await analyzeQuick(
  'https://github.com/user/private-repo',
  githubToken: token,
);

// Option 3: Config object
final config = await GithubAnalyzerConfig.create(
  githubToken: 'ghp_your_token',
);
final analyzer = await GithubAnalyzer.create(config: config);

🎯 Benefits #

  • βœ… Better Security: No file system access for sensitive data
  • βœ… Cross-Platform: Works reliably on all platforms including sandboxed environments
  • βœ… Explicit Control: Users have full control over token source
  • βœ… Flexibility: Easy integration with various secret management solutions

0.1.5 - 2025-11-03 #

πŸ”₯ Critical Fixes #

Fixed Private Repository Analysis Failure

Private repositories now work seamlessly without requiring explicit token parameters in function calls. The root cause was DI container not detecting token changes between consecutive analyzeForLLM() calls.

✨ Key Changes #

1. HTTP Client Manager - HTTP Redirect Support

  • Added followRedirects: true
  • Added maxRedirects: 5
  • Why: GitHub API uses 302 redirects for ZIP downloads. Without this, all downloads failed immediately.
BaseOptions(
  connectTimeout: requestTimeout,
  receiveTimeout: requestTimeout,
  sendTimeout: requestTimeout,
  followRedirects: true,  // βœ… NEW
  maxRedirects: 5,         // βœ… NEW
)

2. Zip Downloader - Private Repository Detection

  • Added isPrivate parameter to downloadRepositoryAsBytes()
  • Prevents public URL fallback for private repos
  • Forces GitHub API usage when repository is private
Future<Uint8List> downloadRepositoryAsBytes({
  required String owner,
  required String repo,
  required String ref,
  String? token,
  bool isPrivate = false,  // βœ… NEW
})

3. Remote Analyzer Service - Metadata Propagation

  • Now passes metadata?.isPrivate to ZipDownloader
  • Communicates repository visibility status through call chain
final isPrivate = metadata?.isPrivate ?? false;
return await zipDownloader.downloadRepositoryAsBytes(
  owner: owner,
  repo: repo,
  ref: ref,
  token: githubToken,
  isPrivate: isPrivate,  // βœ… NEW
);

4. Service Locator - Token Change Detection (CRITICAL FIX) ⚑

  • Detects when GitHub token changes between function calls
  • Automatically reinitializes DI container with new token
  • This was THE ROOT CAUSE of private repository failures
// βœ… NEW: Detect token changes
if (config != null && getIt.isRegistered<GithubAnalyzerConfig>()) {
  final existingConfig = getIt<GithubAnalyzerConfig>();
  
  // Reinitialize only if token changed
  if (existingConfig.githubToken != config.githubToken) {
    await getIt.reset();
  } else {
    return; // Token same, skip reinitialization
  }
}

🎯 Results #

Before: Private repositories returned 404 even with valid token
After: All repository types work automatically

Repository Type Status Auto-Token Files
Public βœ… Yes 249+
Public (with token) βœ… Yes 49+
Private (with token) βœ… Yes 121+

βœ… User Experience #

No code changes needed. Simply create .env file:

GITHUB_TOKEN=your_token_here

Then use normally:

await analyzeForLLM(
  'https://github.com/private/repo.git',
  outputDir: './output',
);
// βœ… Token auto-loaded from .env, private repo analyzed successfully!

πŸ”§ Technical Details #

  • HTTP redirects now automatically followed (eliminates 302 errors)
  • Private repositories detected via GitHub API metadata
  • DI container intelligently reinitializes on token changes
  • Token detection prevents unnecessary container resets
  • Backward compatible - all existing code continues working

πŸ“Š Testing #

All scenarios now pass:

  • βœ… Public repos without token
  • βœ… Public repos with token
  • βœ… Private repos with token (auto-loaded)
  • βœ… Multiple consecutive analyses with mixed repository types

0.1.4 - 2025-11-03 #

Fixed #

  • Fixed EnvLoader project root detection: EnvLoader now automatically searches for .env file in the project root instead of only the current working directory
    • Added _findEnvFile() method that traverses up to 10 parent directories to locate .env
    • Validates project root by checking for pubspec.yaml or .git to prevent loading .env from unrelated parent directories
    • Resolves issue where Flutter apps and other platforms failed to load .env because the working directory differed from the project root
    • Improved logging to show the full path of loaded .env file for better debugging

Changed #

  • Enhanced EnvLoader.load() to use the new project root detection logic
  • Updated log message to display: .env file loaded successfully from: {path} instead of just .env file loaded successfully
  • Made EnvLoader more robust for multi-platform deployments (macOS, iOS, Android, web)

Impact #

Users no longer need to manually pass GitHub tokens via environment variables. The package will now automatically find and load the .env file from the project root, even when running Flutter apps that execute from different working directories.

Example:

Before: 404 error (token not loaded because .env not found)
After: βœ… Private repository analyzed successfully (token auto-loaded from project root)

0.1.3 - 2025-11-03 #

πŸ”₯ Critical Fixes #

  • Fixed JSON serialization/deserialization bug: Resolved type '_RepositoryMetadata' is not a subtype of type 'Map<String, dynamic>' error in AnalysisResult.fromJson() by implementing custom serialization logic for nested Freezed models

  • Fixed toJson() method: Added manual implementation to properly serialize nested objects (RepositoryMetadata, SourceFile, AnalysisStatistics, AnalysisError)

✨ Improvements #

  • Enhanced demo coverage: Added 3 new comprehensive tests (Convenience Functions, Markdown Generation, Cache Management) bringing total test coverage to 14/14
  • Updated example.dart: Migrated to v0.1.2 API including new methods (fetchMetadataOnly(), getCacheStatistics(), clearCache())
  • Improved test reliability: All 14 tests now pass consistently with 100% success rate

πŸ› οΈ Technical Details #

The serialization issue was caused by json_serializable not properly handling nested Freezed models during deserialization. The fix manually implements fromJson() and toJson() methods to explicitly call the respective methods on nested objects:

// Before (auto-generated, broken)
factory AnalysisResult.fromJson(Map<String, dynamic> json) =>
_$AnalysisResultFromJson(json);

// After (manual implementation, working)
factory AnalysisResult.fromJson(Map<String, dynamic> json) {
return AnalysisResult(
metadata: RepositoryMetadata.fromJson(json['metadata'] as Map<String, dynamic>),
files: (json['files'] as List<dynamic>)
.map((e) => SourceFile.fromJson(e as Map<String, dynamic>))
.toList(),
statistics: AnalysisStatistics.fromJson(json['statistics'] as Map<String, dynamic>),
// ... other fields
);
}

Added #

  • New fetchMetadataOnly() method: Lightweight metadata retrieval (1-3 seconds, API-only, no file download)

    final metadata = await analyzer.fetchMetadataOnly('https://github.com/flutter/flutter');
    
  • Configuration validation system: All config values validated at creation time to prevent runtime errors

    • maxFileSize must be > 0
    • maxConcurrentRequests range: 1-20
    • isolatePoolSize range: 1-16
    • maxRetries range: 0-10
    • retryDelay max: 60 seconds
  • New configuration options:

    • enableFileCache: File-level caching control (default: true)
    • autoIsolatePoolThreshold: Auto-enable parallel processing at N files (default: 100)
    • streamingModeThreshold: Archive size threshold for streaming mode (default: 50MB)
    • shouldUseStreamingMode(): Dynamic streaming decision method
  • Security: Token masking: GitHub tokens automatically masked in logs

    • Before: ghp_reallyLongTokenHere123456789xyz9
    • After: ghp_real...xyz9
    • Added SensitiveLogger utility class
    • Tokens no longer exposed in debug logs or toString() output
  • Comprehensive demo.dart: 7 example scenarios covering all features

Fixed #

  • Missing config fields: enableFileCache, autoIsolatePoolThreshold, streamingModeThreshold
  • Undefined AnalyzerErrorCode.invalidInput - replaced with AnalyzerErrorCode.invalidUrl
  • Improved error handling in fetchMetadataOnly() for invalid repository URLs
  • Enhanced validation error messages with clear constraints

Changed #

  • BREAKING: All Freezed models now require abstract keyword (Freezed 3.0.0 compatibility)

    // Before
    @freezed
    class AnalysisError with _$AnalysisError { }
    
    // After
    @freezed
    abstract class AnalysisError with _$AnalysisError { }
    
  • Enhanced toString() output for GithubAnalyzerConfig with masked tokens

  • GithubAnalyzer now includes progress tracking for metadata fetching

  • Configuration validation throws descriptive ArgumentError for invalid values

Migration Required #

dart run build_runner clean
dart run build_runner build --delete-conflicting-outputs

Breaking Changes #

  1. Freezed models: All model classes require abstract or sealed keyword
  2. Configuration validation: Invalid config values now throw ArgumentError at creation time
  3. Regenerate files: All .freezed.dart and .g.dart files must be regenerated

Performance Improvements #

  • Metadata-only fetching reduces API calls and response time (10-60s β†’ 1-3s)
  • Auto-enable isolate pool based on file count threshold
  • Streaming mode for archives over 50MB reduces memory usage

Models Updated (Freezed 3.0.0) #

  • AnalysisError
  • AnalysisProgress
  • AnalysisResult
  • AnalysisStatistics
  • RepositoryMetadata
  • SourceFile

All models now provide:

  • Automatic copyWith()
  • Automatic toJson() / fromJson()
  • Automatic == and hashCode
  • Immutability by default
  • 68% less boilerplate code

0.0.8 - 2025-10-29 #

Added #

  • Explicit cache control parameter: Added useCache parameter to all analysis functions
    • analyze() function now accepts useCache parameter
    • analyzeQuick() function now accepts useCache parameter
    • analyzeForLLM() function now accepts useCache parameter
    • analyzeAndGenerate() function now accepts useCache parameter
    • GithubAnalyzer.analyze() method now accepts useCache parameter
    • GithubAnalyzer.analyzeRemote() method now accepts useCache parameter

Changed #

  • Cache behavior can now be explicitly controlled at the function call level
  • When useCache is not specified, the default value from GithubAnalyzerConfig.enableCache is used
  • When useCache is explicitly set to false, cache is bypassed regardless of config settings

Usage Example #

// Disable cache for a specific analysis
final result = await analyzeQuick(
'https://github.com/flutter/flutter',
useCache: false, // Always fetch fresh data
);

// Or with advanced API
final analyzer = await GithubAnalyzer.create();
final result = await analyzer.analyzeRemote(
repositoryUrl: 'https://github.com/your/repo',
useCache: false,
);

Benefits #

  • Users can now force fresh data fetching when needed
  • Useful for CI/CD pipelines that require latest repository state
  • Provides flexibility without requiring config changes

0.0.7 - 2025-10-19 #

Fixed #

  • Fixed Critical Caching Logic: Resolved a major bug where analyzing a repository immediately after a new push could return stale data from the previous commit.

  • The analyzer now explicitly fetches the latest commit SHA for the target branch before checking the cache or downloading.

  • This exact commitSha is now used consistently as both the cache key and the download reference, eliminating race conditions and cache pollution caused by GitHub API replication delays.

  • Improved Authentication Compatibility: Standardized all GitHub API requests to use the Authorization: Bearer $token header. This ensures compatibility with both classic Personal Access Tokens (PATs) and new fine-grained PATs.

  • Fixed HTTP Retry Bug: Corrected a bug in the HttpClientManager's retry logic that was using an incorrect URI path for retrying timed-out requests, improving overall network resilience.


0.0.6 - 2025-10-15 #

Added #

  • Automatic .env file loading: GitHub tokens are now automatically loaded from .env files
  • EnvLoader utility: New EnvLoader class for seamless environment variable management
  • Private repository support: Enhanced ZIP downloader with GitHub API fallback for private repositories
  • Async configuration factories: All GithubAnalyzerConfig factory methods now support async .env loading
  • GithubAnalyzer.create(): New factory method with automatic dependency injection and .env loading

Changed #

  • Breaking: GithubAnalyzerConfig.quick() and GithubAnalyzerConfig.forLLM() are now async
  • Breaking: Removed synchronous config factories in favor of async versions
  • Improved: ZIP downloader now tries GitHub API first for private repos, then falls back to public URL
  • Enhanced: Token authentication now works seamlessly with Fine-grained Personal Access Tokens

Fixed #

  • Fixed private repository access with Fine-grained GitHub tokens
  • Fixed 403 errors when accessing private repositories
  • Fixed token not being passed correctly to ZIP download endpoints
  • Improved error messages for repository access issues

Documentation #

  • Added comprehensive Fine-grained Token setup guide
  • Updated README with .env file usage examples
  • Added troubleshooting section for private repository access

0.0.5 - 2025-10-14 #

Added #

  • Web platform support with conditional compilation
  • universal_io package integration for cross-platform compatibility
  • Comprehensive file system abstraction layer

Changed #

  • Migrated from dart:io to universal_io for web compatibility
  • Improved error handling for platform-specific features

Fixed #

  • Web platform compilation errors
  • File system access issues on web

0.0.4 - 2025-10-13 #

Added #

  • Incremental analysis support
  • Enhanced caching mechanism
  • Performance optimizations

Changed #

  • Improved analysis speed for large repositories

0.0.3 - 2025-10-12 #

Added #

  • LLM-optimized output format
  • File prioritization system
  • Compact markdown generation

0.0.2 - 2025-10-11 #

Added #

  • Remote repository analysis
  • Local directory analysis
  • Basic caching system

0.0.1 - 2025-10-10 #

Added #

  • Initial release
  • Basic GitHub repository analysis
  • Markdown generation

λ³€κ²½ 둜그 #

이 ν”„λ‘œμ νŠΈμ˜ λͺ¨λ“  μ£Όλͺ©ν•  λ§Œν•œ 변경사항은 이 νŒŒμΌμ— λ¬Έμ„œν™”λ©λ‹ˆλ‹€.

ν˜•μ‹μ€ Keep a Changelogλ₯Ό 기반으둜 ν•˜λ©°, 이 ν”„λ‘œμ νŠΈλŠ” μ˜λ―ΈμžˆλŠ” 버전 관리λ₯Ό λ”°λ¦…λ‹ˆλ‹€.

[0.1.6] - 2025-11-03 #

πŸ”₯ μ£Όμš” 변경사항 (Breaking Changes) #

μžλ™ .env λ‘œλ“œ 제거

  • 제거됨: macOS μƒŒλ“œλ°•μŠ€ μ œν•œμœΌλ‘œ μΈν•œ μžλ™ .env 파일 λ‘œλ“œ 제거
  • λ³€κ²½: μ‚¬μš©μžλŠ” 이제 githubToken νŒŒλΌλ―Έν„°λ₯Ό λͺ…μ‹œμ μœΌλ‘œ 전달해야 함
  • μ‚¬μœ : μƒŒλ“œλ°•μŠ€ ν™˜κ²½(macOS μ•±)μ—μ„œ 파일 μ‹œμŠ€ν…œ μ ‘κ·ΌμœΌλ‘œ μΈν•œ κΆŒν•œ 였λ₯˜
  • λ§ˆμ΄κ·Έλ ˆμ΄μ…˜: νŒŒλΌλ―Έν„°λ‘œ 토큰을 직접 μ „λ‹¬ν•˜κ±°λ‚˜ ν™˜κ²½ λ³€μˆ˜ μ‚¬μš©

이전 (v0.1.5 이전):

// .env νŒŒμΌμ—μ„œ 토큰 μžλ™ λ‘œλ“œ
final result = await analyzeForLLM('https://github.com/user/repo');

이후 (v0.1.6+):

// 토큰을 λͺ…μ‹œμ μœΌλ‘œ 전달해야 함
final result = await analyzeForLLM(
  'https://github.com/user/repo',
  githubToken: 'ghp_your_token_here',
);

// λ˜λŠ” ν™˜κ²½ λ³€μˆ˜μ—μ„œ λ‘œλ“œ
import 'dart:io';
final token = Platform.environment['GITHUB_TOKEN'];
final result = await analyzeForLLM(
  'https://github.com/user/repo',
  githubToken: token,
);

πŸ› 치λͺ…적 버그 μˆ˜μ • #

useCache: false νŒŒλΌλ―Έν„° 쑴쀑 μˆ˜μ •

  • μˆ˜μ •λ¨: useCache: falseλ₯Ό λͺ…μ‹œμ μœΌλ‘œ μ„€μ •ν–ˆμ„ λ•Œλ„ μΊμ‹œκ°€ μƒμ„±λ˜λ˜ 문제
  • κ·Όλ³Έ 원인: μΊμ‹œ μ €μž₯ 둜직이 config.enableCache만 ν™•μΈν•˜κ³  useCache νŒŒλΌλ―Έν„° λ¬΄μ‹œ
  • 영ν–₯: μ‚¬μš©μžκ°€ μ„€μ • μˆ˜μ • 없이 κ°•μ œλ‘œ μƒˆ 뢄석을 μ‹€ν–‰ν•  수 μ—†μŒ

기술 세뢀사항:

// 이전 (v0.1.5)
if (config.enableCache && cacheService != null) {
  await cacheService!.set(repositoryUrl, cacheKey, result);
}

// 이후 (v0.1.6)
if (useCache && config.enableCache && cacheService != null) {
  await cacheService!.set(repositoryUrl, cacheKey, result);
}

μ‚¬μš©λ²•:

// 이제 μ˜¬λ°”λ₯΄κ²Œ μΊμ‹œκ°€ μƒμ„±λ˜μ§€ μ•ŠμŒ
final result = await analyzer.analyze(
  'https://github.com/user/repo',
  useCache: false, // βœ… μΊμ‹œκ°€ μƒμ„±λ˜μ§€ μ•ŠμŒ
);

πŸ—‘οΈ 제거됨 #

  • EnvLoader: src/common/env_loader.dart 제거 (더 이상 내보내지 μ•ŠμŒ)
  • μžλ™ .env λ‘œλ“œ: GithubAnalyzerConfig.create(), .quick(), .forLLM()μ—μ„œ 제거
  • Service Locator .env: DI μ»¨ν…Œμ΄λ„ˆμ˜ μžλ™ 토큰 λ‘œλ“œ 제거

✨ 좔가됨 #

  • λͺ…μ‹œμ  토큰 전달: λͺ¨λ“  ν•¨μˆ˜κ°€ 이제 직접 githubToken νŒŒλΌλ―Έν„° 지원
  • DartDoc λ¬Έμ„œν™”: λͺ¨λ“  곡개 API에 포괄적인 μ˜μ–΄ λ¬Έμ„œ μΆ”κ°€
  • λ³΄μ•ˆ κ°€μ΄λ“œλΌμΈ: README에 토큰 관리 λͺ¨λ²” 사둀 μΆ”κ°€

πŸ“ λ¬Έμ„œν™” #

  • README μ—…λ°μ΄νŠΈ: μƒˆλ‘œμš΄ λͺ…μ‹œμ  토큰 전달 μš”κ΅¬μ‚¬ν•­ 반영
  • λ³΄μ•ˆ μ„Ήμ…˜: ν™˜κ²½ λ³€μˆ˜ 및 λ³΄μ•ˆ μ €μž₯μ†Œ μ‚¬μš© 예제 μΆ”κ°€
  • λ§ˆμ΄κ·Έλ ˆμ΄μ…˜ κ°€μ΄λ“œ: v0.1.5μ—μ„œ μ—…κ·Έλ ˆμ΄λ“œν•˜κΈ° μœ„ν•œ λͺ…ν™•ν•œ 이전/이후 예제

πŸ”§ μ„€μ • 변경사항 #

  • autoLoadEnv νŒŒλΌλ―Έν„°: 더 이상 μ‚¬μš©λ˜μ§€ μ•ŠμŒ (ν•˜μœ„ ν˜Έν™˜μ„±μ„ μœ„ν•΄ μœ μ§€λ˜μ§€λ§Œ κΈ°λŠ₯ μ—†μŒ)
  • 토큰 μ†ŒμŠ€: μ‚¬μš©μžλŠ” λ‹€μŒμ„ 톡해 토큰 μ œκ³΅ν•΄μ•Ό 함:
    • 직접 νŒŒλΌλ―Έν„° 전달
    • Platform.environment['GITHUB_TOKEN']
    • λ³΄μ•ˆ μ €μž₯μ†Œ (flutter_secure_storage)
    • λΉŒλ“œ νƒ€μž„ ν™˜κ²½ λ³€μˆ˜

πŸ“Š 영ν–₯을 λ°›λŠ” ν•¨μˆ˜ #

λͺ¨λ“  편의 ν•¨μˆ˜λŠ” 이제 λͺ…μ‹œμ  토큰 전달 ν•„μš”:

  • analyze()
  • analyzeQuick(githubToken: token)
  • analyzeForLLM(githubToken: token)
  • analyzeAndGenerate()

⚠️ λ§ˆμ΄κ·Έλ ˆμ΄μ…˜ ν•„μˆ˜ #

곡개 μ €μž₯μ†Œμ˜ 경우: λ³€κ²½ 사항 μ—†μŒ - 토큰 없이 μž‘λ™ν•©λ‹ˆλ‹€.

λΉ„κ³΅κ°œ μ €μž₯μ†Œμ˜ 경우:

// μ˜΅μ…˜ 1: ν™˜κ²½ λ³€μˆ˜
import 'dart:io';
final token = Platform.environment['GITHUB_TOKEN'];

final result = await analyzeForLLM(
  'https://github.com/user/private-repo',
  githubToken: token,
);

// μ˜΅μ…˜ 2: λ³΄μ•ˆ μ €μž₯μ†Œ (Flutter)
import 'package:flutter_secure_storage/flutter_secure_storage.dart';

final storage = FlutterSecureStorage();
final token = await storage.read(key: 'github_token');

final result = await analyzeQuick(
  'https://github.com/user/private-repo',
  githubToken: token,
);

// μ˜΅μ…˜ 3: μ„€μ • 객체
final config = await GithubAnalyzerConfig.create(
  githubToken: 'ghp_your_token',
);
final analyzer = await GithubAnalyzer.create(config: config);

🎯 μž₯점 #

  • βœ… 더 λ‚˜μ€ λ³΄μ•ˆ: λ―Όκ°ν•œ 데이터에 λŒ€ν•œ 파일 μ‹œμŠ€ν…œ μ ‘κ·Ό μ—†μŒ
  • βœ… 크둜슀 ν”Œλž«νΌ: μƒŒλ“œλ°•μŠ€ ν™˜κ²½μ„ ν¬ν•¨ν•œ λͺ¨λ“  ν”Œλž«νΌμ—μ„œ μ•ˆμ •μ μœΌλ‘œ μž‘λ™
  • βœ… λͺ…μ‹œμ  μ œμ–΄: μ‚¬μš©μžκ°€ 토큰 μ†ŒμŠ€μ— λŒ€ν•œ μ™„μ „ν•œ μ œμ–΄ κ°€λŠ₯
  • βœ… μœ μ—°μ„±: λ‹€μ–‘ν•œ λΉ„λ°€ 관리 μ†”λ£¨μ…˜κ³Ό μ‰¬μš΄ 톡합

[0.1.5] - 2025-11-03 #

πŸ”₯ 치λͺ…적 버그 μˆ˜μ • #

λΉ„κ³΅κ°œ μ €μž₯μ†Œ 뢄석 μ‹€νŒ¨ μˆ˜μ •

λΉ„κ³΅κ°œ μ €μž₯μ†Œκ°€ 이제 ν•¨μˆ˜ 호좜 κ°„ analyzeForLLM() 연속 호좜 μ‹œ DI μ»¨ν…Œμ΄λ„ˆκ°€ 토큰 변경을 κ°μ§€ν•˜μ§€ λͺ»ν•˜λŠ” κ·Όλ³Έ 원인을 ν•΄κ²°ν•˜μ—¬ λͺ…μ‹œμ  토큰 νŒŒλΌλ―Έν„° 없이 μ›ν™œν•˜κ²Œ μž‘λ™ν•©λ‹ˆλ‹€.

✨ μ£Όμš” 변경사항 #

1. HTTP ν΄λΌμ΄μ–ΈνŠΈ κ΄€λ¦¬μž - HTTP λ¦¬λ‹€μ΄λ ‰νŠΈ 지원

  • followRedirects: true μΆ”κ°€
  • maxRedirects: 5 μΆ”κ°€
  • 이유: GitHub APIλŠ” ZIP λ‹€μš΄λ‘œλ“œμ— 302 λ¦¬λ‹€μ΄λ ‰νŠΈ μ‚¬μš©. μ—†μœΌλ©΄ λͺ¨λ“  λ‹€μš΄λ‘œλ“œ μ¦‰μ‹œ μ‹€νŒ¨.
BaseOptions(
  connectTimeout: requestTimeout,
  receiveTimeout: requestTimeout,
  sendTimeout: requestTimeout,
  followRedirects: true,  // βœ… μ‹ κ·œ
  maxRedirects: 5,         // βœ… μ‹ κ·œ
)

2. Zip λ‹€μš΄λ‘œλ” - λΉ„κ³΅κ°œ μ €μž₯μ†Œ 감지

  • downloadRepositoryAsBytes()에 isPrivate νŒŒλΌλ―Έν„° μΆ”κ°€
  • λΉ„κ³΅κ°œ μ €μž₯μ†Œμ— λŒ€ν•œ 곡개 URL 폴백 λ°©μ§€
  • μ €μž₯μ†Œκ°€ λΉ„κ³΅κ°œμΌ λ•Œ GitHub API μ‚¬μš© κ°•μ œ
Future<Uint8List> downloadRepositoryAsBytes({
  required String owner,
  required String repo,
  required String ref,
  String? token,
  bool isPrivate = false,  // βœ… μ‹ κ·œ
})

3. 원격 뢄석기 μ„œλΉ„μŠ€ - 메타데이터 μ „νŒŒ

  • 이제 ZipDownloader에 metadata?.isPrivate 전달
  • 호좜 체인을 톡해 μ €μž₯μ†Œ κ°€μ‹œμ„± μƒνƒœ 톡신
final isPrivate = metadata?.isPrivate ?? false;
return await zipDownloader.downloadRepositoryAsBytes(
  owner: owner,
  repo: repo,
  ref: ref,
  token: githubToken,
  isPrivate: isPrivate,  // βœ… μ‹ κ·œ
);

4. Service Locator - 토큰 λ³€κ²½ 감지 (치λͺ…적 버그 μˆ˜μ •) ⚑

  • ν•¨μˆ˜ 호좜 κ°„ GitHub 토큰 λ³€κ²½ 감지
  • μƒˆ ν† ν°μœΌλ‘œ DI μ»¨ν…Œμ΄λ„ˆ μžλ™ μž¬μ΄ˆκΈ°ν™”
  • 이것이 λΉ„κ³΅κ°œ μ €μž₯μ†Œ μ‹€νŒ¨μ˜ κ·Όλ³Έ 원인
// βœ… μ‹ κ·œ: 토큰 λ³€κ²½ 감지
if (config != null && getIt.isRegistered<GithubAnalyzerConfig>()) {
  final existingConfig = getIt<GithubAnalyzerConfig>();
  
  // 토큰이 λ³€κ²½λœ κ²½μš°μ—λ§Œ μž¬μ΄ˆκΈ°ν™”
  if (existingConfig.githubToken != config.githubToken) {
    await getIt.reset();
  } else {
    return; // 토큰 동일, μž¬μ΄ˆκΈ°ν™” μŠ€ν‚΅
  }
}

🎯 결과 #

이전: μœ νš¨ν•œ 토큰에도 λΆˆκ΅¬ν•˜κ³  λΉ„κ³΅κ°œ μ €μž₯μ†Œκ°€ 404 λ°˜ν™˜
이후: λͺ¨λ“  μ €μž₯μ†Œ μœ ν˜•μ΄ μžλ™μœΌλ‘œ μž‘λ™

μ €μž₯μ†Œ μœ ν˜• μƒνƒœ μžλ™ 토큰 파일
곡개 βœ… 예 249+
곡개 (토큰 포함) βœ… 예 49+
λΉ„κ³΅κ°œ (토큰 포함) βœ… 예 121+

βœ… μ‚¬μš©μž κ²½ν—˜ #

μ½”λ“œ λ³€κ²½ ν•„μš” μ—†μŒ. κ°„λ‹¨νžˆ .env 파일 생성:

GITHUB_TOKEN=your_token_here

κ·Έ λ‹€μŒ μ •μƒμ μœΌλ‘œ μ‚¬μš©:

await analyzeForLLM(
  'https://github.com/private/repo.git',
  outputDir: './output',
);
// βœ… .envμ—μ„œ 토큰 μžλ™ λ‘œλ“œ, λΉ„κ³΅κ°œ μ €μž₯μ†Œ μ„±κ³΅μ μœΌλ‘œ 뢄석!

πŸ”§ 기술 세뢀사항 #

  • HTTP λ¦¬λ‹€μ΄λ ‰νŠΈ 이제 μžλ™ νŒ”λ‘œμš° (302 였λ₯˜ 제거)
  • GitHub API 메타데이터λ₯Ό 톡해 λΉ„κ³΅κ°œ μ €μž₯μ†Œ 감지
  • DI μ»¨ν…Œμ΄λ„ˆκ°€ 토큰 λ³€κ²½ μ‹œ μ§€λŠ₯적으둜 μž¬μ΄ˆκΈ°ν™”
  • 토큰 κ°μ§€λ‘œ λΆˆν•„μš”ν•œ μ»¨ν…Œμ΄λ„ˆ μž¬μ„€μ • λ°©μ§€
  • ν•˜μœ„ ν˜Έν™˜μ„± μœ μ§€ - κΈ°μ‘΄ μ½”λ“œ 계속 μž‘λ™

πŸ“Š ν…ŒμŠ€νŒ… #

λͺ¨λ“  μ‹œλ‚˜λ¦¬μ˜€ 이제 톡과:

  • βœ… 토큰 μ—†λŠ” 곡개 μ €μž₯μ†Œ
  • βœ… 토큰 μžˆλŠ” 곡개 μ €μž₯μ†Œ
  • βœ… 토큰 μžˆλŠ” λΉ„κ³΅κ°œ μ €μž₯μ†Œ (μžλ™ λ‘œλ“œ)
  • βœ… ν˜Όν•© μ €μž₯μ†Œ μœ ν˜•μ˜ 닀쀑 연속 뢄석

[0.1.4] - 2025-11-03 #

μˆ˜μ •λ¨ #

  • EnvLoader ν”„λ‘œμ νŠΈ 루트 감지 μˆ˜μ •: EnvLoaderλŠ” 이제 ν˜„μž¬ μž‘μ—… λ””λ ‰ν† λ¦¬λ§Œ ν™•μΈν•˜λŠ” λŒ€μ‹  ν”„λ‘œμ νŠΈ λ£¨νŠΈμ—μ„œ .env νŒŒμΌμ„ μžλ™ κ²€μƒ‰ν•©λ‹ˆλ‹€
    • .envλ₯Ό μ°ΎκΈ° μœ„ν•΄ μ΅œλŒ€ 10개 λΆ€λͺ¨ λ””λ ‰ν† λ¦¬κΉŒμ§€ νŠΈλž˜λ²„μŠ€ν•˜λŠ” _findEnvFile() λ©”μ„œλ“œ μΆ”κ°€
    • pubspec.yaml λ˜λŠ” .git ν™•μΈμœΌλ‘œ ν”„λ‘œμ νŠΈ 루트 κ²€μ¦ν•˜μ—¬ λ¬΄κ΄€ν•œ λΆ€λͺ¨ λ””λ ‰ν† λ¦¬μ˜ .env λ‘œλ“œ λ°©μ§€
    • Flutter μ•± 및 기타 ν”Œλž«νΌμ΄ μž‘μ—… 디렉토리가 ν”„λ‘œμ νŠΈ λ£¨νŠΈμ™€ λ‹€λ₯Ό λ•Œ .env λ‘œλ“œ μ‹€νŒ¨ν•˜λŠ” 문제 ν•΄κ²°
    • 더 λ‚˜μ€ 디버깅을 μœ„ν•΄ λ‘œλ“œλœ .env 파일의 전체 경둜λ₯Ό ν‘œμ‹œν•˜λŠ” 둜그 κ°œμ„ 

변경됨 #

  • .env λ‘œλ“œ λ‘œμ§μ„ μƒˆλ‘œμš΄ ν”„λ‘œμ νŠΈ 루트 감지 방식 μ‚¬μš©ν•˜λ„λ‘ κ°•ν™”
  • 둜그 λ©”μ‹œμ§€λ₯Ό λ‹€μŒμœΌλ‘œ μ—…λ°μ΄νŠΈ: .env file loaded successfully from: {path} (κΈ°μ‘΄ .env file loaded successfully λŒ€μ²΄)
  • λ©€ν‹° ν”Œλž«νΌ 배포(macOS, iOS, Android, μ›Ή)에 λŒ€ν•΄ EnvLoader 더 κ°•ν™”

영ν–₯ #

μ‚¬μš©μžλŠ” 더 이상 ν™˜κ²½ λ³€μˆ˜λ₯Ό 톡해 GitHub 토큰을 μˆ˜λ™μœΌλ‘œ 전달할 ν•„μš”κ°€ μ—†μŠ΅λ‹ˆλ‹€. μž‘μ—… 디렉토리가 ν”„λ‘œμ νŠΈ λ£¨νŠΈμ™€ λ‹€λ₯Έ κ²½μš°μ—λ„ νŒ¨ν‚€μ§€κ°€ ν”„λ‘œμ νŠΈ λ£¨νŠΈμ—μ„œ .env νŒŒμΌμ„ μžλ™μœΌλ‘œ μ°Ύκ³  λ‘œλ“œν•©λ‹ˆλ‹€. 예λ₯Ό λ“€μ–΄ Flutter μ•± μ‹€ν–‰ μ‹œ.

예제:

이전: 404 였λ₯˜ (.envλ₯Ό μ°Ύμ§€ λͺ»ν•΄ 토큰 λ‘œλ“œ μ•ˆ 됨)
이후: βœ… λΉ„κ³΅κ°œ μ €μž₯μ†Œ μ„±κ³΅μ μœΌλ‘œ 뢄석 (ν”„λ‘œμ νŠΈ λ£¨νŠΈμ—μ„œ 토큰 μžλ™ λ‘œλ“œ)

[0.1.3] - 2025-11-03 #

πŸ”₯ 치λͺ…적 버그 μˆ˜μ • #

  • JSON 직렬화/역직렬화 버그 μˆ˜μ •: AnalysisResult.fromJson()μ—μ„œ μ€‘μ²©λœ Freezed λͺ¨λΈμ— λŒ€ν•œ μ‚¬μš©μž μ •μ˜ 직렬화 λ‘œμ§μ„ κ΅¬ν˜„ν•˜μ—¬ type '_RepositoryMetadata' is not a subtype of type 'Map<String, dynamic>' 였λ₯˜ ν•΄κ²°

  • toJson() λ©”μ„œλ“œ μˆ˜μ •: μ€‘μ²©λœ 객체(RepositoryMetadata, SourceFile, AnalysisStatistics, AnalysisError)λ₯Ό μ˜¬λ°”λ₯΄κ²Œ μ§λ ¬ν™”ν•˜κΈ° μœ„ν•œ μˆ˜λ™ κ΅¬ν˜„ μΆ”κ°€

✨ κ°œμ„ μ‚¬ν•­ #

  • 데λͺ¨ 컀버리지 κ°•ν™”: 3개의 μƒˆλ‘œμš΄ μ’…ν•© ν…ŒμŠ€νŠΈ μΆ”κ°€(편의 ν•¨μˆ˜, λ§ˆν¬λ‹€μš΄ 생성, μΊμ‹œ 관리)ν•˜μ—¬ 총 ν…ŒμŠ€νŠΈ 컀버리지λ₯Ό 14/14둜 ν–₯상
  • example.dart μ—…λ°μ΄νŠΈ: v0.1.2 API둜 λ§ˆμ΄κ·Έλ ˆμ΄μ…˜ μ™„λ£Œ, μƒˆλ‘œμš΄ λ©”μ„œλ“œ 포함(fetchMetadataOnly(), getCacheStatistics(), clearCache())
  • ν…ŒμŠ€νŠΈ μ‹ λ’°μ„± κ°œμ„ : λͺ¨λ“  14개 ν…ŒμŠ€νŠΈ 이제 100% 성곡λ₯ λ‘œ μΌκ΄€λ˜κ²Œ 톡과

πŸ› οΈ 기술 세뢀사항 #

직렬화 λ¬Έμ œλŠ” json_serializable이 역직렬화 쀑 μ€‘μ²©λœ Freezed λͺ¨λΈμ„ μ˜¬λ°”λ₯΄κ²Œ μ²˜λ¦¬ν•˜μ§€ μ•Šμ•„ λ°œμƒν–ˆμŠ΅λ‹ˆλ‹€. μˆ˜μ •μ‚¬ν•­μ€ μ€‘μ²©λœ κ°μ²΄μ—μ„œ 각각의 λ©”μ„œλ“œλ₯Ό λͺ…μ‹œμ μœΌλ‘œ ν˜ΈμΆœν•˜κΈ° μœ„ν•΄ fromJson() 및 toJson() λ©”μ„œλ“œλ₯Ό μˆ˜λ™ κ΅¬ν˜„ν•©λ‹ˆλ‹€:

// 이전 (μžλ™ 생성, 손상됨)
factory AnalysisResult.fromJson(Map<String, dynamic> json) =>
_$AnalysisResultFromJson(json);

// 이후 (μˆ˜λ™ κ΅¬ν˜„, μž‘λ™ν•¨)
factory AnalysisResult.fromJson(Map<String, dynamic> json) {
return AnalysisResult(
metadata: RepositoryMetadata.fromJson(json['metadata'] as Map<String, dynamic>),
files: (json['files'] as List<dynamic>)
.map((e) => SourceFile.fromJson(e as Map<String, dynamic>))
.toList(),
statistics: AnalysisStatistics.fromJson(json['statistics'] as Map<String, dynamic>),
// ... 기타 ν•„λ“œ
);
}

좔가됨 #

  • μƒˆλ‘œμš΄ fetchMetadataOnly() λ©”μ„œλ“œ: κ°€λ²Όμš΄ 메타데이터 쑰회 (1-3초, API만, 파일 λ‹€μš΄λ‘œλ“œ μ—†μŒ)

    final metadata = await analyzer.fetchMetadataOnly('https://github.com/flutter/flutter');
    
  • μ„€μ • 검증 μ‹œμŠ€ν…œ: λͺ¨λ“  섀정값을 생성 μ‹œμ μ— κ²€μ¦ν•˜μ—¬ λŸ°νƒ€μž„ 였λ₯˜ λ°©μ§€

    • maxFileSize > 0 이어야 함
    • maxConcurrentRequests λ²”μœ„: 1-20
    • isolatePoolSize λ²”μœ„: 1-16
    • maxRetries λ²”μœ„: 0-10
    • retryDelay μ΅œλŒ€: 60초
  • μƒˆλ‘œμš΄ μ„€μ • μ˜΅μ…˜:

    • enableFileCache: 파일 μˆ˜μ€€ 캐싱 μ œμ–΄ (κΈ°λ³Έκ°’: true)
    • autoIsolatePoolThreshold: N개 νŒŒμΌμ—μ„œ 병렬 처리 μžλ™ ν™œμ„±ν™” (κΈ°λ³Έκ°’: 100)
    • streamingModeThreshold: 슀트리밍 λͺ¨λ“œ μ•„μΉ΄μ΄λΈŒ 크기 μž„κ³„κ°’ (κΈ°λ³Έκ°’: 50MB)
    • shouldUseStreamingMode(): 동적 슀트리밍 κ²°μ • λ©”μ„œλ“œ
  • λ³΄μ•ˆ: 토큰 λ§ˆμŠ€ν‚Ή: GitHub 토큰이 λ‘œκ·Έμ—μ„œ μžλ™μœΌλ‘œ λ§ˆμŠ€ν‚Ήλ¨

    • 이전: ghp_reallyLongTokenHere123456789xyz9
    • 이후: ghp_real...xyz9
    • SensitiveLogger μœ ν‹Έλ¦¬ν‹° 클래슀 μΆ”κ°€
    • 토큰이 더 이상 디버그 λ‘œκ·Έλ‚˜ toString() 좜λ ₯에 λ…ΈμΆœλ˜μ§€ μ•ŠμŒ
  • μ’…ν•© demo.dart: λͺ¨λ“  κΈ°λŠ₯을 λ‹€λ£¨λŠ” 7κ°€μ§€ 예제 μ‹œλ‚˜λ¦¬μ˜€

μˆ˜μ •λ¨ #

  • λˆ„λ½λœ μ„€μ • ν•„λ“œ: enableFileCache, autoIsolatePoolThreshold, streamingModeThreshold
  • μ •μ˜λ˜μ§€ μ•Šμ€ AnalyzerErrorCode.invalidInput - AnalyzerErrorCode.invalidUrl둜 ꡐ체
  • μœ νš¨ν•˜μ§€ μ•Šμ€ μ €μž₯μ†Œ URL에 λŒ€ν•΄ fetchMetadataOnly()의 였λ₯˜ 처리 κ°œμ„ 
  • λͺ…ν™•ν•œ μ œμ•½ 쑰건이 μžˆλŠ” 검증 였λ₯˜ λ©”μ‹œμ§€ ν–₯상

변경됨 #

  • μ£Όμš” λ³€κ²½: λͺ¨λ“  Freezed λͺ¨λΈμ€ 이제 abstract ν‚€μ›Œλ“œ ν•„μš” (Freezed 3.0.0 ν˜Έν™˜μ„±)

    // 이전
    @freezed
    class AnalysisError with _$AnalysisError { }
    
    // 이후
    @freezed
    abstract class AnalysisError with _$AnalysisError { }
    
  • GithubAnalyzerConfig의 toString() 좜λ ₯ ν–₯상 (λ§ˆμŠ€ν‚Ήλœ 토큰 포함)

  • GithubAnalyzerλŠ” 이제 메타데이터 μ‘°νšŒμ— λŒ€ν•œ μ§„ν–‰ 상황 좔적 포함

  • μ„€μ • 검증이 μœ νš¨ν•˜μ§€ μ•Šμ€ 값에 λŒ€ν•΄ μ„€λͺ…적인 ArgumentError 던짐

λ§ˆμ΄κ·Έλ ˆμ΄μ…˜ ν•„μˆ˜ #

dart run build_runner clean
dart run build_runner build --delete-conflicting-outputs

μ£Όμš” 변경사항 #

  1. Freezed λͺ¨λΈ: λͺ¨λ“  λͺ¨λΈ ν΄λž˜μŠ€μ— abstract λ˜λŠ” sealed ν‚€μ›Œλ“œ ν•„μš”
  2. μ„€μ • 검증: μœ νš¨ν•˜μ§€ μ•Šμ€ 섀정값이 생성 μ‹œμ μ— ArgumentError 던짐
  3. 파일 μž¬μƒμ„±: λͺ¨λ“  .freezed.dart 및 .g.dart νŒŒμΌμ„ μž¬μƒμ„±ν•΄μ•Ό 함

μ„±λŠ₯ κ°œμ„  #

  • 메타데이터 μ „μš© 쑰회둜 API 호좜 및 응닡 μ‹œκ°„ 단좕 (10-60s β†’ 1-3s)
  • 파일 수 μž„κ³„κ°’μ„ 기반으둜 isolate ν’€ μžλ™ ν™œμ„±ν™”
  • 50MB 이상 μ•„μΉ΄μ΄λΈŒμ— λŒ€ν•œ 슀트리밍 λͺ¨λ“œλ‘œ λ©”λͺ¨λ¦¬ μ‚¬μš©λŸ‰ κ°μ†Œ

μ—…λ°μ΄νŠΈλœ λͺ¨λΈ (Freezed 3.0.0) #

  • AnalysisError
  • AnalysisProgress
  • AnalysisResult
  • AnalysisStatistics
  • RepositoryMetadata
  • SourceFile

λͺ¨λ“  λͺ¨λΈμ΄ 이제 μ œκ³΅ν•˜λŠ” κΈ°λŠ₯:

  • μžλ™ copyWith()
  • μžλ™ toJson() / fromJson()
  • μžλ™ == 및 hashCode
  • 기본적으둜 λΆˆλ³€μ„±
  • 68% λ³΄μΌλŸ¬ν”Œλ ˆμ΄νŠΈ μ½”λ“œ κ°μ†Œ

[0.0.8] - 2025-10-29 #

좔가됨 #

  • λͺ…μ‹œμ  μΊμ‹œ μ œμ–΄ νŒŒλΌλ―Έν„°: λͺ¨λ“  뢄석 ν•¨μˆ˜μ— useCache νŒŒλΌλ―Έν„° μΆ”κ°€
    • analyze() ν•¨μˆ˜λŠ” 이제 useCache νŒŒλΌλ―Έν„° ν—ˆμš©
    • analyzeQuick() ν•¨μˆ˜λŠ” 이제 useCache νŒŒλΌλ―Έν„° ν—ˆμš©
    • analyzeForLLM() ν•¨μˆ˜λŠ” 이제 useCache νŒŒλΌλ―Έν„° ν—ˆμš©
    • analyzeAndGenerate() ν•¨μˆ˜λŠ” 이제 useCache νŒŒλΌλ―Έν„° ν—ˆμš©
    • GithubAnalyzer.analyze() λ©”μ„œλ“œλŠ” 이제 useCache νŒŒλΌλ―Έν„° ν—ˆμš©
    • GithubAnalyzer.analyzeRemote() λ©”μ„œλ“œλŠ” 이제 useCache νŒŒλΌλ―Έν„° ν—ˆμš©

변경됨 #

  • ν•¨μˆ˜ 호좜 λ ˆλ²¨μ—μ„œ μΊμ‹œ λ™μž‘μ„ λͺ…μ‹œμ μœΌλ‘œ μ œμ–΄ κ°€λŠ₯
  • useCacheλ₯Ό μ§€μ •ν•˜μ§€ μ•ŠμœΌλ©΄ GithubAnalyzerConfig.enableCache의 κΈ°λ³Έκ°’ μ‚¬μš©
  • useCacheλ₯Ό λͺ…μ‹œμ μœΌλ‘œ false둜 μ„€μ •ν•˜λ©΄ μ„€μ • 관계없이 μΊμ‹œ λ¬΄μ‹œ

μ‚¬μš© 예제 #

// νŠΉμ • 뢄석에 λŒ€ν•΄ μΊμ‹œ λΉ„ν™œμ„±ν™”
final result = await analyzeQuick(
'https://github.com/flutter/flutter',
useCache: false, // 항상 μ΅œμ‹  데이터 κ°€μ Έμ˜€κΈ°
);

// λ˜λŠ” κ³ κΈ‰ API μ‚¬μš©
final analyzer = await GithubAnalyzer.create();
final result = await analyzer.analyzeRemote(
repositoryUrl: 'https://github.com/your/repo',
useCache: false,
);

μž₯점 #

  • μ‚¬μš©μžλŠ” ν•„μš”ν•  λ•Œ κ°•μ œλ‘œ μ΅œμ‹  데이터 쑰회 κ°€λŠ₯
  • CI/CD νŒŒμ΄ν”„λΌμΈμ΄ μ΅œμ‹  μ €μž₯μ†Œ μƒνƒœ ν•„μš”ν•  λ•Œ 유용
  • μ„€μ • λ³€κ²½ 없이 μœ μ—°μ„± 제곡

[0.0.7] - 2025-10-19 #

μˆ˜μ •λ¨ #

  • 치λͺ…적 캐싱 둜직 μˆ˜μ •: μƒˆ ν‘Έμ‹œ 직후 μ €μž₯μ†Œλ₯Ό 뢄석할 λ•Œ 이전 μ»€λ°‹μ˜ 였래된 데이터λ₯Ό λ°˜ν™˜ν•  수 μžˆλŠ” μ£Όμš” 버그 ν•΄κ²°

  • λΆ„μ„κΈ°λŠ” 이제 μΊμ‹œ 확인 λ˜λŠ” λ‹€μš΄λ‘œλ“œ 전에 λŒ€μƒ 브랜치의 μ΅œμ‹  컀밋 SHAλ₯Ό λͺ…μ‹œμ μœΌλ‘œ 쑰회

  • 이 μ •ν™•ν•œ commitShaλŠ” 이제 μΊμ‹œ ν‚€ 및 λ‹€μš΄λ‘œλ“œ 참쑰둜 μΌκ΄€λ˜κ²Œ μ‚¬μš©λ˜μ–΄ GitHub API 볡제 μ§€μ—°μœΌλ‘œ μΈν•œ 레이슀 μ»¨λ””μ…˜ 및 μΊμ‹œ μ˜€μ—Ό 제거

  • 인증 ν˜Έν™˜μ„± κ°œμ„ : λͺ¨λ“  GitHub API μš”μ²­μ„ Authorization: Bearer $token ν—€λ”λ‘œ ν‘œμ€€ν™”. ν΄λž˜μ‹ 개인 μ•‘μ„ΈμŠ€ 토큰(PAT) 및 μƒˆλ‘œμš΄ μ„ΈλΆ„ν™”λœ PAT λͺ¨λ‘μ™€μ˜ ν˜Έν™˜μ„± 보μž₯

  • HTTP μž¬μ‹œλ„ 버그 μˆ˜μ •: HttpClientManager의 μž¬μ‹œλ„ λ‘œμ§μ—μ„œ μ‹œκ°„ 초과 μš”μ²­μ„ μž¬μ‹œλ„ν•  λ•Œ 잘λͺ»λœ URI 경둜λ₯Ό μ‚¬μš©ν•˜λ˜ 버그 μˆ˜μ •, μ „λ°˜μ μΈ λ„€νŠΈμ›Œν¬ 볡원λ ₯ κ°œμ„ 


[0.0.6] - 2025-10-15 #

좔가됨 #

  • μžλ™ .env 파일 λ‘œλ“œ: GitHub 토큰이 이제 .env νŒŒμΌμ—μ„œ μžλ™μœΌλ‘œ λ‘œλ“œλ¨
  • EnvLoader μœ ν‹Έλ¦¬ν‹°: μ›ν™œν•œ ν™˜κ²½ λ³€μˆ˜ 관리λ₯Ό μœ„ν•œ μƒˆλ‘œμš΄ EnvLoader 클래슀
  • λΉ„κ³΅κ°œ μ €μž₯μ†Œ 지원: λΉ„κ³΅κ°œ μ €μž₯μ†Œλ₯Ό μœ„ν•œ GitHub API 폴백이 μžˆλŠ” ν–₯μƒλœ ZIP λ‹€μš΄λ‘œλ”
  • 비동기 μ„€μ • νŒ©ν† λ¦¬: λͺ¨λ“  GithubAnalyzerConfig νŒ©ν† λ¦¬ λ©”μ„œλ“œκ°€ 이제 비동기 .env λ‘œλ“œ 지원
  • GithubAnalyzer.create(): μžλ™ μ˜μ‘΄μ„± μ£Όμž… 및 .env λ‘œλ“œλ₯Ό μ‚¬μš©ν•œ μƒˆλ‘œμš΄ νŒ©ν† λ¦¬ λ©”μ„œλ“œ

변경됨 #

  • μ£Όμš” λ³€κ²½: GithubAnalyzerConfig.quick() 및 GithubAnalyzerConfig.forLLM()은 이제 비동기
  • μ£Όμš” λ³€κ²½: 비동기 버전 μ„ νƒμœΌλ‘œ 동기 μ„€μ • νŒ©ν† λ¦¬ 제거
  • κ°œμ„ : ZIP λ‹€μš΄λ‘œλ”λŠ” 이제 λΉ„κ³΅κ°œ μ €μž₯μ†Œλ₯Ό μœ„ν•΄ λ¨Όμ € GitHub APIλ₯Ό μ‹œλ„ν•œ ν›„ 곡개 URL둜 폴백
  • ν–₯상: 토큰 인증이 이제 μ„ΈλΆ„ν™”λœ 개인 μ•‘μ„ΈμŠ€ 토큰과 μ›ν™œν•˜κ²Œ μž‘λ™

μˆ˜μ •λ¨ #

  • μ„ΈλΆ„ν™”λœ GitHub ν† ν°μœΌλ‘œ λΉ„κ³΅κ°œ μ €μž₯μ†Œ μ ‘κ·Ό μˆ˜μ •
  • λΉ„κ³΅κ°œ μ €μž₯μ†Œ μ ‘κ·Ό μ‹œ 403 였λ₯˜ μˆ˜μ •
  • ZIP λ‹€μš΄λ‘œλ“œ μ—”λ“œν¬μΈνŠΈμ— 토큰이 μ˜¬λ°”λ₯΄κ²Œ μ „λ‹¬λ˜μ§€ μ•ŠλŠ” 문제 μˆ˜μ •
  • μ €μž₯μ†Œ μ ‘κ·Ό λ¬Έμ œμ— λŒ€ν•œ 였λ₯˜ λ©”μ‹œμ§€ κ°œμ„ 

λ¬Έμ„œν™” #

  • 쒅합적인 μ„ΈλΆ„ν™”λœ 토큰 μ„€μ • κ°€μ΄λ“œ μΆ”κ°€
  • .env 파일 μ‚¬μš© 예제둜 README μ—…λ°μ΄νŠΈ
  • λΉ„κ³΅κ°œ μ €μž₯μ†Œ 접근에 λŒ€ν•œ 문제 ν•΄κ²° μ„Ήμ…˜ μΆ”κ°€

[0.0.5] - 2025-10-14 #

좔가됨 #

  • 쑰건뢀 μ»΄νŒŒμΌμ„ ν¬ν•¨ν•œ μ›Ή ν”Œλž«νΌ 지원
  • 크둜슀 ν”Œλž«νΌ ν˜Έν™˜μ„±μ„ μœ„ν•œ universal_io νŒ¨ν‚€μ§€ 톡합
  • 쒅합적인 파일 μ‹œμŠ€ν…œ 좔상화 계측

변경됨 #

  • μ›Ή ν˜Έν™˜μ„±μ„ μœ„ν•΄ dart:ioμ—μ„œ universal_io둜 λ§ˆμ΄κ·Έλ ˆμ΄μ…˜
  • ν”Œλž«νΌ νŠΉν™” κΈ°λŠ₯에 λŒ€ν•œ 였λ₯˜ 처리 κ°œμ„ 

μˆ˜μ •λ¨ #

  • μ›Ή ν”Œλž«νΌ 컴파일 였λ₯˜
  • μ›Ήμ˜ 파일 μ‹œμŠ€ν…œ μ ‘κ·Ό 문제

[0.0.4] - 2025-10-13 #

좔가됨 #

  • 증뢄 뢄석 지원
  • κ°•ν™”λœ 캐싱 λ©”μ»€λ‹ˆμ¦˜
  • μ„±λŠ₯ μ΅œμ ν™”

변경됨 #

  • λŒ€κ·œλͺ¨ μ €μž₯μ†Œμ— λŒ€ν•œ 뢄석 속도 κ°œμ„ 

[0.0.3] - 2025-10-12 #

좔가됨 #

  • LLM μ΅œμ ν™” 좜λ ₯ ν˜•μ‹
  • 파일 μš°μ„ μˆœμœ„ μ§€μ • μ‹œμŠ€ν…œ
  • κ°„κ²°ν•œ λ§ˆν¬λ‹€μš΄ 생성

[0.0.2] - 2025-10-11 #

좔가됨 #

  • 원격 μ €μž₯μ†Œ 뢄석
  • 둜컬 디렉토리 뢄석
  • κΈ°λ³Έ 캐싱 μ‹œμŠ€ν…œ

[0.0.1] - 2025-10-10 #

좔가됨 #

  • 초기 릴리슀
  • κΈ°λ³Έ GitHub μ €μž₯μ†Œ 뢄석
  • λ§ˆν¬λ‹€μš΄ 생성
2
likes
0
points
138
downloads

Publisher

unverified uploader

Weekly Downloads

Analyze GitHub repositories and generate AI context for LLMs with cross-platform support

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

archive, crypto, dio, freezed_annotation, get_it, glob, json_annotation, logging, path, universal_io

More

Packages that depend on github_analyzer