kopia lustrzana https://github.com/badgen/badgen.net
fix: use includes and toLowerCase in status endpoint (#352)
* fix: close #350 Signed-off-by: Charlike Mike Reagent <opensource@tunnckocore.com> * use toLowerCase for st.context Signed-off-by: Charlike Mike Reagent <opensource@tunnckocore.com>pull/407/head
rodzic
c869db83d2
commit
903a9e4406
|
|
@ -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)) {
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue