fix(app/metrics): make embed() defaults to repository when q.repo is specified (#889) [skip ci]

This commit is contained in:
Simon Lecoq
2022-02-16 02:53:39 +01:00
committed by GitHub
parent 5c863951ed
commit c34462291d

View File

@@ -123,7 +123,7 @@ export default async function metrics({login, q}, {graphql, rest, plugins, conf,
console.debug(`metrics/compute/${login} > embed called with`) console.debug(`metrics/compute/${login} > embed called with`)
console.debug(q) console.debug(q)
let {base} = q let {base} = q
q = {..._q, ...Object.fromEntries(Object.keys(Plugins).map(key => [key, false])), ...Object.fromEntries(conf.settings.plugins.base.parts.map(part => [`base.${part}`, false])), template:"classic", ...q} q = {..._q, ...Object.fromEntries(Object.keys(Plugins).map(key => [key, false])), ...Object.fromEntries(conf.settings.plugins.base.parts.map(part => [`base.${part}`, false])), template:q.repo ? "repository" : "classic", ...q}
//Translate action syntax to web syntax //Translate action syntax to web syntax
let parts = [] let parts = []
if (base === true) if (base === true)