File 6202-gh-Fix-syntax-error-in-pr-sync-code.patch of Package erlang

From f744018609f77372143d2b384d070c0ff00ff8b6 Mon Sep 17 00:00:00 2001
From: Lukas Larsson <lukas@erlang.org>
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 05c7cd4da4..89edf7133d 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 ->
-- 
2.35.3

openSUSE Build Service is sponsored by