We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f5b1987 commit 6d23605Copy full SHA for 6d23605
main.js
@@ -3,6 +3,7 @@ const core = require("@actions/core")
3
const glob = require("@actions/glob")
4
const fs = require("fs")
5
const showdown = require("showdown")
6
+const path = require("path")
7
8
function getBody(bodyOrFile, convertMarkdown) {
9
let body = bodyOrFile
@@ -33,7 +34,7 @@ function getFrom(from, username) {
33
34
async function getAttachments(attachments) {
35
const globber = await glob.create(attachments.split(',').join('\n'))
36
const files = await globber.glob()
- return files.map(f => ({ path: f, cid: f.replace(/^.*[\\\/]/, '')}))
37
+ return files.map(f => ({ filename: path.basename(f), path: f, cid: f.replace(/^.*[\\\/]/, '')}))
38
}
39
40
async function main() {
0 commit comments