GithubUtils: fileContents throwing error
- Dominant language
- TypeScript
- Stars
- 5.5k
- Forks
- 381
- Avg merge
- 2h 8m
- Merged PRs (30d)
- 6
Description
Using the following `dangerfile.js` (ignore hard coded values ☺️):
```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:
```sh
$ 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.
Contributor guide
Assessment
This issue has not been assessed yet.