| author | |
| committer | |
| log | 38f3c62304bfe79ea6c9f75a17afb732b555f48d |
| tree | 009de3770c650ff5d213e873166c29364803e47e |
| parent | b21f3b71913370a1a650a61fd9082f992d40e657 |
| signature | Signed by PGP key B5690EEEBB952194 |
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Signed-off-by: Pujitha Paladugu <10557236+pujitha24@users.noreply.github.com>2 files changed, 14 insertions(+), 0 deletions(-)
packages/shared/src/threadPullRequests.test.ts+12| ... | ... | @@ -242,6 +242,18 @@ describe("legacyLinkedPullRequestOf", () => { |
| 242 | 242 | it("does not guess when the project identity is unavailable", () => { |
| 243 | 243 | expect(legacyLinkedPullRequestOf([link(7)], "project-1" as never, null)).toBeNull(); |
| 244 | 244 | }); |
| 245 | it("does not route links for a local-path remote with no host or provider", () => { | |
| 246 | const localIdentity = { | |
| 247 | canonicalKey: "/tmp/r/remote", | |
| 248 | displayName: "remote", | |
| 249 | locator: { | |
| 250 | source: "git-remote" as const, | |
| 251 | remoteName: "origin", | |
| 252 | remoteUrl: "/tmp/r/remote.git", | |
| 253 | }, | |
| 254 | }; | |
| 255 | expect(legacyLinkedPullRequestOf([link(7)], "project-1" as never, localIdentity)).toBeNull(); | |
| 256 | }); | |
| 245 | 257 | }); |
| 246 | 258 | |
| 247 | 259 | describe("resolveThreadPullRequestChains", () => { |
packages/shared/src/threadPullRequests.ts+2| ... | ... | @@ -157,7 +157,9 @@ export function legacyLinkedPullRequestOf( |
| 157 | 157 | identity: RepositoryIdentity | null | undefined, |
| 158 | 158 | ): ThreadLinkedPullRequest | null { |
| 159 | 159 | if (!identity) return null; |
| 160 | // A local-path remote has no host segment and no provider, so there is no host to match. | |
| 160 | 161 | const host = pullRequestHostOf(identity, identity.provider as SourceControlProviderKind); |
| 162 | if (typeof host !== "string") return null; | |
| 161 | 163 | const repository = sourceControlRepositorySelector(identity); |
| 162 | 164 | if (repository === null) return null; |
| 163 | 165 | const azureKey = |