aboutsummaryrefslogtreecommitdiff
path: root/ui-summary.c
diff options
from:
to:
context:
space:
mode:
authorGravatar Saya Andy <saya.andy@posteo.com> 2026-07-30 12:26:52 +0700
committerGravatar Saya Andy <saya.andy@posteo.com> 2026-07-30 12:26:52 +0700
commitb4b4f2325db71041f38902143b28bae94762b111 (patch)
tree8ad6f71551b249d7aa52fc864d586becd4ff34de /ui-summary.c
parentdbed2ecdf824d154f7d69a624013a02e6e0966be (diff)
downloadcgitext-b4b4f2325db71041f38902143b28bae94762b111.tar.gz
cgitext-b4b4f2325db71041f38902143b28bae94762b111.zip
ui-ci: add a "ci" tab which redirects to an external ci system
Add a "ci" page which redirects to an external ci system for the ref being viewed, along with a tab for it in the repository header. The target is a url template, configurable globally or per repository, with separate settings for branches and tags because pipelines for the two commonly live at different locations: on a Jenkins multibranch pipeline a branch is at job/<name>/job/<ref> while a tag is at job/<name>/view/tags/job/<ref>. $ref, $repo and $slug are substituted, $slug being the repository url with any ".git" suffix removed and slashes replaced by dashes, which is the shape job names usually take. An explicit repo.ci-url drops the branch and tag urls the repository would otherwise inherit from the global settings, as it could never take effect otherwise. The expansion is written to the Location header verbatim rather than through cgit_redirect(), which percent-encodes '?', '=' and '%' and would corrupt any url carrying a query string. An expansion containing CR or LF is refused so that it cannot smuggle in further headers. Signed-off-by: Saya Andy <saya.andy@posteo.com>
Diffstat (limited to 'ui-summary.c')
0 files changed, 0 insertions, 0 deletions