bug(mirror-drift-check): the DRIFT comment links its run at http://forgejo:3000, the runner's internal host #1521

Open
opened 2026-10-02 20:52:23 +02:00 by claude · 0 comments
Member

mirror-drift-check's DRIFT comment on #1348 links its run as http://forgejo:3000/frankenbit/release-toolkit/actions/runs/<n>. forgejo:3000 is the hostname the runner reaches Forgejo by, and a reader's browser cannot resolve it. 26 of the 27 links in #1348's comments are dead this way.

Measured

At origin/main aa6f603 (2026-10-02):

# Where What
1 .forgejo/workflows/mirror-drift-check.yml:215 RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_number }}
2 mirror-drift-check.yml:231 the comment body embeds it as [run](%s)
3 #1348's comments link hosts: http://forgejo:3000 × 26 (every DRIFT comment from 2026-09-08 on), https://git.frankenbit.de × 1
4 the same workflow's API calls (:169, :252, :259, :272) also use github.server_url, and work, because the runner resolves forgejo:3000. Only the human-facing link is wrong.
5 the same run's commit statuses target_url is relative (/frankenbit/release-toolkit/actions/runs/19185/jobs/0), and that opens correctly in a browser

git grep 'github.server_url }}/${{ github.repository }}' -- .forgejo/workflows finds only line 1, so no other workflow builds a link for people this way.

Why it matters

The comment exists so a person can act on it (#1348). The remedy it names is a dispatch, and the first thing a reader does is open the run to read the log. That link is dead on every comment. It is a small defect on the same delivery path that #1520 measures failing.

Decision tree

  • A relative link (/<repo>/actions/runs/<n>), the shape the commit statuses already use, is right when the comment is only read on this instance. Forgejo renders it against whatever host the reader is on.
  • The repo's html_url from GET /repos/{owner}/{repo}, which follows the instance's ROOT_URL, is right if the comment text may be copied off-instance and needs an absolute URL.

Lean: relative. It matches the status target_url and needs no extra request.

Acceptance criteria

  • The DRIFT comment's run link opens the run in a reader's browser. This is measured by following the link in a comment the workflow actually posted.
  • A test in tests/workflows.bats fails if a human-facing link in a posted body is built from github.server_url again.
`mirror-drift-check`'s DRIFT comment on #1348 links its run as `http://forgejo:3000/frankenbit/release-toolkit/actions/runs/<n>`. `forgejo:3000` is the hostname the runner reaches Forgejo by, and a reader's browser cannot resolve it. **26 of the 27 links in #1348's comments are dead this way.** ## Measured At `origin/main` `aa6f603` (2026-10-02): | # | Where | What | |---|---|---| | 1 | `.forgejo/workflows/mirror-drift-check.yml:215` | `RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_number }}` | | 2 | `mirror-drift-check.yml:231` | the comment body embeds it as `[run](%s)` | | 3 | #1348's comments | link hosts: `http://forgejo:3000` × 26 (every DRIFT comment from 2026-09-08 on), `https://git.frankenbit.de` × 1 | | 4 | the same workflow's API calls (`:169`, `:252`, `:259`, `:272`) | also use `github.server_url`, and work, because the *runner* resolves `forgejo:3000`. Only the human-facing link is wrong. | | 5 | the same run's commit statuses | `target_url` is relative (`/frankenbit/release-toolkit/actions/runs/19185/jobs/0`), and that opens correctly in a browser | `git grep 'github.server_url }}/${{ github.repository }}' -- .forgejo/workflows` finds only line 1, so no other workflow builds a link for people this way. ## Why it matters The comment exists so a person can act on it (#1348). The remedy it names is a dispatch, and the first thing a reader does is open the run to read the log. That link is dead on every comment. It is a small defect on the same delivery path that #1520 measures failing. ## Decision tree - **A relative link** (`/<repo>/actions/runs/<n>`), the shape the commit statuses already use, is right when the comment is only read on this instance. Forgejo renders it against whatever host the reader is on. - **The repo's `html_url` from `GET /repos/{owner}/{repo}`**, which follows the instance's `ROOT_URL`, is right if the comment text may be copied off-instance and needs an absolute URL. **Lean:** relative. It matches the status `target_url` and needs no extra request. ## Acceptance criteria - [ ] The DRIFT comment's run link opens the run in a reader's browser. This is measured by following the link in a comment the workflow actually posted. - [ ] A test in `tests/workflows.bats` fails if a human-facing link in a posted body is built from `github.server_url` again.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
frankenbit/release-toolkit#1521
No description provided.