Skip to content

Commit

Permalink
Update index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Bonfire authored Aug 27, 2022
1 parent f125ae7 commit ebbdecb
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Toolkit.run(
// Add one since the content needs to be inserted just after the initial comment
startIdx++;
content.forEach((line, idx) =>
readmeContent.splice(startIdx + idx, 0, `* ${line}`)
readmeContent.splice(startIdx + idx, 0, `${line}`)
);

// Append <!--RECENT_ACTIVITY:end--> comment
Expand All @@ -94,15 +94,7 @@ Toolkit.run(
}
tools.exit.success("Wrote to README");
}

// const oldContent = readmeContent.slice(startIdx + 1, endIdx).join("\n");
// const newContent = content
// .map((line, idx) => `${idx + 1}. ${line}`)
// .join("\n");

// // if (oldContent.trim() === newContent.trim())
// // tools.exit.success("No changes detected.");


startIdx++;

// Recent GitHub Activity content between the comments
Expand All @@ -116,7 +108,7 @@ Toolkit.run(
if (!line) {
return true;
}
readmeContent.splice(startIdx + idx, 0, `* ${line}`);
readmeContent.splice(startIdx + idx, 0, `${line}`);
});
readmeContent = appendDate(readmeContent);
tools.log.success("Updated README with the recent activity");
Expand Down

0 comments on commit ebbdecb

Please sign in to comment.