Skip to content

Commit

Permalink
Assume branch protection disabled if not available
Browse files Browse the repository at this point in the history
Closes #1229
  • Loading branch information
0x2b3bfa0 authored Oct 15, 2022
1 parent 68cc1b4 commit 294436b
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

2 comments on commit 294436b

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test Comment

CML watermark

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test Comment

CML watermark

Please sign in to comment.