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

Function getFirstCommit

source/features/pr-first-commit-title.tsx:10–19  ·  view source on GitHub ↗
(firstCommitTitle: HTMLElement)

Source from the content-addressed store, hash-verified

8import observe from '../helpers/selector-observer.js';
9
10function getFirstCommit(firstCommitTitle: HTMLElement): {title: string; body: string | undefined} {
11 // Commits might not have a body
12 const body = $optional('.Details-content--hidden pre', firstCommitTitle.parentElement!)
13 ?.textContent
14 .trim() ?? undefined;
15
16 const title = parseRenderedText(firstCommitTitle);
17
18 return {title, body};
19}
20
21function useCommitTitle(firstCommitTitle: HTMLElement): void {
22 const requestedContent = new URL(location.href).searchParams;

Callers 1

useCommitTitleFunction · 0.85

Calls 1

parseRenderedTextFunction · 0.85

Tested by

no test coverage detected