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

Function addInfo

source/features/pr-base-commit.tsx:30–42  ·  view source on GitHub ↗
(statusMeta: Element)

Source from the content-addressed store, hash-verified

28}
29
30async function addInfo(statusMeta: Element): Promise<void> {
31 const {base} = getBranches();
32 const prInfo = await getPrInfo(base.relative);
33 if (!prInfo.needsUpdate) {
34 return;
35 }
36
37 const previousMessage = statusMeta.firstChild!; // Extract now because it won't be the first child anymore
38 statusMeta.prepend(getBaseCommitNotice(prInfo));
39 if (isTextNodeContaining(previousMessage, 'Merging can be performed automatically.')) {
40 previousMessage.remove();
41 }
42}
43
44async function init(signal: AbortSignal): Promise<false | void> {
45 observe(

Callers

nothing calls this directly

Calls 6

getBranchesFunction · 0.85
getPrInfoFunction · 0.85
getBaseCommitNoticeFunction · 0.85
isTextNodeContainingFunction · 0.85
prependMethod · 0.80
removeMethod · 0.80

Tested by

no test coverage detected