diff --git a/.gitignore b/.gitignore index c9833ca59d..76fdbac0f4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,81 @@ +### Node ### +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# TypeScript v1 declaration files +typings/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + # dotenv environment variables file .env -node_modules/ -data/ + +# parcel-bundler cache (https://parceljs.org/) +.cache + +# next.js build output +.next + +# nuxt.js build output +.nuxt + +# vuepress build output +.vuepress/dist + +# Serverless directories +.serverless + +# FuseBox cache +.fusebox/ + +# CUSTOM FILES + +# local-work-logs diff --git a/labelOpenPrs.js b/labelOpenPrs.js index 2346a8545a..12e8f3f50f 100644 --- a/labelOpenPrs.js +++ b/labelOpenPrs.js @@ -1,7 +1,10 @@ require('dotenv').config(); -const { owner, repo, fccBaseUrl, prBaseUrl } = require('./constants'); + +const path = require('path'); const fs = require('fs'); const formatDate = require('date-fns/format'); + +const { owner, repo, fccBaseUrl, prBaseUrl } = require('./constants'); const { saveToFile, openJSONFile } = require('./fileFunctions'); const { octokitConfig, octokitAuth } = require('./octokitConfig'); const octokit = require('@octokit/rest')(octokitConfig); @@ -27,7 +30,7 @@ const prPropsToGet = ['number', 'labels', 'user']; console.log(`# of PRs Retrieved: ${openPRs.length}`); console.log(`PR Range: ${firstPR} - ${lastPR}`); const now = formatDate(new Date(), 'YYYY-MM-DDTHHmmss'); - const fileName = `data/openprs_${firstPR}-${lastPR}_${now}.json`; + const fileName = path.resolve(__dirname, `./data/openprs_${firstPR}-${lastPR}_${now}.json`); saveToFile(fileName, JSON.stringify(openPRs)); console.log(`Data saved in file: ${fileName}`); diff --git a/prProcessingLog.js b/prProcessingLog.js index 493219e7f6..15e10e1cc3 100644 --- a/prProcessingLog.js +++ b/prProcessingLog.js @@ -1,5 +1,6 @@ const path = require('path'); const fs = require('fs'); + const { saveToFile } = require('./fileFunctions'); class PrProcessingLog { diff --git a/work-logs/.gitkeep b/work-logs/.gitkeep new file mode 100644 index 0000000000..e69de29bb2