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

Function getBaseCommitNotice

source/features/pr-base-commit.tsx:16–28  ·  view source on GitHub ↗
(prInfo: PullRequestInfo)

Source from the content-addressed store, hash-verified

14import observe from '../helpers/selector-observer.js';
15
16function getBaseCommitNotice(prInfo: PullRequestInfo): JSX.Element {
17 const {base} = getBranches();
18 const commit = linkifyCommit(prInfo.baseRefOid);
19 const count = pluralize(prInfo.behindBy, '$$ commit');
20 const countLink = (
21 <a href={buildRepoUrl('compare', `${prInfo.baseRefOid.slice(0, 8)}...${base.branch}`)}>
22 {count}
23 </a>
24 );
25 return (
26 <div>It’s {countLink} behind (base commit: {commit})</div>
27 );
28}
29
30async function addInfo(statusMeta: Element): Promise<void> {
31 const {base} = getBranches();

Callers 1

addInfoFunction · 0.85

Calls 4

getBranchesFunction · 0.85
linkifyCommitFunction · 0.85
pluralizeFunction · 0.85
buildRepoUrlFunction · 0.85

Tested by

no test coverage detected