Add linter and minor bug fixes (#107)

This commit is contained in:
Simon Lecoq
2021-02-05 23:45:48 +01:00
committed by GitHub
parent 61e2f6e1a1
commit 882a93dea5
74 changed files with 1544 additions and 712 deletions

View File

@@ -1,11 +1,11 @@
/** Template processor */
export default async function ({login, q}, {conf, data, rest, graphql, plugins, queries, account}, {s, pending, imports}) {
/**Template processor */
export default async function({login, q}, {data, rest, graphql, queries, account}, {pending, imports}) {
//Check arguments
const {repo} = q
if (!repo) {
console.debug(`metrics/compute/${login}/${repo} > error, repo was undefined`)
data.errors.push({error:{message:`You must pass a "repo" argument to use this template`}})
return await imports.plugins.core(...arguments)
data.errors.push({error:{message:"You must pass a \"repo\" argument to use this template"}})
return imports.plugins.core(...arguments)
}
console.debug(`metrics/compute/${login}/${repo} > switching to mode ${account}`)
@@ -73,4 +73,4 @@
//Reformat projects names
if (data.plugins.projects)
data.plugins.projects.list?.map(project => project.name = project.name.replace(`(${login}/${repo})`, "").trim())
}
}