@@ -148,11 +148,8 @@ def _create_demo_pr(demo_path: Path, branch: str, commit_start: str) -> None:
148148 """Creates a PR to merge the given branch into develop."""
149149 gh ("repo" , "set-default" , f"{ DEMO .app_author } /{ DEMO .app_name } " )
150150 search_results : subprocess .CompletedProcess = gh ("pr" , "list" , "--state" , "open" , "--search" , branch )
151- typer .secho (f"_create_demo_pr - { search_results .stdout = } " )
152151
153- if "no pull requests" not in str (search_results .stdout ):
154- typer .secho (f"{ str (search_results .stdout )= } " )
155- typer .secho (f"no_pull_requests" )
152+ if search_results .returncode != 0 :
156153 url : str = _get_pr_url (branch = branch )
157154 typer .secho (f"Skipping PR creation due to existing PR found for branch { branch } at { url } " )
158155 return
@@ -172,7 +169,6 @@ def _create_demo_pr(demo_path: Path, branch: str, commit_start: str) -> None:
172169def _get_pr_url (branch : str ) -> str :
173170 """Returns the url of the current branch's PR."""
174171 result : subprocess .CompletedProcess = gh ("pr" , "view" , branch , "--json" , "url" , "--jq" , ".url" )
175- typer .secho (f"_get_pr_url - { result .stdout = } " )
176172 if result .returncode != 0 :
177173 raise ValueError (f"Failed to find a PR URL for branch { branch } ." )
178174 return result .stdout .strip ()
0 commit comments