assistify / rcapps-gitlab

RocketChat App to connect to GitLab and GitLab-CI
Apache License 2.0
16 stars 5 forks source link

Alias for roomname #19

Open whedro opened 4 years ago

whedro commented 4 years ago

Hi,

at first , .. thanks for GitLab integration module :)

My question is, if is possible add alias functionality for roomname. My projects rooms have different name and I would like to have messages in this group. I know, that I can change project room to module room ... but I cannot :)

Example: If I have in Gitlab repository with path group/repo, standard roomname in RC is group-repo. I this idea, in setup app module I define alias for roomname group-repo to anothergroup Module willbe check if exists alias for roomname group-repo and if exists, send message to aliasing roomname anothergroup...

Thanks a lot.

Michal

jschirrmacher commented 4 years ago

Aliases would be nice, but there is the problem that we don't have any persistency layer anywhere but the Rocket.Chat instance and the GitLab Instance itself. By "calculating" the room name from the project / repository name in GitLab, we don't need such. But for aliases, where should we store this information?

mrsimpson commented 4 years ago

@jschirrmacher There is a persistence API: https://rocketchat.github.io/Rocket.Chat.Apps-engine/interfaces/ipersistence.html

whedro commented 4 years ago

Maybe "stupid" light solution (if will be persistence fail) :) ... Can be this part on App setting page in Administration in textarea field ? Each row for concretelly repo and room alias .. parsing by => Ex.: group1-repo1=>room_alias1 group1-repo2=>room_alias2 group2-repo2=>room_aliasX

for group2-repo1 alias not exists ... for this case, will be RC send message to group2-repo1 room