Skip linguist when there are no activity and fix handle of plugin_habits_facts/plugin_habits_charts options
This commit is contained in:
8
action/dist/index.js
vendored
8
action/dist/index.js
vendored
File diff suppressed because one or more lines are too long
@@ -116,8 +116,10 @@
|
|||||||
}
|
}
|
||||||
//Habits
|
//Habits
|
||||||
if (plugins.habits.enabled) {
|
if (plugins.habits.enabled) {
|
||||||
for (const option of ["from", "days", "facts", "charts"])
|
for (const option of ["from", "days"])
|
||||||
q[`habits.${option}`] = core.getInput(`plugin_habits_${option}`) || null
|
q[`habits.${option}`] = core.getInput(`plugin_habits_${option}`) || null
|
||||||
|
q[`habits.facts`] = bool(core.getInput(`plugin_habits_facts`))
|
||||||
|
q[`habits.charts`] = bool(core.getInput(`plugin_habits_charts`))
|
||||||
console.log(`Habits facts | ${q["habits.facts"]}`)
|
console.log(`Habits facts | ${q["habits.facts"]}`)
|
||||||
console.log(`Habits charts | ${q["habits.charts"]}`)
|
console.log(`Habits charts | ${q["habits.charts"]}`)
|
||||||
console.log(`Habits events to use | ${q["habits.from"]}`)
|
console.log(`Habits events to use | ${q["habits.from"]}`)
|
||||||
@@ -247,7 +249,8 @@
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error)
|
console.error(error)
|
||||||
if (!bool(core.getInput("debug")))
|
if (!bool(core.getInput("debug")))
|
||||||
console.log("An error occured, logging debug message :", ...debugged)
|
for (const log of ["_".repeat(64), "An error occured, logging debug message :", ...debugged])
|
||||||
|
console.log(log)
|
||||||
core.setFailed(error.message)
|
core.setFailed(error.message)
|
||||||
process.exit(1)
|
process.exit(1)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,7 +71,7 @@
|
|||||||
if (charts) {
|
if (charts) {
|
||||||
//Check if linguist exists
|
//Check if linguist exists
|
||||||
const prefix = {win32:"wsl"}[process.platform] ?? ""
|
const prefix = {win32:"wsl"}[process.platform] ?? ""
|
||||||
if (await imports.run(`${prefix} which github-linguist`)) {
|
if ((patches.length)&&(await imports.run(`${prefix} which github-linguist`))) {
|
||||||
//Setup for linguist
|
//Setup for linguist
|
||||||
habits.linguist.available = true
|
habits.linguist.available = true
|
||||||
const path = imports.paths.join(imports.os.tmpdir(), `${actor}`)
|
const path = imports.paths.join(imports.os.tmpdir(), `${actor}`)
|
||||||
|
|||||||
Reference in New Issue
Block a user