MCPcopy Index your code
hub / github.com/refined-github/refined-github / init

Function init

source/features/suggest-commit-title-limit.tsx:36–59  ·  view source on GitHub ↗
(signal: AbortSignal)

Source from the content-addressed store, hash-verified

34];
35
36async 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
61void features.add(import.meta.url, {
62 include: [

Callers

nothing calls this directly

Calls 5

abortableClassNameFunction · 0.85
onCommitTitleUpdateFunction · 0.85
validatePrTitleFunction · 0.85
observeFunction · 0.85
waitForPrMergeFunction · 0.85

Tested by

no test coverage detected