Skip to content

Commit

Permalink
chore: Refactor config_util.py to handle gitlab host input
Browse files Browse the repository at this point in the history
  • Loading branch information
yangbobo2021 committed May 22, 2024
1 parent 24bd312 commit 14b3197
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions merico/pr/config_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def get_repo_type(url):
],
)
radio.render()
if radio.selection is not None:
if radio.selection is None:
return ""

rtype = [
Expand Down Expand Up @@ -159,11 +159,9 @@ def read_server_access_token_with_input(pr_url):

def gitlab_host():
host = read_gitlab_host()
if host:
return host

gitlab_host_editor = TextEditor(
"", "Please input your gitlab host(for example: https://www.gitlab.com):"
host, "Please input your gitlab host(for example: https://www.gitlab.com):"
)
gitlab_host_editor.render()
host = gitlab_host_editor.new_text
Expand Down

0 comments on commit 14b3197

Please sign in to comment.