Skip to content

Commit

Permalink
fix(github): throw if GitHub Pro limitation
Browse files Browse the repository at this point in the history
  • Loading branch information
rarkins committed Jan 15, 2019
1 parent 2ea047f commit 525fed3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/platform/github/gh-got-wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,16 @@ async function get(path, options, retries = 5) {
// istanbul ignore next
throw new Error('platform-failure');
}
if (
err.statusCode === 403 &&
err.message &&
err.message.startsWith(
'Upgrade to GitHub Pro or make this repository public to enable this feature'
)
) {
// istanbul ignore next
throw err;
}
if (
err.statusCode === 403 &&
err.message &&
Expand Down

3 comments on commit 525fed3

@enissay-git
Copy link

Choose a reason for hiding this comment

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

What if this sentence 'Upgrade to GitHub Pro or make this repository public to enable this feature' change ?

@rarkins
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

GitHub recently made private repos free for individuals but they’ve started restricting some features to be paid-only. One I saw already is branch protection. Adding this to Renovate means we don’t unnecessarily retry

@rarkins
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ie this is a GitHub restriction, not Renovate - I’m just making sure to gracefully handle it

Please sign in to comment.