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

Allow excluding organisation members from subscription events #125

Closed
hanzei opened this issue Sep 24, 2019 · 5 comments · Fixed by #154 · May be fixed by stefan-thothmind/mattermost-plugin-github#4
Closed

Allow excluding organisation members from subscription events #125

hanzei opened this issue Sep 24, 2019 · 5 comments · Fixed by #154 · May be fixed by stefan-thothmind/mattermost-plugin-github#4
Assignees
Labels
Difficulty/2:Medium Medium ticket Help Wanted Community help wanted Tech/Go

Comments

@hanzei
Copy link
Contributor

hanzei commented Sep 24, 2019

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.

@hanzei hanzei added Help Wanted Community help wanted Up For Grabs Ready for help from the community. Removed when someone volunteers labels Sep 24, 2019
@enoldev
Copy link
Contributor

enoldev commented Nov 2, 2019

I'd like to work on this! Thanks.

@hanzei
Copy link
Contributor Author

hanzei commented Nov 2, 2019

That's awesome, thanks @enolal826 🎉

@hanzei hanzei removed the Up For Grabs Ready for help from the community. Removed when someone volunteers label Nov 2, 2019
@enoldev
Copy link
Contributor

enoldev commented Nov 3, 2019

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!

@hanzei
Copy link
Contributor Author

hanzei commented Nov 4, 2019

  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.

@enoldev
Copy link
Contributor

enoldev commented Nov 4, 2019

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
Labels
Difficulty/2:Medium Medium ticket Help Wanted Community help wanted Tech/Go
Projects
None yet
4 participants