We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 083bca7 commit 8dc4d81Copy full SHA for 8dc4d81
1 file changed
scripts/push_log_to_gh.py
@@ -8,6 +8,8 @@
8
import subprocess
9
from pathlib import Path
10
11
+from unidiff import PatchSet
12
+
13
14
def main(cc_folder: Path):
15
folder_contents = [f.name for f in list(cc_folder.iterdir())]
@@ -59,8 +61,11 @@ def main(cc_folder: Path):
59
61
continue
60
62
with open(changes_file) as f:
63
changes = json.load(f)
64
+ patch = PatchSet(changes["incremental_diff"])
65
+ # Remove any binary files from the patch
66
+ patch = PatchSet("\n".join([str(file) for file in patch if "Binary files" not in str(file)]))
67
with open("temp.diff", "w") as f:
- f.write(changes["incremental_diff"])
68
+ f.write(str(patch))
69
70
apply_cmd = "git apply ../temp.diff"
71
if arena == "BattleSnake":
0 commit comments