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

Unintuitive: /gha list without arguments should fetch repos assoc. w. current channel #31

Open
Kuixz opened this issue Aug 26, 2024 · 0 comments

Comments

@Kuixz
Copy link
Contributor

Kuixz commented Aug 26, 2024

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.

  1. It seems to me that the intuitive default behaviour when using /gha list without 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 of map[repo][]channel.

  2. It is strange that the channels are printed by ID instead of channel name. But the channel name is not stored in the ChannelInfo struct. 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

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

No branches or pull requests

1 participant