Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

main.js is a mess #2

Open
TomDotBat opened this issue May 8, 2021 · 3 comments
Open

main.js is a mess #2

TomDotBat opened this issue May 8, 2021 · 3 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@TomDotBat
Copy link
Owner

The entire file needs a refactor at some point. It definitely works as intended but it's slightly embarrassing.

@TomDotBat TomDotBat added the enhancement New feature or request label May 8, 2021
@TomDotBat TomDotBat added the help wanted Extra attention is needed label Jun 23, 2021
@gregory112
Copy link

this is about the lmao i can't code line isn't it

@TomDotBat
Copy link
Owner Author

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.

@gregory112
Copy link

gregory112 commented Aug 6, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants