From 903a9e44061f40b22a57b1b3858e3880003fe453 Mon Sep 17 00:00:00 2001 From: Charlike Mike Reagent Date: Sat, 6 Jun 2020 10:45:10 +0300 Subject: [PATCH] fix: use includes and toLowerCase in status endpoint (#352) * fix: close #350 Signed-off-by: Charlike Mike Reagent * use toLowerCase for st.context Signed-off-by: Charlike Mike Reagent --- api/github.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/github.ts b/api/github.ts index e391c32..3d07c3f 100644 --- a/api/github.ts +++ b/api/github.ts @@ -104,7 +104,7 @@ async function status ({ owner, repo, ref = 'master', context }: PathArgs) { const resp = await restGithub(`repos/${owner}/${repo}/commits/${ref}/status`) let state = typeof context === 'string' - ? resp!.statuses.filter(st => st.context.startsWith(context)) + ? resp!.statuses.filter(st => st.context.toLowerCase().includes(context.toLowerCase())) : resp!.state if (Array.isArray(state)) {