From 294436bd6504dddc8fb0bd39c12569b13079dd76 Mon Sep 17 00:00:00 2001 From: Helio Machado <0x2b3bfa0+git@googlemail.com> Date: Sat, 15 Oct 2022 20:31:31 +0200 Subject: [PATCH] Assume branch protection disabled if not available Closes #1229 --- src/drivers/github.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/drivers/github.js b/src/drivers/github.js index ced816daf..d36bdce25 100644 --- a/src/drivers/github.js +++ b/src/drivers/github.js @@ -450,7 +450,11 @@ class Github { }); return true; } catch (error) { - if (error.message === 'Branch not protected') { + const errors = [ + 'Branch not protected', + 'Upgrade to GitHub Pro or make this repository public to enable this feature.' + ]; + if (errors.includes(error.message)) { return false; } throw error;