mirror of
https://github.com/plankanban/planka.git
synced 2026-02-05 00:39:58 +03:00
[PR #691] [CLOSED] feat: ✨ add webhook #1068
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/plankanban/planka/pull/691
Author: @HannesOberreiter
Created: 4/8/2024
Status: ❌ Closed
Base:
master← Head:webhook📝 Commits (4)
84e181afeat: ✨ add webhooka0c7c73docs: 📝 add comments9ad2a34refactor: ♻️ move env variables to initc129e83fix: 🐛 fix slack📊 Changes
10 files changed (+220 additions, -93 deletions)
View changed files
📝
server/.env.sample(+3 -0)📝
server/api/controllers/cards/delete.js(+4 -3)📝
server/api/controllers/comment-actions/delete.js(+8 -3)📝
server/api/helpers/actions/create-one.js(+1 -27)📝
server/api/helpers/actions/delete-one.js(+11 -0)📝
server/api/helpers/cards/delete-one.js(+13 -7)➕
server/api/helpers/utils/send-message.js(+175 -0)➖
server/api/helpers/utils/send-slack-message.js(+0 -53)📝
server/api/models/Action.js(+2 -0)📝
server/config/custom.js(+3 -0)📄 Description
This pull request introduces the ability to configure a global webhook URL. This allows notifications to be sent to a destination of your choice, in addition to Slack.
Why a global webhook? A global webhook would allow easily to integrate other in-house and more solutions without the need to wait for features arrive in plankaban.
To support this feature, I've refactored the existing Slack message utility to be more versatile and handle message generation internally.
Additional Changes:
Testing Note:
I wasn't able to test the Slack integration changes myself as I don't have Slack installed. However, I reviewed the official Slack documentation and identified some discrepancies between the current implementation and the official docs. Further review and testing are needed!Did send wrong encoding and moved to JSON which seems simpler, now it works (https://api.slack.com/web#posting_json).Improvements:
Add more actions to the global webhook, eg. user created, boards etc.
Possible related issues: https://github.com/plankanban/planka/issues/656, https://github.com/plankanban/planka/issues/215
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.