mirror of
https://github.com/block/buzz.git
synced 2026-10-30 22:11:36 +00:00
fix(projects): route commit links to source repo
Co-authored-by: Wrench <0eabe6ea5758c1e4c5b68cea4ac42b32c479072883cb28da8110b4a47c32b9a1@buzz.block.builderlab.xyz> Signed-off-by: Wrench <0eabe6ea5758c1e4c5b68cea4ac42b32c479072883cb28da8110b4a47c32b9a1@buzz.block.builderlab.xyz>
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import assert from "node:assert/strict";
|
||||
import { readFileSync } from "node:fs";
|
||||
import test from "node:test";
|
||||
|
||||
const source = readFileSync(
|
||||
new URL("./ProjectHomeWorkspaceSheet.tsx", import.meta.url),
|
||||
"utf8",
|
||||
);
|
||||
|
||||
test("aggregated commit detail uses the repository that owns the selected commit", () => {
|
||||
const detailPanel = source.match(/<ProjectCommitDetailPanel[\s\S]*?\/>/)?.[0];
|
||||
|
||||
assert.ok(detailPanel, "expected the commit detail panel to be rendered");
|
||||
assert.match(detailPanel, /project=\{selectedCommitRepository\}/);
|
||||
});
|
||||
@@ -341,7 +341,7 @@ export function ProjectHomeWorkspaceSheet({
|
||||
diffLoading={commitDiffQuery.isLoading}
|
||||
originAgentName={selectedCommitPullRequest?.originAgentName}
|
||||
originChannelId={selectedCommitPullRequest?.channelId}
|
||||
project={repository}
|
||||
project={selectedCommitRepository}
|
||||
/>
|
||||
) : (
|
||||
<ProjectHomeCommitsPanel
|
||||
|
||||
Reference in New Issue
Block a user