(referenceElement: HTMLElement)
| 53 | } |
| 54 | |
| 55 | function parseReference(referenceElement: HTMLElement): PrReference { |
| 56 | const {title, textContent, nextElementSibling} = referenceElement; |
| 57 | |
| 58 | // In the old React version, we have a `title` attribute but it's used to mark deleted repos instead |
| 59 | // eslint-disable-next-line unicorn/prefer-minimal-ternary -- It will be removed soon ish |
| 60 | return title && title !== 'This repository has been deleted' |
| 61 | // TODO [2026-06-01]: Remove |
| 62 | ? parseReferenceRaw(title, textContent.trim()) |
| 63 | : parseReferenceRaw(nextElementSibling!.textContent.trim(), textContent.trim()); |
| 64 | } |
| 65 | |
| 66 | export function getBranches(): {base: PrReference; head: PrReference} { |
| 67 | return { |
no test coverage detected