fix(ci): audit-force-merge — strip scheme in shell, not broken Gitea | replace
#59
Reference in New Issue
Block a user
Delete Branch "fix/audit-server-url-replace-lexer"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
audit-force-mergejob has failed on every run (status=2, all of 2026-06-10) with:Named mechanism
The step set
GITEA_HOST: ${{ github.server_url | replace('https://','') }}. Gitea's workflow expression lexer mis-parses the single|as the beginning of the||operator, so interpolation fails before the audit script runs. The job is a post-merge (pull_request_target: closed,merged == true) forensic audit, so it does not gate PRs — but the force-merge audit trail has been silently non-functional (not flaky: 6/6 recent runs red).Fix
Pass
github.server_urlwhole intoGITEA_SERVER_URLand strip the scheme in the shell step (${VAR#https://}), which the script already expects as a bare host (API="https://${GITEA_HOST}/api/v1"). Noreplace()expression.Verification
.gitea/workflows/audit-force-merge.yml.audit-force-merge.shis unchanged and already consumes a bareGITEA_HOST.🤖 Generated with Claude Code
| replaceThe Detect force-merge step set GITEA_HOST via `${{ github.server_url | replace('https://','') }}`. Gitea's expression lexer mis-parses the single `|` as the start of `||`, so the job fails at expression-interpolation time (every run, status=2) before the audit script runs. Pass github.server_url whole and strip the scheme in the shell step instead. Named mechanism: Gitea expression lexer `| replace` -> `||` parse error. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>verified: audit-force-merge strips scheme in shell (not broken Gitea | replace), required CI green (CI / test)
verified: audit-force-merge strips scheme in shell (not broken Gitea | replace), required CI green (CI / test)