-
Notifications
You must be signed in to change notification settings - Fork 56
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
Support filtering by extended approval conditions #935
Comments
Here are some early comments:
|
I guess the main question is: how are the new operators going to be translated to an elastic query? |
Actually, after looking more at the EL doc, I'm not sure that's possible to filter a doc based on a script relying on a document's field. There is that thing: expression language https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting-expression.html but limitations (at the end of the page) are pretty heavy.
Well maybe, but if a bot votes 'APPROVED' then the only member assumption will be false. However I like the syntax
Yes that could a be solution. However as Or perhaps when we build the EL query we expand
That might be a solution too, but |
Problem statement
The self-merged metrics is based on provider data model and in some cases does not reflect what a team expect.
Indeed a change that match
state == self_merged
is a change where <created_by> == <merged_by>.For instance, here are some team workflows for which the self-merged metrics is not relevant:
The current data model and the query language does not provide enough flexibility to allow filtering for those changes.
Proposed solution
For the first workflow, a self-merged change is a change that match
state:self_merged and author in approval_authors['APPROVED'] and not <reviewer_group> - author in approval_authors['APPROVED']
For the second use case, a self-merged change is a change that match
state:merged and author in approval_authors[Workflow+1] and not <reviewer_group> - author in approval_authors['Code-Review+2']
Required changes
The text was updated successfully, but these errors were encountered: