Skip to content

Commit 40f62a5

Browse files
committed
feat(repo-bot): /search mit Retry bei GitHub-Rate-Limit
1 parent 1030b00 commit 40f62a5

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

scripts/repo_bot.pipe

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ else if cmd == "/search"
4646
set sh "Accept" "application/vnd.github+json"
4747
sr: http_request "GET" surl sh ""
4848
sd: parse_json (get sr "body")
49+
m1: get sd "message"
50+
if m1 != nil && (contains (to_str m1) "try again")
51+
exec "sleep 13"
52+
sr: http_request "GET" surl sh ""
53+
sd: parse_json (get sr "body")
4954
total: get sd "total_count"
5055
if total == nil
5156
reply: "⚠️ Suche fehlgeschlagen: " ++ (get sd "message")

0 commit comments

Comments
 (0)