-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Refer #27.
Right now the command /gha list requires you to supply an argument, which is the repo /gha list owner/repo, and will then print the channels receiving updates from that repo. e.g. /gha list owner/repo -> owner/repo is sending updates to: channelID1, channelID2
So there are two strange points about this.
-
It seems to me that the intuitive default behaviour when using
/gha listwithout arguments, should list all the repos that are sending updates to the channel where the command is called from. e.g./gha list->channelID1 is receiving updates from owner1/repo1, owner2/repo2. But this is not supported in the current abstract data structure ofmap[repo][]channel. -
It is strange that the channels are printed by ID instead of channel name. But the channel name is not stored in the
ChannelInfostruct. Maybe there is a method provided by slack to fetch the channel data of a channel by ID?
For no 1: I think we could try to switch the abstract data structure map[repo][]channel for Relation<repo, channel>, where each repo can be mapped to a list of channels, but at the same time each channel can be mapped to a list of repos (more precisely: a binary relation on disjoint sets). Whether this is implemented with two maps or a huge list with a filter or something else is TBD