Skip to content

Commit

Permalink
Assume branch protection disabled if not available (#1230)
Browse files Browse the repository at this point in the history
Closes #1229
  • Loading branch information
0x2b3bfa0 authored and tasdomas committed Oct 27, 2022
1 parent 6a1759b commit 62c6d04
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/drivers/github.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 62c6d04

Please sign in to comment.