Open TomDotBat opened 3 years ago
this is about the lmao i can't code
line isn't it
this is about the
lmao i can't code
line isn't it
Partially, but overall that file is rather badly structured and only really does the bare minimum.
Alright. Well for the start, I think the file structure need to change too, if you want to follow how YouTrack works that is. If you see YouTrack example Scrum workflow, you can see there are these rules:
assign-on-move
fix-parent-on-subtasks-resolve
no-ideal-days-for-epics
no-story-points-for-tasks
open-parent-on-subtask-open
each of this rule is a single js file. Each of the rule of course do a single functionality. Now for this case, if you want, main.js can be split into rules like notify-on-done
, notify-on-assigned
, notify-on-comment
, etc., and people can just remove rules or even add more in their own YouTracks. Even better, the config can be placed on each of these rules, so people can configure different WebHook URL per notification type, well, for the cost of having to configure each one of them.
Or we can just follow Slack Notification Simple workflow, which contains only a single file send-to-slack
. IMHO, those that do not understand JS cannot easily edit that file, and so cannot just add/remove tasks at will this way.
The entire file needs a refactor at some point. It definitely works as intended but it's slightly embarrassing.