diff --git a/services/github/github-commit-activity.service.js b/services/github/github-commit-activity.service.js index 39af8a2f12..ca270a19cf 100644 --- a/services/github/github-commit-activity.service.js +++ b/services/github/github-commit-activity.service.js @@ -13,7 +13,7 @@ const schema = Joi.object({ history: Joi.object({ totalCount: nonNegativeInteger, }).required(), - }), + }).allow(null), }).required(), }).required(), }).required() diff --git a/services/github/github-commit-activity.tester.js b/services/github/github-commit-activity.tester.js index 0bc8a7ef13..bf99826fc5 100644 --- a/services/github/github-commit-activity.tester.js +++ b/services/github/github-commit-activity.tester.js @@ -52,3 +52,10 @@ t.create('commit activity (repo not found)') label: 'commit activity', message: 'repo not found', }) + +t.create('commit activity (invalid branch)') + .get('/w/badges/shields/invalidBranchName.json') + .expectBadge({ + label: 'commit activity', + message: 'invalid branch', + })