(signal: AbortSignal)
| 34 | ]; |
| 35 | |
| 36 | async function init(signal: AbortSignal): Promise<void> { |
| 37 | abortableClassName(document.body, signal, 'rgh-suggest-commit-title-limit'); |
| 38 | |
| 39 | onCommitTitleUpdate(validateCommitTitle, signal); |
| 40 | |
| 41 | delegate( |
| 42 | [ |
| 43 | ...currentPrTitleSelectors, |
| 44 | 'input#pull_request_title', |
| 45 | // Old `isCompare` |
| 46 | // TODO [2026-09-01]: Remove |
| 47 | 'input#issue_title', // Old `isPR` view - TODO: Remove after legacy PR files view is removed |
| 48 | ], |
| 49 | 'input', |
| 50 | async ({delegateTarget}) => validatePrTitle(delegateTarget as HTMLInputElement), |
| 51 | {signal, passive: true}, |
| 52 | ); |
| 53 | // `isPR` - input is added to the DOM when user enters editing mode and removed when they exit it |
| 54 | // `isCompare` - input is re-rendered when previously entered title is restored |
| 55 | observe(currentPrTitleSelectors, validatePrTitle, {signal}); |
| 56 | |
| 57 | await waitForPrMerge(signal); |
| 58 | features.unload(import.meta.url); |
| 59 | } |
| 60 | |
| 61 | void features.add(import.meta.url, { |
| 62 | include: [ |
nothing calls this directly
no test coverage detected