From f744018609f77372143d2b384d070c0ff00ff8b6 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Mon, 5 Jun 2023 14:26:17 +0200 Subject: [PATCH] gh: Fix syntax error in pr sync code --- .github/scripts/sync-github-prs.es | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/scripts/sync-github-prs.es b/.github/scripts/sync-github-prs.es index 05c7cd4da45e..89edf7133d54 100755 --- a/.github/scripts/sync-github-prs.es +++ b/.github/scripts/sync-github-prs.es @@ -28,8 +28,7 @@ main([Repo, Target]) -> end end, AllPrs), - purge_prs(Target). - + purge_prs(Target); main([Repo, Target, PRNo]) -> handle_prs(Repo, Target, [ghapi("gh api /repos/"++Repo++"/pulls/"++PRNo)]). @@ -165,12 +164,7 @@ purge_prs(Target) -> Files = string:split(cmd("find prs -type f -exec du -a {} \+"),"\n",all), SortedFiles = lists:sort(fun([A|_]=As,[B|_]=Bs) -> - try binary_to_integer(A) >= binary_to_integer(B) - catch E:R -> - io:format("~p ~p",[As, Bs]), - false - end end, [string:split(F,"\t") || F <- Files, F =/= <<>>]), purge_prs(SortedFiles, Target, get_directory_size(Target)). purge_prs(Files, Target, Size) when Size > 10_000_000_000 ->