From 5664da29c4edb3b5c8cfd3c950c23fcac92696d0 Mon Sep 17 00:00:00 2001 From: Liri S Date: Thu, 22 Oct 2020 19:30:00 +0300 Subject: [PATCH] Handle rate limit exceeded merge error (#119) --- .gitignore | 1 + lib/merge.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 2d7ec5ce..39013232 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ +.idea .env node_modules/ diff --git a/lib/merge.js b/lib/merge.js index a50a25f0..50c26a0b 100644 --- a/lib/merge.js +++ b/lib/merge.js @@ -345,7 +345,8 @@ function checkMergeError(e) { const m = e ? e.message || "" : ""; if ( m.includes("review is required by reviewers with write access") || - m.includes("reviews are required by reviewers with write access") + m.includes("reviews are required by reviewers with write access") || + m.includes("API rate limit exceeded") ) { logger.info("Cannot merge PR:", m); return "failure";