Skip to content

Commit a47a12b

Browse files
committed
啊,差点搞混了
1 parent 346fc08 commit a47a12b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

newSolution.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Author: LetMeFly
33
Date: 2022-07-03 11:21:14
44
LastEditors: LetMeFly
5-
LastEditTime: 2023-10-20 11:55:12
5+
LastEditTime: 2023-10-20 11:59:02
66
Command: python newSolution.py 102. 二叉树的层序遍历
77
What's more: 当前仅支持数字开头的题目
88
'''
@@ -157,5 +157,7 @@ def getProblemUrl():
157157
os.system('git add .')
158158
os.system(f'git commit -m "添加了问题“{num}.{title}”的代码和题解"')
159159
os.system(f'git push --set-upstream origin {num}')
160-
os.system(f'gh pr create -t "添加了问题“{num}.{title}”的代码和题解" -b "By newSolution.py using GH"')
161-
os.system(f'gh pr merge {issueNum} -m -d')
160+
prResult = os.popen(f'gh pr create -t "添加了问题“{num}.{title}”的代码和题解" -b "By newSolution.py using GH | close: #{issueNum}"').read()
161+
print(prResult)
162+
prNumber = int(prResult.split('/')[-1])
163+
os.system(f'gh pr merge {prNumber} -m -d')

0 commit comments

Comments
 (0)