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

Enterprise Github Account #217

Open
Meseery2 opened this issue Mar 27, 2019 · 8 comments
Open

Enterprise Github Account #217

Meseery2 opened this issue Mar 27, 2019 · 8 comments

Comments

@Meseery2
Copy link

I am trying to run danger on a repo hosted on Github Enterprise account, i got the following error description:

i've exported the following ahead:
export DANGER_GITHUB_API_TOKEN='TOKEN'
export DANGER_GITHUB_HOST=GITHUB ENTERPRISE HOST
export DANGER_GITHUB_API_BASE_URL=GITHUB ENTERPRISE API BASE URL

Error:  TypeError: Cannot read property 'repo' of undefined
    at APIMetadataForPR (/snapshot/danger-js/distribution/platforms/GitHub.js:64:27)
    at Object.<anonymous> (/snapshot/danger-js/distribution/platforms/GitHub.js:106:34)
    at step (/snapshot/danger-js/distribution/platforms/GitHub.js:43:23)
    at Object.f [as next] (/snapshot/danger-js/distribution/platforms/GitHub.js:24:53)
    at fulfilled (/snapshot/danger-js/distribution/platforms/GitHub.js:15:58)
    at process._tickCallback (internal/process/next_tick.js:68:7)
@f-meloni
Copy link
Member

This looks a danger-js issue, but it looks to me that you have too many exported variables :)
You should set

DANGER_GITHUB_API_BASE_URL or GITHUB_URL to the host that the GitHub Enterprise API is reachable on.

https://danger.systems/js/guides/getting_started.html#enterprise-github

I would set just the GITHUB_URL.
Even if I'm not 100% sure that it will solve the issue

@orta
Copy link
Member

orta commented Mar 27, 2019

It feels more likely that Danger can't figure out your repo from the CI env vars, is it possible it needs some extra work from the guides?

@Meseery2
Copy link
Author

@f-meloni actually i exported the two env params mentioned here:
https://danger.systems/swift/guides/getting_started.html#enterprise-github

@orta I've already exported the required params before running Danger-Swift on my private project, yet i get the aforementioned error!

@f-meloni
Copy link
Member

@Meseery2 mmm there is something strange... the two docs are saying two different things, but they both use danger-js to make the request :/

@Meseery2
Copy link
Author

@f-meloni Actually i am a little bit confused of the error as i see danger-js while i was running danger-swift on my PR !

@orta
Copy link
Member

orta commented Mar 29, 2019

There are details about how this works here: https://danger.systems/swift/tutorials/architecture.html

@Meseery2
Copy link
Author

Meseery2 commented Apr 1, 2019

@orta so i am trying to make a POC to integrate Danger system in enterprise Github hosted repo, docs is not clearing this out so far .. so any suggestions about the current issue ?

@orta
Copy link
Member

orta commented Apr 2, 2019

I know that at some point Danger JS worked in GitHub enterprise, I don't have an enterprise account so I can't really test it myself. There were danger/danger-js#797 and danger/danger-js#803 which imply people are using it, I'd recommend trying to run it with DEBUG=* in your ENV vars and see if there's something useful in the logs

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

3 participants