damus-github-export

Damus issue data exported from github
git clone git://jb55.com/damus-github-export
Log | Files | Refs | README | LICENSE

commit 962a39af2c837ea50c1b2c5f0760d5aa30d68f77
parent 3d6f3df4f8d42e1b686ed65f7cffa28bf3e84d50
Author: William Casarin <jb55@jb55.com>
Date:   Sun, 17 Mar 2024 09:16:27 +0000

better default filenames

Signed-off-by: William Casarin <jb55@jb55.com>

Diffstat:
Mexport.js | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/export.js b/export.js @@ -49,7 +49,7 @@ const getFullCommentData = async (octokit, values, data, verbose = false) => { return fullComments; } -const writeFile = async (data, fileName = false) => { +const writeFile = async (data, fileName = "export.json") => { return new Promise((resolve, reject) => { fs.writeFile(fileName, JSON.stringify(data), "utf8", function (err) { if (err) { @@ -183,7 +183,7 @@ const exportIssues = (octokit, values) => { } // write the data out to file. - writeFile(csvData, values.exportFileName).then( + writeFile(csvData, values.exportFileName || `${values.repo}.json`).then( (fileName) => { console.log(`Success! check ${fileName}`); console.log(