code_healer 0.1.18 → 0.1.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/lib/code_healer/claude_code_evolution_handler.rb +3 -2
- data/lib/code_healer/config_manager.rb +2 -1
- data/lib/code_healer/evolution_job.rb +1 -1
- data/lib/code_healer/healing_job.rb +1 -1
- data/lib/code_healer/pull_request_creator.rb +1 -1
- data/lib/code_healer/setup.rb +14 -2
- data/lib/code_healer/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c459c5cc71ce5eb54b3a1798f45698c8910c71de4c9359aca6ebe143c90c9b2a
|
4
|
+
data.tar.gz: e521d7a05da6c0653efa4845c4d2e3770569331c699afb5a72b0df5fa7d70d90
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 72c3f09042c407fa37e82e88bae86a3df5fe6c0dd5ad4db832dfa69fe5531da9c2b60e4b5ae2c9e871d97a7b1b0603e205ebda328d4bcf1b88bf2b04c5df3322
|
7
|
+
data.tar.gz: defe95f38e8783909646739c05dc77ac8745847d13a00090fd8665027e506cb423eb367a4cb9ff05c5214594041ab3ba8ba9fe0f590f1231931bd3f28ecf0467
|
data/CHANGELOG.md
CHANGED
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
7
7
|
|
8
8
|
## [Unreleased]
|
9
9
|
|
10
|
+
## [0.1.19] - 2025-08-21
|
11
|
+
|
12
|
+
### Fixed
|
13
|
+
- **Critical Git Operations Duplication**: Fixed duplicate Git operations between evolution handler and workspace manager.
|
14
|
+
- **Branch Detection**: Fixed automatic detection of repository's default branch (master vs main).
|
15
|
+
- **Configuration Loading**: Fixed pr_target_branch configuration loading from both git section and root level.
|
16
|
+
- **Workspace Isolation**: Improved Git operations to occur only in isolated workspace, preventing conflicts.
|
17
|
+
|
18
|
+
### Changed
|
19
|
+
- **Evolution Handler**: Removed duplicate Git operations to prevent conflicts with workspace manager.
|
20
|
+
- **Setup Script**: Enhanced with automatic branch detection and better configuration structure.
|
21
|
+
|
10
22
|
## [0.1.18] - 2025-08-21
|
11
23
|
|
12
24
|
### Fixed
|
@@ -31,8 +31,9 @@ module CodeHealer
|
|
31
31
|
reload_modified_files
|
32
32
|
|
33
33
|
# 🚀 Trigger Git operations (commit, push, PR creation)
|
34
|
-
|
35
|
-
|
34
|
+
# Note: Git operations are now handled by the isolated workspace manager
|
35
|
+
# to prevent duplication and ensure proper isolation
|
36
|
+
puts "🔄 Git operations will be handled by isolated workspace manager..."
|
36
37
|
|
37
38
|
return true
|
38
39
|
else
|
@@ -189,7 +189,8 @@ module CodeHealer
|
|
189
189
|
end
|
190
190
|
|
191
191
|
def pr_target_branch
|
192
|
-
|
192
|
+
# Check both git section and root level for backward compatibility
|
193
|
+
git_settings['pr_target_branch'] || config['pr_target_branch'] || 'main'
|
193
194
|
end
|
194
195
|
|
195
196
|
def commit_message_template
|
@@ -25,7 +25,7 @@ class EvolutionJob
|
|
25
25
|
healing_branch = CodeHealer::HealingWorkspaceManager.create_healing_branch(
|
26
26
|
Rails.root.to_s,
|
27
27
|
workspace_path,
|
28
|
-
CodeHealer::ConfigManager.
|
28
|
+
CodeHealer::ConfigManager.pr_target_branch
|
29
29
|
)
|
30
30
|
|
31
31
|
if healing_branch
|
@@ -68,7 +68,7 @@ module CodeHealer
|
|
68
68
|
healing_branch = CodeHealer::HealingWorkspaceManager.create_healing_branch(
|
69
69
|
Rails.root.to_s,
|
70
70
|
workspace_path,
|
71
|
-
CodeHealer::ConfigManager.
|
71
|
+
CodeHealer::ConfigManager.pr_target_branch
|
72
72
|
)
|
73
73
|
git_time_ms = ((Process.clock_gettime(Process::CLOCK_MONOTONIC) - git_started_at) * 1000).round
|
74
74
|
|
@@ -27,7 +27,7 @@ module CodeHealer
|
|
27
27
|
puts "Creating pull request for branch: #{branch_name}"
|
28
28
|
|
29
29
|
# Get target branch from configuration
|
30
|
-
target_branch = ConfigManager.pr_target_branch
|
30
|
+
target_branch = ConfigManager.pr_target_branch
|
31
31
|
puts "📋 Target branch for PR: #{target_branch}"
|
32
32
|
|
33
33
|
pr = client.create_pull_request(
|
data/lib/code_healer/setup.rb
CHANGED
@@ -256,7 +256,17 @@ github_repo_url = normalize_repository_url(github_repo, github_token)
|
|
256
256
|
puts
|
257
257
|
puts "🌿 Git Branch Configuration:"
|
258
258
|
branch_prefix = ask_for_input("Enter branch prefix for healing branches (default: evolve):", default: "evolve")
|
259
|
-
|
259
|
+
|
260
|
+
# Detect the actual default branch from git
|
261
|
+
default_branch = "main"
|
262
|
+
if system("git rev-parse --verify master >/dev/null 2>&1")
|
263
|
+
default_branch = "master"
|
264
|
+
elsif system("git rev-parse --verify main >/dev/null 2>&1")
|
265
|
+
default_branch = "main"
|
266
|
+
end
|
267
|
+
|
268
|
+
puts "🔍 Detected default branch: #{default_branch}"
|
269
|
+
pr_target_branch = ask_for_input("Enter target branch for pull requests (default: #{default_branch}):", default: default_branch)
|
260
270
|
|
261
271
|
# Code Heal Directory Configuration
|
262
272
|
puts
|
@@ -442,7 +452,9 @@ create_file_with_content('.env', env_content, dry_run: options[:dry_run])
|
|
442
452
|
auto_push: true
|
443
453
|
branch_prefix: "#{branch_prefix}"
|
444
454
|
commit_message_template: 'Fix {{class_name}}\#\#{{method_name}}: {{error_type}}'
|
445
|
-
|
455
|
+
|
456
|
+
# Pull Request target branch (for backward compatibility)
|
457
|
+
pr_target_branch: "#{pr_target_branch}"
|
446
458
|
|
447
459
|
# Pull Request Configuration
|
448
460
|
pull_request:
|
data/lib/code_healer/version.rb
CHANGED