Open bdotdub opened 7 years ago
Using the following dangerfile.js (ignore hard coded values ☺️):
dangerfile.js
"use strict"; schedule(async function() { const fileContents = await danger .git .created_files .map(p => danger.github.utils.fileContents(p, "danger/danger-js", "relative_files")) console.log(fileContents); })
And running the command:
$ yarn danger pr https://github.com/danger/danger-js/pull/359
I'm seeing the following error:
TypeError: this.getFileContents is not a function
Been trying to debug but can't quite find the why this would be failing: https://github.com/danger/danger-js/blob/b6348da0eab7935ccbc2c68082ed558fa052c4dc/source/platforms/github/GitHubAPI.ts#L72-L74
I hope it's not my local env (installed it via yarn) and should be easily reproducible with the above.
Ergh, it's probably JavaScript and it's unreliable this operator.
this
Using the following
dangerfile.js
(ignore hard coded values ☺️):And running the command:
I'm seeing the following error:
Been trying to debug but can't quite find the why this would be failing: https://github.com/danger/danger-js/blob/b6348da0eab7935ccbc2c68082ed558fa052c4dc/source/platforms/github/GitHubAPI.ts#L72-L74
I hope it's not my local env (installed it via yarn) and should be easily reproducible with the above.