Skip to content

Commit 4780117

Browse files
committed
feat: add GitLab work report generation command and documentation
1 parent a27bb51 commit 4780117

File tree

29 files changed

+349
-237
lines changed

29 files changed

+349
-237
lines changed

community/github/branch/new/command.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
ROOT_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
88
sys.path.append(ROOT_DIR)
99

10-
from common_util import assert_exit, ui_edit # noqa: E402
1110
from git_api import ( # noqa: E402
1211
check_git_installed,
1312
create_and_checkout_branch,
@@ -16,6 +15,8 @@
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
2021
PROMPT = (
2122
"Give me 5 different git branch names, "
@@ -94,3 +95,4 @@ def main():
9495

9596
if __name__ == "__main__":
9697
main()
98+
main()

community/github/commit/main.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), ".."))
1313

14-
from common_util import assert_exit # noqa: E402
1514
from git_api import (
1615
get_github_repo,
1716
get_github_repo_issues,
@@ -21,6 +20,8 @@
2120
subprocess_run,
2221
)
2322

23+
from lib.workflow.common_util import assert_exit # noqa: E402
24+
2425
diff_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

538539
if __name__ == "__main__":
539540
main()
541+
main()

community/github/config/command.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
sys.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

1010
def read_issue_url():

community/github/issue/list_tasks/command.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66
ROOT_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
77
sys.path.append(ROOT_DIR)
88

9-
from common_util import assert_exit, editor # noqa: E402
109
from 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
1314
PROMPT = (
1415
"Based on the following description, "
@@ -52,3 +53,4 @@ def main():
5253

5354
if __name__ == "__main__":
5455
main()
56+
main()

community/github/issue/new/command.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@
44
ROOT_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
55
sys.path.append(ROOT_DIR)
66

7-
from common_util import assert_exit, editor # noqa: E402
87
from devchat.llm import chat_json # noqa: E402
98
from 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
1213
PROMPT = (
1314
"Based on the following description, "
@@ -51,3 +52,4 @@ def main():
5152

5253
if __name__ == "__main__":
5354
main()
55+
main()

community/github/issue/new/from_task/command.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
66
)
77
sys.path.append(ROOT_DIR)
8-
from common_util import assert_exit, editor, ui_edit # noqa: E402
98
from devchat.llm import chat_json # noqa: E402
109
from git_api import ( # noqa: E402
1110
create_issue,
@@ -15,6 +14,8 @@
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
1920
PROMPT = (
2021
"Following is parent issue content:\n"
@@ -94,3 +95,4 @@ def main():
9495

9596
if __name__ == "__main__":
9697
main()
98+
main()

community/github/issue/update_tasks/command.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), ".."))
55

6-
from common_util import assert_exit, editor # noqa: E402
76
from devchat.llm import chat_json # noqa: E402
87
from git_api import ( # noqa: E402
98
get_issue_info_by_url,
@@ -12,6 +11,8 @@
1211
update_sub_tasks,
1312
)
1413

14+
from lib.workflow.common_util import assert_exit, editor # noqa: E402
15+
1516
TASKS_PROMPT = (
1617
"Following is my git issue content.\n"
1718
"{issue_data}\n\n"
@@ -99,3 +100,4 @@ def main():
99100

100101
if __name__ == "__main__":
101102
main()
103+
main()

community/github/pr/new/command.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
ROOT_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
66
sys.path.append(ROOT_DIR)
77

8-
from common_util import assert_exit, ui_edit # noqa: E402
98
from devchat.llm import chat_json # noqa: E402
109
from git_api import ( # noqa: E402
1110
auto_push,
@@ -18,6 +17,8 @@
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
2324
def extract_issue_id(branch_name):

community/github/pr/update/command.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@
55
ROOT_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
66
sys.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
129
from git_api import ( # noqa: E402
1310
auto_push,
1411
get_commit_messages,
@@ -21,6 +18,8 @@
2118
update_pr,
2219
)
2320

21+
from lib.workflow.common_util import assert_exit, ui_edit # noqa: E402
22+
2423

2524
# 从分支名称中提取issue id
2625
def extract_issue_id(branch_name):
@@ -120,3 +119,4 @@ def main():
120119

121120
if __name__ == "__main__":
122121
main()
122+
main()

community/gitlab/branch/new/command.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
ROOT_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
88
sys.path.append(ROOT_DIR)
99

10-
from common_util import assert_exit, ui_edit # noqa: E402
1110
from git_api import ( # noqa: E402
1211
check_git_installed,
1312
create_and_checkout_branch,
@@ -16,6 +15,8 @@
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
2021
PROMPT = (
2122
"Give me 5 different git branch names, "

0 commit comments

Comments
 (0)