-
Notifications
You must be signed in to change notification settings - Fork 496
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
Future filter syntax and logical combinators #913
Comments
I would really enjoy being able to use wildcard syntax. Something like The Looker syntax seems like a good start. I came here from #384. Thank you so much scepticulous! |
Is this still relevant? If so, just comment with any updates and we'll leave it open. Otherwise, if there is no further activity, it will be closed. |
I can promise this is still valuable to SlackOps. |
I'm interested in having an exclusion filter, so I would get all notifications except those with a particular label. I think that's relevant to this issue. For example, we get a bunch of dependabot PRs every time it runs, and the PR previews take up a ton of space. Dependabot allows you to automatically add a label to its PRs, and I'd use that label to ignore notifications. Example (using
|
I would also love to see the ability to apply the label filters to either |
It would be really nice to have some combination of commits and labels, so I could subscribe to commits in any branches with PRs associated with any given label. |
Exactly the same feature I was looking for, filtering some bots PRs. A syntax like In the Slack Scheduled Reminders (https://github.com/organizations/xxx/settings/reminders) you can filter by a certain text in the title or some labels, but this is just for the daily reminder: It seems this issue has not received a lot of love in recent times... is still planned to work on this? |
What
AND
andOR
combination of filters.When adding the capability to filter incoming events based on certain rules (e.g. labels), it will eventually become necessary to combine rules via boolean logic and requested here: #911 (comment).
Why
We implementing label features we can only make AND or OR the default behavior.
For now, OR seemed like the approach, that would address more use-cases. This can be wrong however and either way, we will have to support both combinators sooner or later.
Eventually, this will require a more sophisticated filter syntax.
As a first step, this can be done by adding inline tokens. As a second step filters might need to become more explicit.
Syntax
Ideas
I don't have strong feelings about the details of the syntax, but it should be:
Some inspiration can be found in @izuzak 's comment
label:foo,bar label:baz
.Another, very similar source would be Looker string expressions.
We could also use boolean operators like"
label: foo|"foo bar" baz
to express (foo or "foo bar" and baz).Since we already use space as a combinator (currently OR), we can keep that (as shown above) and only need an additional combinator for the other case.
Proposal
Inline combinators
|
,,
the OR operator.Dedicated syntax
When filters gain adoption and become more sophisticated it might make sense to add a new
command
instead or in addition to allowing it as part of thesubscribe
command.One example could be
/github filter issues <filter expression>
Required features
In order to consider this syntax successful, the following (requested) use cases should be covered:
me
Feedback
This topic is not going to be implemented very soon, so I would love to get as much feedback as possible about preferences and also about existing standards or libraries, that already parse expressions like this, so we could skip writing grammar and parser.
cc
@izuzak @integrations/integrations-reviewers for ideasThe text was updated successfully, but these errors were encountered: