File tree Expand file tree Collapse file tree 6 files changed +20
-15
lines changed Expand file tree Collapse file tree 6 files changed +20
-15
lines changed Original file line number Diff line number Diff line change @@ -17,14 +17,13 @@ jobs:
17
17
issue : 1
18
18
approvers : |
19
19
joshmgross
20
- - run : cat README.md
21
-
20
+ guestbook-path : guestbook.md
22
21
- name : Update guestbook
23
22
run : |
24
23
if [[ `git status --porcelain` ]]; then
25
24
git config --local user.email "[email protected] "
26
25
git config --local user.name "${{ github.actor }}"
27
- git add README .md
26
+ git add guestbook .md
28
27
git commit -m "β Update guestbook"
29
28
git push
30
29
fi
Original file line number Diff line number Diff line change @@ -39,18 +39,14 @@ See [main.yml](.github/workflows/main.yml) for a full workflow file example.
39
39
40
40
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.
41
41
` ` ` md
42
- [@joshmgross](https://github.com/joshmgross) said :
43
- > Hello, this is an informative and useful comment illustrating my thoughts. π§
44
- <sup>[src](https://github.com/joshmgross/guestbook/issues/1#issuecomment-645117859)</sup>
45
- ```
42
+ <!--START:guestbook-->
46
43
47
- ## Example Guestbook
44
+ <!--END:guestbook-->
45
+ ```
48
46
49
- This guestbook is populated by approved : +1 : comments in https://github.com/joshmgross/guestbook/issues/1 .
47
+ # Example Guestbook
50
48
51
- [ @joshmgross ] ( https://github.com/joshmgross ) said:
52
- > Hello, this is an informative and useful comment illustrating my thoughts. π§
53
- <sup> [ src] ( https://github.com/joshmgross/guestbook/issues/1#issuecomment-645117859 ) </sup >
49
+ See [ guestbook.md] ( ./guestbook.md ) for an example guestbook.
54
50
55
51
## Prior Art π¨
56
52
Original file line number Diff line number Diff line change @@ -41,7 +41,8 @@ function createGuestbookList(comments) {
41
41
function generateGuestbook ( path , comments ) {
42
42
const guestbook = getReadme ( path ) ;
43
43
const guestbookList = createGuestbookList ( comments ) ;
44
- const updatedGuestbook = guestbook . replace ( commentSectionRegex , guestbookList ) ;
44
+ const guestbookContent = `${ startComment } \n${ guestbookList } \n${ endComment } ` ;
45
+ const updatedGuestbook = guestbook . replace ( commentSectionRegex , guestbookContent ) ;
45
46
writeReadme ( path , updatedGuestbook ) ;
46
47
}
47
48
exports . generateGuestbook = generateGuestbook ;
Original file line number Diff line number Diff line change @@ -9490,7 +9490,8 @@ function createGuestbookList(comments) {
9490
9490
function generateGuestbook ( path , comments ) {
9491
9491
const guestbook = getReadme ( path ) ;
9492
9492
const guestbookList = createGuestbookList ( comments ) ;
9493
- const updatedGuestbook = guestbook . replace ( commentSectionRegex , guestbookList ) ;
9493
+ const guestbookContent = `${ startComment } \n${ guestbookList } \n${ endComment } ` ;
9494
+ const updatedGuestbook = guestbook . replace ( commentSectionRegex , guestbookContent ) ;
9494
9495
writeReadme ( path , updatedGuestbook ) ;
9495
9496
}
9496
9497
exports . generateGuestbook = generateGuestbook ;
Original file line number Diff line number Diff line change
1
+ # Example Guestbook
2
+
3
+ This guestbook is populated by approved :+1 : comments in https://github.com/joshmgross/guestbook/issues/1 .
4
+
5
+ <!-- START:guestbook-->
6
+
7
+ <!-- END:guestbook-->
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ function createGuestbookList(comments: Comment[]): string {
27
27
export function generateGuestbook ( path : string , comments : Comment [ ] ) : void {
28
28
const guestbook = getReadme ( path ) ;
29
29
const guestbookList = createGuestbookList ( comments ) ;
30
- const updatedGuestbook = guestbook . replace ( commentSectionRegex , guestbookList ) ;
30
+ const guestbookContent = `${ startComment } \n${ guestbookList } \n${ endComment } ` ;
31
+ const updatedGuestbook = guestbook . replace ( commentSectionRegex , guestbookContent ) ;
31
32
writeReadme ( path , updatedGuestbook ) ;
32
33
}
You canβt perform that action at this time.
0 commit comments