fix lint error
This commit is contained in:
parent
da9f21e1dc
commit
8cbb645fa8
@ -412,8 +412,10 @@ def update_pr(pr_number, title, body, repo_name):
|
|||||||
print("Failed to update PR.")
|
print("Failed to update PR.")
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
def get_last_base_branch(default_branch):
|
def get_last_base_branch(default_branch):
|
||||||
"""read last base branch from config file"""
|
"""read last base branch from config file"""
|
||||||
|
|
||||||
def read_config_item(config_path, item):
|
def read_config_item(config_path, item):
|
||||||
if os.path.exists(config_path):
|
if os.path.exists(config_path):
|
||||||
with open(config_path, "r", encoding="utf-8") as f:
|
with open(config_path, "r", encoding="utf-8") as f:
|
||||||
@ -427,8 +429,10 @@ def get_last_base_branch(default_branch):
|
|||||||
return last_base_branch
|
return last_base_branch
|
||||||
return default_branch
|
return default_branch
|
||||||
|
|
||||||
|
|
||||||
def save_last_base_branch(base_branch=None):
|
def save_last_base_branch(base_branch=None):
|
||||||
"""save last base branch to config file"""
|
"""save last base branch to config file"""
|
||||||
|
|
||||||
def save_config_item(config_path, item, value):
|
def save_config_item(config_path, item, value):
|
||||||
if os.path.exists(config_path):
|
if os.path.exists(config_path):
|
||||||
with open(config_path, "r", encoding="utf-8") as f:
|
with open(config_path, "r", encoding="utf-8") as f:
|
||||||
|
@ -46,7 +46,9 @@ def get_issue_or_task(task):
|
|||||||
issue = read_issue_by_url(task.strip())
|
issue = read_issue_by_url(task.strip())
|
||||||
assert_exit(not issue, "Failed to read issue.", exit_code=-1)
|
assert_exit(not issue, "Failed to read issue.", exit_code=-1)
|
||||||
|
|
||||||
return json.dumps({"id": issue["number"], "title": issue["title"], "body": issue["body"]}), issue["number"]
|
return json.dumps(
|
||||||
|
{"id": issue["number"], "title": issue["title"], "body": issue["body"]}
|
||||||
|
), issue["number"]
|
||||||
else:
|
else:
|
||||||
return task, None
|
return task, None
|
||||||
|
|
||||||
|
@ -57,10 +57,12 @@ def generate_pr_content(issue, commit_messages, user_input):
|
|||||||
def edit_pr(title, body):
|
def edit_pr(title, body):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
@ui_edit(ui_type="editor", description="Edit base branch:")
|
@ui_edit(ui_type="editor", description="Edit base branch:")
|
||||||
def edit_base_branch(base_branch):
|
def edit_base_branch(base_branch):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
def get_issue_json(issue_id):
|
def get_issue_json(issue_id):
|
||||||
issue = {"id": "no issue id", "title": "", "body": ""}
|
issue = {"id": "no issue id", "title": "", "body": ""}
|
||||||
if issue_id:
|
if issue_id:
|
||||||
|
@ -15,10 +15,10 @@ from git_api import ( # noqa: E402
|
|||||||
get_current_branch,
|
get_current_branch,
|
||||||
get_github_repo,
|
get_github_repo,
|
||||||
get_issue_info,
|
get_issue_info,
|
||||||
get_recently_pr,
|
|
||||||
update_pr,
|
|
||||||
get_last_base_branch,
|
get_last_base_branch,
|
||||||
|
get_recently_pr,
|
||||||
save_last_base_branch,
|
save_last_base_branch,
|
||||||
|
update_pr,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -57,10 +57,12 @@ def generate_pr_content(issue, commit_messages):
|
|||||||
def edit_pr(title, body):
|
def edit_pr(title, body):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
@ui_edit(ui_type="editor", description="Edit base branch:")
|
@ui_edit(ui_type="editor", description="Edit base branch:")
|
||||||
def edit_base_branch(base_branch):
|
def edit_base_branch(base_branch):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
def get_issue_json(issue_id):
|
def get_issue_json(issue_id):
|
||||||
issue = {"id": "no issue id", "title": "", "body": ""}
|
issue = {"id": "no issue id", "title": "", "body": ""}
|
||||||
if issue_id:
|
if issue_id:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user