fix: use GITHUB_RUN_NUMBER for Forgejo job URLs and pin Bun version in CI
Forgejo uses the per-repo sequential run index (GITHUB_RUN_NUMBER) in action URLs, not the internal DB run ID (GITHUB_RUN_ID). This caused "View job" links to return 404. Fixed in all 4 URL construction sites: create-initial comment, update-comment-link, and both prompt generators. Also pins Bun to 1.2.21 in CI — Bun 1.3.9 broke spyOn(fs, ...) which failed 18 upstream image-downloader tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
6ebfb4914f
commit
23f15aecb9
6 files changed
+109
-10
No files matched your search
@@ -10,6 +10,7 @@ import {
|
||||
import {
|
||||
updateForgejoCommentBody,
|
||||
createForgejoPrCompareUrl,
|
||||
getForgejoRunIndex,
|
||||
} from "../forgejo/comment-logic";
|
||||
import { detectPlatform } from "../platform/detector";
|
||||
import {
|
||||
@@ -54,7 +55,9 @@ export async function updateCommentLink(
|
||||
const platform = detectPlatform();
|
||||
|
||||
const serverUrl = GITHUB_SERVER_URL;
|
||||
const jobUrl = `${serverUrl}/${owner}/${repo}/actions/runs/${process.env.GITHUB_RUN_ID}`;
|
||||
const runIdentifier =
|
||||
platform === "forgejo" ? getForgejoRunIndex() : process.env.GITHUB_RUN_ID;
|
||||
const jobUrl = `${serverUrl}/${owner}/${repo}/actions/runs/${runIdentifier}`;
|
||||
|
||||
let comment;
|
||||
let isPRReviewComment = false;
|
||||
|
||||
Reference in new issue
Block a user