Skip to content

Allow excluding organisation members from subscription events  #125

Closed
stefan-thothmind/mattermost-plugin-github
#4

Description

@hanzei

There should be an option to not post issue and PR events from organisation members. If the flag --exclude-org-member is provided when subscribing to a repo, events from organisation members will not trigger notification.

If not organisation is set (https://github.com/mattermost/mattermost-plugin-github/blob/master/plugin.json#L45-L48), this flag has no effect.

Activity

  1. added
    Help Wanted
    Up For Grabs
    on Sep 24, 2019
  2. enoldev commented on Nov 2, 2019

    @enoldev
    Contributor

    I'd like to work on this! Thanks.

  3. hanzei commented on Nov 2, 2019

    @hanzei
    ContributorAuthor

    That's awesome, thanks @enolal826 🎉

  4. removed
    Up For Grabs
    on Nov 2, 2019
  5. enoldev commented on Nov 3, 2019

    @enoldev
    Contributor

    Hello!

    Two aspects:

    1. Since currently no flags are supported, I've thought it'd be more convenient for the Subscription struct to have a "flags" field. What do you think?
    2. As of now, when subscribing there is just one field "features" supported and is supposed to be a comma-separated string, but other features are also considered:
      features = strings.Join(parameters[1:], " ")

    It means that for the command
    /github subscribe owner/repo pulls,issues anotherThing
    both "pulls,issues" and "anotherThing" would be inserted in the "feature" field. I don't know if this is something expected

    Thanks!

  6. hanzei commented on Nov 4, 2019

    @hanzei
    ContributorAuthor
    1. I would like to have the "flags" as boolean fields of in the Subscription struct. This way we make sure that we do the parsing of the input only once and then have all data in the struct
    2. That is not expected. "anotherThing" should not go into Features.

    Let me know, if this resolves your questions.

  7. enoldev commented on Nov 4, 2019

    @enoldev
    Contributor

    Ok, I see flags as Subscription fields a good idea. It should also be more efficient than having it in an array of strings as we won't have to iterate just to check if the flag is set. Maybe another struct SubscriptionFlags could be included.

    Thanks @hanzei!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Difficulty/2:MediumHelp WantedTech/Go

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions