mirror of
https://github.com/plankanban/planka.git
synced 2025-12-19 01:12:02 +03:00
feat: Webhooks configuration, all events support, refactoring
This commit is contained in:
@@ -2,10 +2,6 @@ const POSITION_GAP = 65535; // TODO: move to config
|
||||
|
||||
module.exports = {
|
||||
inputs: {
|
||||
user: {
|
||||
type: 'ref',
|
||||
required: true,
|
||||
},
|
||||
board: {
|
||||
type: 'ref',
|
||||
required: true,
|
||||
@@ -14,6 +10,10 @@ module.exports = {
|
||||
type: 'json',
|
||||
required: true,
|
||||
},
|
||||
actorUser: {
|
||||
type: 'ref',
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
|
||||
async fn(inputs) {
|
||||
@@ -87,7 +87,7 @@ module.exports = {
|
||||
trelloComments.map(async (trelloComment) => {
|
||||
return Action.create({
|
||||
cardId: plankaCard.id,
|
||||
userId: inputs.user.id,
|
||||
userId: inputs.actorUser.id,
|
||||
type: 'commentCard',
|
||||
data: {
|
||||
text:
|
||||
@@ -105,7 +105,7 @@ module.exports = {
|
||||
const plankaCard = await Card.create({
|
||||
boardId: inputs.board.id,
|
||||
listId: plankaList.id,
|
||||
creatorUserId: inputs.user.id,
|
||||
creatorUserId: inputs.actorUser.id,
|
||||
position: trelloCard.pos,
|
||||
name: trelloCard.name,
|
||||
description: trelloCard.desc || null,
|
||||
|
||||
Reference in New Issue
Block a user