Remember to push from the correct folder
This commit is contained in:
parent
aa14a3e5e7
commit
51740bc312
|
@ -100,7 +100,7 @@ def parse_args():
|
|||
parser.add_argument("--base-branch", default="main", help="Base branch to use for new branches (default: main)")
|
||||
return parser.parse_args()
|
||||
|
||||
def push_changes(branch_name: str, issue_number: str, issue_title: str, issue_description: str, base_branch: str) -> None:
|
||||
def push_changes(cwd: Path, branch_name: str, issue_number: str, issue_title: str, issue_description: str, base_branch: str) -> None:
|
||||
cmd = [
|
||||
"git",
|
||||
"push",
|
||||
|
@ -113,7 +113,7 @@ def push_changes(branch_name: str, issue_number: str, issue_title: str, issue_de
|
|||
"-o",
|
||||
f"description=\"This pull request resolves #{issue_number}\""
|
||||
]
|
||||
run_cmd(cmd)
|
||||
run_cmd(cmd, cwd)
|
||||
|
||||
def run_cmd(cmd: list[str], cwd:Path|None=None) -> None:
|
||||
print(cmd)
|
||||
|
@ -127,7 +127,7 @@ def process_issue(args, tmpdirname: Path, branch_name: str, issue_title: str, is
|
|||
run_cmd(["git", "checkout", "-b", branch_name], tmpdirname)
|
||||
run_cmd(create_aider_command(f'# {issue_title}\n{issue_description}'), tmpdirname)
|
||||
run_cmd(["git", "add", "."], tmpdirname)
|
||||
push_changes(branch_name, issue_number, issue_title, issue_description, args.base_branch)
|
||||
push_changes(tmpdirname, branch_name, issue_number, issue_title, issue_description, args.base_branch)
|
||||
|
||||
def main():
|
||||
logging.basicConfig(level='INFO')
|
||||
|
|
Loading…
Reference in New Issue
Block a user