(sha: string)
| 153 | } |
| 154 | |
| 155 | export 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 | } |
no test coverage detected