Make updates to query structure for author and approvedBy fields
What does this MR do and why?
Author Field Enhancements:
-
✅ AddedIn
operator support for Issues and Epics:authors in ("user1", @user2)
-
✅ Addedauthors
field alias in field mapping -
⚠️ Note: AuthorIn
operator not supported for Merge Requests at API level -
⚠️ Note: Author field does not supportnone
/any
wildcards at API level
ApprovedBy Field Enhancements:
-
✅ Added wildcard support:approvedBy = any
andapprovedBy = none
-
✅ Kept support for both quoted and unquoted syntax:approvedBy = "any"
andapprovedBy = any
README.md updates:
-
✅ Added section where described steps to be able testing your changes end-to-end with Gitlab GDK.
How to set up and validate locally
In glql-rust project:
- Build the Rust code to WASM
wasm-pack build --target web --out-dir pkg
- Build the npm package
npm run build
- Copy the full path to the build
echo "$(pwd)/npm/dist/main.js"
In gitlab gdk:
- In
app/assets/javascripts/glql/core/parser.js
andapp/assets/javascripts/glql/core/transformer.js
change from:
import { glql } from "@gitlab/query-language-rust";
to:
import { glql } from "build path from step 3 in glql-rust project";
- Now in GDK in any markdown field, you can test with the following GLQL queries:
display: table
fields: title, labels, assignee, labels
query: group = "gitlab-org" and author in (@root, "afrnz")
display: table
fields: title, labels, assignee, labels
query: group = "gitlab-org" and type = MergeRequest and approvedBy = none
display: table
fields: title, labels, assignee, labels
query: group = "gitlab-org" and type = MergeRequest and approvedBy = any
Relates to gitlab-org/gitlab#556400
Edited by Alisa Frunza