Compare commits
2 Commits
dd36ee1aba
...
1402f28b98
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1402f28b98 | ||
|
|
02cd395ff5 |
0
.gitignore
vendored
Normal file → Executable file
0
.gitignore
vendored
Normal file → Executable file
0
config/default.js
Normal file → Executable file
0
config/default.js
Normal file → Executable file
4
package-lock.json
generated
Normal file → Executable file
4
package-lock.json
generated
Normal file → Executable file
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "kanbanmod",
|
||||
"version": "1.1.1",
|
||||
"version": "1.1.2",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "kanbanmod",
|
||||
"version": "1.1.1",
|
||||
"version": "1.1.2",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"bhttp": "^1.2.8",
|
||||
|
||||
2
package.json
Normal file → Executable file
2
package.json
Normal file → Executable file
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "kanbanmod",
|
||||
"version": "1.1.1",
|
||||
"version": "1.1.2",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
||||
10
src/app.js
Normal file → Executable file
10
src/app.js
Normal file → Executable file
@@ -31,6 +31,12 @@ async function getWekanActorNames() {
|
||||
}
|
||||
|
||||
const actorNames = wekanBoardRes.body.map((card) => {
|
||||
if (!card.title) {
|
||||
console.warn('Missing card title', card);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
const name = card.title.split(/\s+/).slice(0, 2).join(' ');
|
||||
|
||||
if (name.includes('.')) {
|
||||
@@ -41,7 +47,7 @@ async function getWekanActorNames() {
|
||||
return name;
|
||||
;});
|
||||
|
||||
return actorNames;
|
||||
return actorNames.filter(Boolean);
|
||||
}
|
||||
|
||||
async function init() {
|
||||
@@ -52,7 +58,7 @@ async function init() {
|
||||
const actorLineIndex = automodLines.findIndex((line) => line.includes(config.actorCommentKey)) + 1;
|
||||
const actorLine = automodLines[actorLineIndex];
|
||||
|
||||
const wekanActorNames= await getWekanActorNames();
|
||||
const wekanActorNames = await getWekanActorNames();
|
||||
const actorNames = [...config.baseActorNames, ...wekanActorNames];
|
||||
const newActorLine = `title: ${JSON.stringify(actorNames)}`;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user