(prInfo: PullRequestInfo)
| 14 | import observe from '../helpers/selector-observer.js'; |
| 15 | |
| 16 | function 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 | |
| 30 | async function addInfo(statusMeta: Element): Promise<void> { |
| 31 | const {base} = getBranches(); |
no test coverage detected