aidp 0.49.8 → 0.49.9
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/lib/aidp/version.rb +1 -1
- data/lib/aidp/watch/rebase_processor.rb +19 -12
- 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: 152b6f4bd772dffcdd49bff974dc989b987e16e1d5a2a6cbc28ff0017eb654ad
|
|
4
|
+
data.tar.gz: 6163f77e46235f25748344bd675e8ccd221a6ce56d0322d63da1e93969ffc903
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fcde2af278ae33285b683948d102eecb16b38bd40d121135c80fceab6ed01908be325ce7cb2ff266d5e4399a9f1127b6aae538ad7eedf8442c46bd7630c3bdfe
|
|
7
|
+
data.tar.gz: a2d8a65e046f8bb81bcb4ec50bbf6838fe6119beb4872bec33f4249db67c107809fa12e65aeaa4452bd8b02e41be3bde74f2956a8faa6b0c70e0bfd4b3240f06
|
data/lib/aidp/version.rb
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
require "open3"
|
|
1
2
|
require "aidp/watch/base_processor"
|
|
2
3
|
require "aidp/worktree"
|
|
3
4
|
require "aidp/pr_worktree_manager"
|
|
@@ -116,11 +117,12 @@ module Aidp
|
|
|
116
117
|
# Use PRWorktreeManager's method to perform rebase and conflict resolution
|
|
117
118
|
with_worktree_context(worktree_path) do
|
|
118
119
|
# Fetch the latest changes
|
|
119
|
-
@shell_executor.system("git fetch origin")
|
|
120
|
+
@shell_executor.system("git", "fetch", "origin")
|
|
120
121
|
|
|
121
|
-
# Attempt to rebase
|
|
122
|
-
|
|
123
|
-
|
|
122
|
+
# Attempt to rebase. Pass args as separate argv entries (not an
|
|
123
|
+
# interpolated shell string) so branch names can never be
|
|
124
|
+
# interpreted by a shell.
|
|
125
|
+
rebase_output = @shell_executor.system("git", "rebase", "origin/#{base_branch}")
|
|
124
126
|
|
|
125
127
|
unless rebase_output
|
|
126
128
|
# Conflict resolution using AI
|
|
@@ -134,9 +136,8 @@ module Aidp
|
|
|
134
136
|
if resolution
|
|
135
137
|
# Stage resolved files and continue rebase
|
|
136
138
|
# GIT_EDITOR=true prevents editor from opening during automated rebase
|
|
137
|
-
|
|
138
|
-
@shell_executor.system("
|
|
139
|
-
@shell_executor.system({"GIT_EDITOR" => "true"}, "git rebase --continue")
|
|
139
|
+
@shell_executor.system("git", "add", *conflict_files)
|
|
140
|
+
@shell_executor.system({"GIT_EDITOR" => "true"}, "git", "rebase", "--continue")
|
|
140
141
|
else
|
|
141
142
|
return false
|
|
142
143
|
end
|
|
@@ -147,15 +148,19 @@ module Aidp
|
|
|
147
148
|
end
|
|
148
149
|
|
|
149
150
|
# Push the rebased branch
|
|
150
|
-
@shell_executor.system("git push -f origin
|
|
151
|
+
@shell_executor.system("git", "push", "-f", "origin", head_branch)
|
|
151
152
|
end
|
|
152
153
|
|
|
153
154
|
true
|
|
154
155
|
end
|
|
155
156
|
|
|
156
157
|
def detect_conflicting_files(worktree_path)
|
|
157
|
-
# Use git to list conflicting files
|
|
158
|
-
|
|
158
|
+
# Use git to list conflicting files. Argv form avoids shell
|
|
159
|
+
# interpretation of worktree_path or any file names in the output.
|
|
160
|
+
stdout, _stderr, _status = Dir.chdir(worktree_path) do
|
|
161
|
+
Open3.capture3("git", "diff", "--name-only", "--diff-filter=U")
|
|
162
|
+
end
|
|
163
|
+
stdout.split("\n")
|
|
159
164
|
end
|
|
160
165
|
|
|
161
166
|
def resolve_conflicts(worktree_path, base_branch, conflict_files)
|
|
@@ -189,8 +194,10 @@ module Aidp
|
|
|
189
194
|
|
|
190
195
|
# Stage and continue rebase
|
|
191
196
|
# GIT_EDITOR=true prevents editor from opening during automated rebase
|
|
192
|
-
|
|
193
|
-
|
|
197
|
+
Dir.chdir(worktree_path) do
|
|
198
|
+
@shell_executor.system("git", "add", ".")
|
|
199
|
+
@shell_executor.system({"GIT_EDITOR" => "true"}, "git", "rebase", "--continue")
|
|
200
|
+
end
|
|
194
201
|
end
|
|
195
202
|
|
|
196
203
|
def post_rebase_status(pr_number, rebase_result, error_detail = nil)
|