1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-07-18 20:59:44 +02:00

feat: Move webhooks configuration from environment variable to UI

This commit is contained in:
Maksim Eltyshev 2025-07-04 22:04:11 +02:00
parent f0680831c2
commit b22dba0d11
128 changed files with 2077 additions and 206 deletions

View file

@ -31,6 +31,9 @@ module.exports = {
type: 'ref',
required: true,
},
webhooks: {
type: 'ref',
},
request: {
type: 'ref',
},
@ -104,6 +107,8 @@ module.exports = {
if (_.isEmpty(values)) {
card = inputs.record;
} else {
const { webhooks = await Webhook.qm.getAll() } = inputs;
if (!_.isNil(values.position)) {
const cards = await Card.qm.getByListId(list.id, {
exceptIdOrIds: inputs.record.id,
@ -402,6 +407,7 @@ module.exports = {
const { id } = await sails.helpers.labels.createOne.with({
project,
webhooks,
values: {
..._.omit(label, ['id', 'boardId', 'createdAt', 'updatedAt']),
board,
@ -459,6 +465,7 @@ module.exports = {
if (values.list) {
await sails.helpers.actions.createOne.with({
webhooks,
values: {
card,
type: Action.Types.MOVE_CARD,
@ -477,7 +484,8 @@ module.exports = {
}
sails.helpers.utils.sendWebhooks.with({
event: 'cardUpdate',
webhooks,
event: Webhook.Events.CARD_UPDATE,
buildData: () => ({
item: card,
included: {