mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-20 12:24:59 +00:00
feat: extract history content up to end of base version section
This commit is contained in:
parent
24bd016a1a
commit
cef333a01c
1 changed files with 13 additions and 1 deletions
|
@ -48,7 +48,19 @@ def main():
|
|||
if start_idx == -1:
|
||||
raise ValueError("Could not find start of release history")
|
||||
|
||||
relevant_history = history_content[start_idx:]
|
||||
# Find where this version's section ends
|
||||
version_idx = history_content.find(version_header, start_idx)
|
||||
if version_idx == -1:
|
||||
raise ValueError(f"Could not find version header: {version_header}")
|
||||
|
||||
# Find the next version header after this one
|
||||
next_version_idx = history_content.find("\n### Aider v", version_idx + len(version_header))
|
||||
if next_version_idx == -1:
|
||||
# No next version found, use the rest of the file
|
||||
relevant_history = history_content[start_idx:]
|
||||
else:
|
||||
# Extract just up to the next version
|
||||
relevant_history = history_content[start_idx:next_version_idx]
|
||||
|
||||
# Save relevant portions to temporary files
|
||||
with tempfile.NamedTemporaryFile(mode="w", delete=False, suffix=".diff") as tmp_diff:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue