Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

danger.github.utils.fileContents fails #780

Open
ChristianHj opened this issue Dec 6, 2018 · 1 comment
Open

danger.github.utils.fileContents fails #780

ChristianHj opened this issue Dec 6, 2018 · 1 comment

Comments

@ChristianHj
Copy link

  • danger.github.utils.fileContents worked fine in version 3.x.
  • Upgraded to version 6.1.8 and got the error below.
  • Had to downgrade to 4.4.10 where it seems to work again, but with a octokit deprecation warning.

Has there been any breaking changes to this function between version 4 and 6? 🙂

The following line fails:
let fileContentsPromise = danger.github.utils.fileContents('somefile.txt');

With the following error:

Cannot read property 'filename' of undefined
TypeError: Cannot read property 'filename' of undefined
    at exports.shouldUseGitHubOverride (C:\GIT\*******\node_modules\danger\distribution\platforms\github\customGitHubRequir

e.js:120:16)
    at Function._module2.default._load (C:\GIT\*******\node_modules\override-require\dist\overrideRequire.js:38:9)
    at Object.<anonymous> (dangerfile.ts:5:29)
    at Module._compile (module.js:652:30)
    at Object.requireFromString [as default] (C:\GIT\*******\node_modules\require-from-string\index.js:28:4)
    at Object.<anonymous> (C:\GIT\*******\node_modules\danger\distribution\runner\runners\inline.js:144:63)
`
    at step (C:\GIT\*******\node_modules\danger\distribution\runner\runners\inline.js:32:23)
    at Object.next (C:\GIT\*******\node_modules\danger\distribution\runner\runners\inline.js:13:53)
    at C:\GIT\*******\node_modules\danger\distribution\runner\runners\inline.js:7:71
    at new Promise (<anonymous>)
@ChristianHj ChristianHj changed the title danger.github.utils.fileContents fails on danger.github.utils.fileContents fails Dec 6, 2018
@orta
Copy link
Member

orta commented Dec 6, 2018

I don't think so, no, and I use this a lot in everyday work - maybe the GitHub API shape changed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants