filters: add an example git-bug filter

Add filters/bugs-git-bug.lua, a working filter for the bugs page built
on ezgb.lua and luagit2.  It renders a list view with open/closed
filtering and pagination, and a detail view with bug metadata and
comments.

ezgb.lua is not part of cgit.  It lives under lua/ in
https://git.kernel.org/pub/scm/utils/ezgb/ezgb.git, which also carries a
rockspec for it.

The list view uses ezgb's build_bug_summary() rather than constructing
each bug in full, so identity resolution, comment text and operation
hashing are not paid for bugs that are not on the requested page.
Identity resolution is deferred to render time and done only for the
bugs actually shown.

URLs in comment text are linkified, and every comment gets a permalink
anchor derived from its combined id, so a single comment can be linked
to directly.

Links are built from REQUEST_URI rather than assembled from
configuration, so the filter behaves correctly whatever virtual-root or
URL rewriting is in front of it.

The styles live in cgit.css instead of being injected inline, so a
deployment serving a strict Content-Security-Policy does not have to
allow style-src 'unsafe-inline' for this page.

The filter needs ezgb.lua, luagit2, lua-cjson (or lua-json) and luaossl.
It is an example rather than a dependency: nothing in cgit requires it,
and the page works with any filter that speaks the same interface.

Assisted-by: LLM [codegen, review]
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
1 file changed