Skip to content

Commit

Permalink
fix: don't attempt to create redundant PR to start tracking obsolete …
Browse files Browse the repository at this point in the history
…files (#755)

Check if the branch already exists.
  • Loading branch information
SurferJeffAtGoogle authored Sep 10, 2020
1 parent ffcee79 commit b15c0c0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion autosynth/synth.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,9 @@ def synthesize_loop(
if not has_changes:
if not toolbox.metadata_contains_generated_files(
toolbox.branch
) and toolbox.metadata_contains_generated_files(toolbox.sub_branch(youngest)):
) and toolbox.metadata_contains_generated_files(
toolbox.sub_branch(youngest)
) and not change_pusher.check_if_pr_already_exists(toolbox.branch):
# Special case: the repo owner turned on obsolete file tracking.
# Generate a one-time PR containing only metadata changes.
executor.check_call(["git", "checkout", toolbox.branch])
Expand Down

0 comments on commit b15c0c0

Please sign in to comment.