MCPcopy
hub / github.com/refined-github/refined-github / linkifyCommit

Function linkifyCommit

source/github-helpers/dom-formatters.tsx:155–169  ·  view source on GitHub ↗
(sha: string)

Source from the content-addressed store, hash-verified

153}
154
155export function linkifyCommit(sha: string): JSX.Element {
156 // Data attributes copied from the commit in https://github.com/refined-github/github-url-detection/releases/tag/v7.1.2
157 return (
158 <code>
159 <a
160 className="Link--secondary"
161 href={buildRepoUrl('commit', sha)}
162 data-hovercard-type="commit"
163 data-hovercard-url={buildRepoUrl('commit', sha, 'hovercard')}
164 >
165 {sha.slice(0, 7)}
166 </a>
167 </code>
168 );
169}

Callers 1

getBaseCommitNoticeFunction · 0.85

Calls 1

buildRepoUrlFunction · 0.85

Tested by

no test coverage detected