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

Change the way the changedDescriptor, on a SyncEvent, are 'consumed' #17

Open
joantune opened this issue May 3, 2013 · 0 comments
Open
Labels

Comments

@joantune
Copy link
Owner

joantune commented May 3, 2013

Instead of the switch case, one could register smaller "SyncAction" instances that would take care of a given descriptor, and consume it.

In the end, if consumers where still present, a warning or error would be thrown (meaning we didn't take into consideration all of the changes). This would prevent the use of that nasty boilerplate switch case, which is half idiotic, but that hopefully does the trick of forcing you to take into consideration all of the changes.

Also, this would allow logs to be made, as one of the methods of the smaller SyncAction would be a description of what it did, e.g. the milestone descriptor changes on an ACTask, you would have a SyncAction that consumed that event and whose description of its actions would be something like, created/reused the corresponding milestone number/url on the GH side.

Anyway, this for now is a question for future processing, because the SyncAction might have more requirements that haven't been fully envisioned now (depending on the problems that will arise in the future). And also because there are some other issues to solve with this approach, like how to take care of the state that should be shared between SyncAction's e.g. a Issue that is to be edited/created on the GH side should be shared. It isn't clear yet on how this and other issues are going to be solved with this approach (and now the priority is to put this to work).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant