Commit 418efcebf3

418efcebf35eafcab3de673d801706eeb06ce163

parent: d5176c7dfc

Verified · cmc ci/build: success ci/test: success

cmc <hello@cleberg.net> · 2026-09-29 05:37 UTC

wiki, changelog: saved queries

Closes #292

Layout: unified · split

.gitbay/wiki/Parity.org +18
@@ -309,6 +309,9 @@ now render the way the reference does. go-org is not yet on the corpus.
309|----------------------------------+-----+-----+-----| 309|----------------------------------+-----+-----+-----|
310| search repositories | yes | yes | yes | 310| search repositories | yes | yes | yes |
311| search issues and merge requests | yes | yes | yes | 311| search issues and merge requests | yes | yes | yes |
312| saved query save, remove, pin | yes | no | no |
313| saved query list and results | yes | yes | no |
314| pinned queries on the dashboard | yes | yes | no |
312| browse all public repositories | yes | yes | yes | 315| browse all public repositories | yes | yes | yes |
313| profile page | yes | yes | yes | 316| profile page | yes | yes | yes |
314| profile sections as tabs | n/a | yes | n/a | 317| profile sections as tabs | n/a | yes | n/a |
@@ -327,6 +330,21 @@ operator — =c++=, =AND=, a lone quote — is a word to match and never a
327syntax error. =repo grep= remains the per-repository file-contents 330syntax error. =repo grep= remains the per-repository file-contents
328search. 331search.
329 332
333A saved query is a named query over issues and merge requests across
334every repository the caller can read (#292): =query save <name>
335<query>= (=--force= replaces), =query list=, =query show= with its
336count, =query run= for the rows, =query remove=, =query pin= and
337=unpin=. =issue list --query <name>= and =mr list --query <name>= run
338one narrowed to their kind, and =--q '<query>'= takes one written out.
339Results are newest first, always paged with ={items, next}= and fifty
340rows by default, each naming its repository. Readability is the
341search rule, decided in the SQL, so a private repository someone else
342owns is neither a row nor part of a count. =dashboard= carries each
343pinned query's count and first five rows under =queries=; the web
344shows them on the dashboard and serves =/<owner>/-/queries= and
345=/<owner>/-/queries/<name>=, which are a 404 under anyone else's name.
346Saving, removing and pinning have no web form yet.
347
330The about text is =profile/README.{md,org,markdown}= on the default 348The about text is =profile/README.{md,org,markdown}= on the default
331branch of =<owner>/.gitbay=, resolved in that order, so the extension 349branch of =<owner>/.gitbay=, resolved in that order, so the extension
332picks the renderer rather than a stored format. =profile show= reports 350picks the renderer rather than a stored format. =profile show= reports
.gitbay/wiki/Users.org +35
@@ -455,6 +455,41 @@ Lists narrow the same way on every surface: =issue list --label bug
455merge request lists take the same names as query parameters, and each 455merge request lists take the same names as query parameters, and each
456active filter shows with a link that drops it. 456active filter shows with a link that drops it.
457 457
458A query spans repositories, and a saved one keeps it under a name:
459
460#+begin_src sh
461gitbay query save mine is:open assignee:@me
462gitbay query save triage 'repo:krz/*' is:issue is:open no:label
463gitbay query save v2 owner:krz label:bug 'label:needs review' milestone:v2
464gitbay query list / show mine / remove mine
465gitbay query run mine [--limit 20] [--cursor <c>] # issues and MRs
466gitbay issue list --query mine # only the issues
467gitbay mr list --q 'owner:krz is:open author:@me' # a query written out
468gitbay query pin mine # on the dashboard; unpin
469#+end_src
470
471The terms: =repo:owner/name=, =repo:owner/glob*= (=*= in the name
472only), =repo:*=, =owner:name=; =is:open=, =is:closed=, =is:merged=,
473=is:issue=, =is:mr=; =label:x= (repeat it: every label must be there),
474=no:label=; =milestone:x=, =no:milestone=; =assignee:user=,
475=author:user=, either as =@me= for whoever runs the query. Anything
476without a colon is text matched against title and body, as =search=
477does. Every term narrows, except that several =repo:= and =owner:=
478terms widen the scope to any of them; with none the query covers every
479repository you can read, and only those — someone else's private
480repository is neither a row nor part of a count. Merge requests have no
481assignees, so =assignee:= means issues. A term that does not parse
482exits 2 and names itself. =@me= is resolved when the query runs, and
483the saved text is the query in a canonical order.
484
485Rows come newest first, each naming its repository, paged as ={items,
486next}= with fifty to a page unless =--limit= says otherwise.
487An account keeps at most 50 saved queries, 10 of them pinned; past
488either, =query save= or =query pin= exits 2 until one is removed or
489unpinned. =dashboard --json= carries each pinned query's count and first five
490rows under =queries=; the web dashboard shows them, and
491=/you/-/queries= lists your saved queries with a page per query.
492
458Labels take a colour: =gitbay label set bug --color cf222e=; =label 493Labels take a colour: =gitbay label set bug --color cf222e=; =label
459list= shows each with its colour and how many issues and merge requests 494list= shows each with its colour and how many issues and merge requests
460carry it, and =label remove= takes one off all of them. =issue label 495carry it, and =label remove= takes one off all of them. =issue label
CHANGELOG.org +8
@@ -39,6 +39,14 @@ anything beyond "replace the binary and restart" is needed.
39- Reactions on issues, merge requests and their comments: =issue react= 39- Reactions on issues, merge requests and their comments: =issue react=
40 and =mr react= with a fixed set of eight, counts and your own in 40 and =mr react= with a fixed set of eight, counts and your own in
41 =show=, comment ids in =show=, and buttons on the web pages (#291). 41 =show=, comment ids in =show=, and buttons on the web pages (#291).
42- Saved queries: =query save|list|show|run|remove|pin|unpin= keep a
43 named query over issues and merge requests across every repository
44 the caller can read (=repo:=, =owner:=, =is:=, =label:=, =no:=,
45 =milestone:=, =assignee:=, =author:=, free text). =issue list --query=
46 and =mr list --query= run one, =--q= takes one written out, both paged
47 with ={items, next}=. =dashboard= gains =queries= for pinned ones; the
48 web shows them on the dashboard and at =/<you>/-/queries=. An account
49 keeps at most 50 saved queries, 10 pinned (#292).
42 50
43* v1.38.0 — 2026-09-29 51* v1.38.0 — 2026-09-29
44 52