diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 325332e..d244ddb 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -17,14 +17,13 @@ jobs:
issue: 1
approvers: |
joshmgross
- - run: cat README.md
-
+ guestbook-path: guestbook.md
- name: Update guestbook
run: |
if [[ `git status --porcelain` ]]; then
git config --local user.email "actions@github.com"
git config --local user.name "${{ github.actor }}"
- git add README.md
+ git add guestbook.md
git commit -m "✏ Update guestbook"
git push
fi
diff --git a/README.md b/README.md
index 90062f2..547ece7 100644
--- a/README.md
+++ b/README.md
@@ -39,18 +39,14 @@ See [main.yml](.github/workflows/main.yml) for a full workflow file example.
In your guestbook markdown file, add comments to denote the start and end of the guestbook. Everything within these comments will be replaced by approved comments from the issue specified.
```md
-[@joshmgross](https://github.com/joshmgross) said:
-> Hello, this is an informative and useful comment illustrating my thoughts. 🧀
-[src](https://github.com/joshmgross/guestbook/issues/1#issuecomment-645117859)
-```
+
-## Example Guestbook
+
+```
-This guestbook is populated by approved :+1: comments in https://github.com/joshmgross/guestbook/issues/1.
+# Example Guestbook
-[@joshmgross](https://github.com/joshmgross) said:
-> Hello, this is an informative and useful comment illustrating my thoughts. 🧀
-[src](https://github.com/joshmgross/guestbook/issues/1#issuecomment-645117859)
+See [guestbook.md](./guestbook.md) for an example guestbook.
## Prior Art 🎨
diff --git a/dist/book.js b/dist/book.js
index 2c6c059..724d254 100644
--- a/dist/book.js
+++ b/dist/book.js
@@ -41,7 +41,8 @@ function createGuestbookList(comments) {
function generateGuestbook(path, comments) {
const guestbook = getReadme(path);
const guestbookList = createGuestbookList(comments);
- const updatedGuestbook = guestbook.replace(commentSectionRegex, guestbookList);
+ const guestbookContent = `${startComment}\n${guestbookList}\n${endComment}`;
+ const updatedGuestbook = guestbook.replace(commentSectionRegex, guestbookContent);
writeReadme(path, updatedGuestbook);
}
exports.generateGuestbook = generateGuestbook;
diff --git a/dist/index.js b/dist/index.js
index 7e2da38..17418d1 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -9490,7 +9490,8 @@ function createGuestbookList(comments) {
function generateGuestbook(path, comments) {
const guestbook = getReadme(path);
const guestbookList = createGuestbookList(comments);
- const updatedGuestbook = guestbook.replace(commentSectionRegex, guestbookList);
+ const guestbookContent = `${startComment}\n${guestbookList}\n${endComment}`;
+ const updatedGuestbook = guestbook.replace(commentSectionRegex, guestbookContent);
writeReadme(path, updatedGuestbook);
}
exports.generateGuestbook = generateGuestbook;
diff --git a/guestbook.md b/guestbook.md
new file mode 100644
index 0000000..425d553
--- /dev/null
+++ b/guestbook.md
@@ -0,0 +1,7 @@
+# Example Guestbook
+
+This guestbook is populated by approved :+1: comments in https://github.com/joshmgross/guestbook/issues/1.
+
+
+
+
\ No newline at end of file
diff --git a/src/book.ts b/src/book.ts
index b5f5094..7feff4b 100644
--- a/src/book.ts
+++ b/src/book.ts
@@ -27,6 +27,7 @@ function createGuestbookList(comments: Comment[]): string {
export function generateGuestbook(path: string, comments: Comment[]): void {
const guestbook = getReadme(path);
const guestbookList = createGuestbookList(comments);
- const updatedGuestbook = guestbook.replace(commentSectionRegex, guestbookList);
+ const guestbookContent = `${startComment}\n${guestbookList}\n${endComment}`;
+ const updatedGuestbook = guestbook.replace(commentSectionRegex, guestbookContent);
writeReadme(path, updatedGuestbook);
}