Skip to content

Commit

Permalink
removing unneeded code
Browse files Browse the repository at this point in the history
  • Loading branch information
tjsearsz committed Dec 1, 2022
1 parent f1c10f9 commit a0f822c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 25 deletions.
27 changes: 4 additions & 23 deletions src/comment.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const commentForMonorepo = (
options,
) => {
const { base } = options;
const html = lcovArrayForMonorepo.map((lcovObj) => {
const rows = lcovArrayForMonorepo.map((lcovObj) => {
const baseLcov = lcovBaseArrayForMonorepo.find(
(el) => el.packageName === lcovObj.packageName,
);
Expand All @@ -64,25 +64,7 @@ const commentForMonorepo = (
pdiff.toFixed(2),
"%",
)
: // "";
th(" N/A ");
/* let report = lcovObj.lcov;
if (baseLcov) {
const onlyInLcov = lcovObj.lcov.filter(comparer(baseLcov.lcov));
const onlyInBefore = baseLcov.lcov.filter(comparer(lcovObj.lcov));
report = onlyInBefore.concat(onlyInLcov);
} */

/* return `${table(
tbody(
tr(
th(lcovObj.packageName),
th(percentage(lcovObj.lcov).toFixed(2), "%"),
pdiffHtml,
),
),
)} \n <br/>`; */
: th(" N/A ");

return tr(
th(lcovObj.packageName),
Expand All @@ -91,12 +73,11 @@ const commentForMonorepo = (
);
});

const html2 = table(tbody(html.join("")));
const html = table(tbody(rows.join("")));

const title = `Coverage after merging into ${b(base)} <p></p>`;

// return fragment(title, html.join(""));
return fragment(title, html2);
return fragment(title, html);
};

/**
Expand Down
2 changes: 0 additions & 2 deletions src/github.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ export const upsertComment = async ({
});
const last = existingComments.pop();

console.log(JSON.stringify(last, null, 5));

await deleteComments({
client,
context,
Expand Down

0 comments on commit a0f822c

Please sign in to comment.