You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow excluding organisation members from subscription events #125
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.
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?
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
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
That is not expected. "anotherThing" should not go into Features.
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.
Activity
enoldev commentedon Nov 2, 2019
I'd like to work on this! Thanks.
hanzei commentedon Nov 2, 2019
That's awesome, thanks @enolal826 🎉
enoldev commentedon Nov 3, 2019
Hello!
Two aspects:
features = strings.Join(parameters[1:], " ")It means that for the command
/github subscribe owner/repo pulls,issues anotherThingboth "pulls,issues" and "anotherThing" would be inserted in the "feature" field. I don't know if this is something expected
Thanks!
hanzei commentedon Nov 4, 2019
Subscriptionstruct. This way we make sure that we do the parsing of the input only once and then have all data in the structFeatures.Let me know, if this resolves your questions.
enoldev commentedon 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!