You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import{danger,warn,message}from'danger';importfsfrom'fs';// TODO - improve dangerjsconstmodifiedMD=danger.git.modified_files.join('\n- ');constallFiles=danger.git.modified_files.concat(danger.git.created_files);constincludesEdge=allFiles.map(file=>{constreAdd=/\BAdd|Add\B/g;constreEdge=/\BEdge|Edge\B/g;constcontent=fs.readFileSync(file).toString();constfileHasAMutationAdd=file.match(reAdd);constfileHaveAnEdge=content.match(reEdge);fileHasAMutationAdd&&!fileHaveAnEdge&&warn(`This file ${file} seems to be an add mutation and not include an output Edge`);});message(`Changed Files in this PR: \n - ${modifiedMD}`);
it is throwing the following error stacktrace:
ENOENT: nosuchfileordirectory,open'.github/PULL_REQUEST_TEMPLATE.md'
Error: ENOENT: nosuchfileordirectory,open'.github/PULL_REQUEST_TEMPLATE.md'atObject.fs.openSync(fs.js:660:18)atObject.fs.readFileSync(fs.js:565:33)atObject.apply(/app/node_modules/vm2/lib/contextify.js:288:34)at/app/danger-0.jelc7b1175j.js:18:30atObject.apply(/app/node_modules/vm2/lib/contextify.js:87:36)atArray.map(<anonymous>)
at Object.apply (/app/node_modules/vm2/lib/contextify.js:288:34)
at Object.<anonymous> (/app/danger-0.jelc7b1175j.js:14:29)
at NodeVM.run (/app/node_modules/vm2/lib/main.js:427:27)
at Object.<anonymous> (/app/node_modules/danger/distribution/runner/runners/vm2.js:97:37)
at step (/app/node_modules/danger/distribution/runner/runners/vm2.js:40:23)
at Object.next (/app/node_modules/danger/distribution/runner/runners/vm2.js:21:53)
at /app/node_modules/danger/distribution/runner/runners/vm2.js:15:71
at new Promise (<anonymous>)
at __awaiter (/app/node_modules/danger/distribution/runner/runners/vm2.js:11:12)
at Object.exports.runDangerfileEnvironment (/app/node_modules/danger/distribution/runner/runners/vm2.js:80:121)
it'd be great to show where in dangerfile the error was thrown
The text was updated successfully, but these errors were encountered:
This problem only happens on self hosted instances using vm2, and shouldn't be an issue in peril staging (where evaluation is a 90% closer to normally running a node script) so I'm unlikely to take a stab at this
for this dangerfile.js
it is throwing the following error stacktrace:
it'd be great to show where in dangerfile the error was thrown
The text was updated successfully, but these errors were encountered: