Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(bitbucket): preserve PR head commits for review guides #18402

Mergedahilles107(GitHub profile, opens in a new tab)merged 2 commits intomain fromrefs/pull/18402/headmerged by Yash-Singh1(GitHub profile, opens in a new tab) View on GitHub

Showing 4 changed files with 82 additions and 2 deletions (loading 1).

x
0 of 4 viewed, 4 left
53 additions and 0 deletionspackages/source-control-bitbucket/src/server/BitbucketPullRequestProvider.test.tsModified
View file
@@ -12,6 +12,59 @@
make,
} from "./BitbucketPullRequestProvider.ts";
​
+it.effect.each([
+ {
+ metadata: "source commit hash",
+ commit: { hash: "9f3a7c2d8b1e6f045a9c3d7e2b8f1a6c0d4e5f93" },
+ headSha: "9f3a7c2d8b1e6f045a9c3d7e2b8f1a6c0d4e5f93",
+ },
+ { metadata: "absent commit", commit: undefined, headSha: undefined },
+ { metadata: "null commit", commit: null, headSha: undefined },
+ { metadata: "absent hash", commit: {}, headSha: undefined },
+ { metadata: "null hash", commit: { hash: null }, headSha: undefined },
+])("reads change request details with $metadata", ({ commit, headSha }) =>
+ Effect.gen(function* () {
+ const pullRequest = Result.getOrThrow(
+ decodePullRequestJson(
+ JSON.stringify({
+ id: 897,
+ title: "Add trustabl-pipe",
+ state: "OPEN",
+ source: {
+ branch: { name: "feat/page" },
+ commit,
+ repository: { full_name: "fork/web" },
+ },
+ destination: { branch: { name: "master" }, commit: { hash: "base-commit" } },
+ created_on: "2026-06-16T05:04:32.258456+00:00",
+ updated_on: "2026-06-16T05:04:33.750542+00:00",