Skip to content

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

@Kuixz

Description

@Kuixz

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions