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

Rename room command to channel #58

Merged
merged 1 commit into from
Dec 24, 2018

Conversation

kaffein
Copy link
Member

@kaffein kaffein commented Dec 23, 2018

hey guys,

here is the PR related to yetibot/yetibot#799 : Renaming the room command to channel :-)

So what do we have here :

  • first of all, I have renamed the room.clj file to channel.clj for more accuracy and also because I assume that the new naming scheme will be based on channel from now on.

  • I have also extended the Adapter protocol by introducing a new channels function which (should be)/is nothing more than alias to the existing rooms function and whose implementation should just point to the existing rooms function implementation, for any record implementing the Adapter protocol.

  • I have also renamed multiple auxiliary functions whose names were related to room to instead use the word channel. Same thing for the docstrings. These are more cosmetic changes and were not necessarily important in order to have the project running. But for more accuracy within the codebase, it is nicer to have the same naming scheme used (almost) everywhere.

I have said almost everywhere in the previous sentence because of course we can not change everything containing the word room within it and especially the underlying data model related to rooms.

Therefore, a little hint for the review ^^ :

  • there should not be changes related to room command data model extraction/destructuring in this PR. So things like the following should remain unchanged :
[{:keys [adapter room] :as chat-source} ts]

otherwise, we can get into trouble and you should let me know if you find such changes so I can fix it ;-)

Now, here is how it renders so far :

New channel command in action

channel_cmd_in_action

The room command (maintained for compatibility)

room_cmd_compatibility

feel free to play around with this branch guys and as usual, do not hesitate to let me know if you find any issue related to the changes introduced.

thanks \o

The command hook for the `room` command has been updated to also match its new alias `channel`.
Backward compatibility is then ensured since the old `room` command is still available.
Though, for more accuracy within the codebase and to accommodate with the changes introduced
by the new command naming scheme, centered around the `channel`, multiple functions and
comments have been updated accordingly.
@devth
Copy link
Member

devth commented Dec 24, 2018

💯 looks great @kaffein. I tested and everything looks good so I'll merge, then test a little more before release. Thanks!!!!

@devth devth merged commit 36a0556 into yetibot:master Dec 24, 2018
@kaffein
Copy link
Member Author

kaffein commented Dec 24, 2018

thanks @devth ;-)

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

Successfully merging this pull request may close these issues.

2 participants