File tree Expand file tree Collapse file tree 29 files changed +349
-237
lines changed
Expand file tree Collapse file tree 29 files changed +349
-237
lines changed Original file line number Diff line number Diff line change 77ROOT_DIR = os .path .dirname (os .path .dirname (os .path .dirname (os .path .abspath (__file__ ))))
88sys .path .append (ROOT_DIR )
99
10- from common_util import assert_exit , ui_edit # noqa: E402
1110from git_api import ( # noqa: E402
1211 check_git_installed ,
1312 create_and_checkout_branch ,
1615 save_last_base_branch ,
1716)
1817
18+ from lib .workflow .common_util import assert_exit , ui_edit # noqa: E402
19+
1920# Function to generate a random branch name
2021PROMPT = (
2122 "Give me 5 different git branch names, "
@@ -94,3 +95,4 @@ def main():
9495
9596if __name__ == "__main__" :
9697 main ()
98+ main ()
Original file line number Diff line number Diff line change 1111
1212sys .path .append (os .path .join (os .path .dirname (os .path .abspath (__file__ )), ".." ))
1313
14- from common_util import assert_exit # noqa: E402
1514from git_api import (
1615 get_github_repo ,
1716 get_github_repo_issues ,
2120 subprocess_run ,
2221)
2322
23+ from lib .workflow .common_util import assert_exit # noqa: E402
24+
2425diff_too_large_message_en = (
2526 "Commit failed. The modified content is too long "
2627 "and exceeds the model's length limit. "
@@ -537,3 +538,4 @@ def main():
537538
538539if __name__ == "__main__" :
539540 main ()
541+ main ()
Original file line number Diff line number Diff line change 44
55sys .path .append (os .path .join (os .path .dirname (os .path .abspath (__file__ )), ".." ))
66
7- from common_util import editor # noqa: E402
7+ from lib . workflow . common_util import editor # noqa: E402
88
99
1010def read_issue_url ():
Original file line number Diff line number Diff line change 66ROOT_DIR = os .path .dirname (os .path .dirname (os .path .dirname (os .path .abspath (__file__ ))))
77sys .path .append (ROOT_DIR )
88
9- from common_util import assert_exit , editor # noqa: E402
109from git_api import create_issue # noqa: E402
1110
11+ from lib .workflow .common_util import assert_exit , editor # noqa: E402
12+
1213# Function to generate issue title and body using LLM
1314PROMPT = (
1415 "Based on the following description, "
@@ -52,3 +53,4 @@ def main():
5253
5354if __name__ == "__main__" :
5455 main ()
56+ main ()
Original file line number Diff line number Diff line change 44ROOT_DIR = os .path .dirname (os .path .dirname (os .path .dirname (os .path .abspath (__file__ ))))
55sys .path .append (ROOT_DIR )
66
7- from common_util import assert_exit , editor # noqa: E402
87from devchat .llm import chat_json # noqa: E402
98from git_api import create_issue # noqa: E402
109
10+ from lib .workflow .common_util import assert_exit , editor # noqa: E402
11+
1112# Function to generate issue title and body using LLM
1213PROMPT = (
1314 "Based on the following description, "
@@ -51,3 +52,4 @@ def main():
5152
5253if __name__ == "__main__" :
5354 main ()
55+ main ()
Original file line number Diff line number Diff line change 55 os .path .dirname (os .path .dirname (os .path .dirname (os .path .abspath (__file__ ))))
66)
77sys .path .append (ROOT_DIR )
8- from common_util import assert_exit , editor , ui_edit # noqa: E402
98from devchat .llm import chat_json # noqa: E402
109from git_api import ( # noqa: E402
1110 create_issue ,
1514 update_task_issue_url ,
1615)
1716
17+ from lib .workflow .common_util import assert_exit , editor , ui_edit # noqa: E402
18+
1819# Function to generate issue title and body using LLM
1920PROMPT = (
2021 "Following is parent issue content:\n "
@@ -94,3 +95,4 @@ def main():
9495
9596if __name__ == "__main__" :
9697 main ()
98+ main ()
Original file line number Diff line number Diff line change 33
44sys .path .append (os .path .join (os .path .dirname (os .path .abspath (__file__ )), ".." ))
55
6- from common_util import assert_exit , editor # noqa: E402
76from devchat .llm import chat_json # noqa: E402
87from git_api import ( # noqa: E402
98 get_issue_info_by_url ,
1211 update_sub_tasks ,
1312)
1413
14+ from lib .workflow .common_util import assert_exit , editor # noqa: E402
15+
1516TASKS_PROMPT = (
1617 "Following is my git issue content.\n "
1718 "{issue_data}\n \n "
@@ -99,3 +100,4 @@ def main():
99100
100101if __name__ == "__main__" :
101102 main ()
103+ main ()
Original file line number Diff line number Diff line change 55ROOT_DIR = os .path .dirname (os .path .dirname (os .path .dirname (os .path .abspath (__file__ ))))
66sys .path .append (ROOT_DIR )
77
8- from common_util import assert_exit , ui_edit # noqa: E402
98from devchat .llm import chat_json # noqa: E402
109from git_api import ( # noqa: E402
1110 auto_push ,
1817 save_last_base_branch ,
1918)
2019
20+ from lib .workflow .common_util import assert_exit , ui_edit # noqa: E402
21+
2122
2223# 从分支名称中提取issue id
2324def extract_issue_id (branch_name ):
Original file line number Diff line number Diff line change 55ROOT_DIR = os .path .dirname (os .path .dirname (os .path .dirname (os .path .abspath (__file__ ))))
66sys .path .append (ROOT_DIR )
77
8- from common_util import assert_exit , ui_edit # noqa: E402
9- from devchat .llm import ( # noqa: E402
10- chat_json ,
11- )
8+ from devchat .llm import chat_json # noqa: E402
129from git_api import ( # noqa: E402
1310 auto_push ,
1411 get_commit_messages ,
2118 update_pr ,
2219)
2320
21+ from lib .workflow .common_util import assert_exit , ui_edit # noqa: E402
22+
2423
2524# 从分支名称中提取issue id
2625def extract_issue_id (branch_name ):
@@ -120,3 +119,4 @@ def main():
120119
121120if __name__ == "__main__" :
122121 main ()
122+ main ()
Original file line number Diff line number Diff line change 77ROOT_DIR = os .path .dirname (os .path .dirname (os .path .dirname (os .path .abspath (__file__ ))))
88sys .path .append (ROOT_DIR )
99
10- from common_util import assert_exit , ui_edit # noqa: E402
1110from git_api import ( # noqa: E402
1211 check_git_installed ,
1312 create_and_checkout_branch ,
1615 save_last_base_branch ,
1716)
1817
18+ from lib .workflow .common_util import assert_exit , ui_edit # noqa: E402
19+
1920# Function to generate a random branch name
2021PROMPT = (
2122 "Give me 5 different git branch names, "
You can’t perform that action at this time.
0 commit comments