Skip to content

Commit 705769e

Browse files
committed
Better markdown list
1 parent 8aa6661 commit 705769e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ ${ourSignature}`
110110
* @param {string[]} files
111111
*/
112112
function pathListToMarkdown(files) {
113-
return files.map(i => `* [\`${i}\`](https://github.com/${context.repo.owner}/${context.repo.repo}/tree/HEAD${i})`).join("\n");
113+
return files.map(i => `* [\`${i}\`](https://github.com/${context.repo.owner}/${context.repo.repo}/tree/HEAD${encodeURIComponent(i)})`).join("\n");
114114
}
115115

116116
function getPayloadBody() {
@@ -142,7 +142,7 @@ class Actor {
142142
if (filesWhichArentOwned.length !== 0) {
143143
console.log(`@${sender} does not have access to \n - ${filesWhichArentOwned.join("\n - ")}\n`)
144144
listFilesWithOwners(changedFiles, cwd)
145-
await octokit.issues.createComment({ ...thisRepo, issue_number: issue.number, body: `Sorry @${sender}, you don't have access to these files: ${pathListToMarkdown(filesWhichArentOwned)}.` })
145+
await octokit.issues.createComment({ ...thisRepo, issue_number: issue.number, body: `Sorry @${sender}, you don't have access to these files:\n\n${pathListToMarkdown(filesWhichArentOwned)}.` })
146146
return
147147
}
148148

0 commit comments

Comments
 (0)