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

Setup your own instance of CLA assistant Docs #334

Closed
kneal opened this issue Jun 4, 2018 · 2 comments
Closed

Setup your own instance of CLA assistant Docs #334

kneal opened this issue Jun 4, 2018 · 2 comments

Comments

@kneal
Copy link

kneal commented Jun 4, 2018

I am having trouble getting my instance up and running. I am trying to get a test instance going for my company internally on a GHE instance. I was able to find the overrides in src/config.js to get the API calls working to the GHE instance but I am having problems when the application is hitting the /count/stars endpoint. The application crashes with a 404 with the response.

Is there any additional configuration needed to get cla-assistant working with a GHE instance? Also, what permissions need to exist on the cla-assistant GitHub app. The only documentation I see for perms is on the user and thats repo-only

✓ bootstrapped, app listening on localhost:5000
{"name":"localhost","hostname":"565b43154af8","pid":18,"level":30,"msg":"✓ bootstrapped !!! App listening on localhost:undefined","time":"2018-06-04T16:55:58.927Z","src":{"file":"/cla-assistant/src/server/app.js","line":195},"v":0}
{"name":"localhost","hostname":"565b43154af8","pid":18,"level":30,"err":{"code":404,"status":"Not Found","message":"{\"message\":\"Not Found\",\"documentation_url\":\"https://developer.github.com/enterprise/2.13/v3/repos/#get\"}"},"msg":"{\"message\":\"Not Found\",\"documentation_url\":\"https://developer.github.com/enterprise/2.13/v3/repos/#get\"}","time":"2018-06-04T16:56:07.443Z","src":{"file":"/cla-assistant/src/server/controller/counts.js","line":146},"v":0}
/cla-assistant/src/server/controller/counts.js:149
            count: resp.stargazers_count
                       ^

TypeError: Cannot read property 'stargazers_count' of null
    at /cla-assistant/src/server/controller/counts.js:149:24
    at collectData (/cla-assistant/src/server/services/github.js:112:21)
    at /cla-assistant/src/server/services/github.js:34:13
    at __dirname.sendError (/cla-assistant/node_modules/github/lib/index.js:801:7)
    at /cla-assistant/node_modules/github/lib/index.js:809:21
    at callCallback (/cla-assistant/node_modules/github/lib/index.js:685:9)
    at IncomingMessage.<anonymous> (/cla-assistant/node_modules/github/lib/index.js:749:13)
    at emitNone (events.js:91:20)
    at IncomingMessage.emit (events.js:185:7)
    at endReadableNT (_stream_readable.js:974:12)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickDomainCallback (internal/process/next_tick.js:122:9)
@KharitonOff
Copy link
Contributor

@nac2791 sorry for long delay.
This is definitely a buggy implementation of the start screen! We will fix it in the next release.
If you wisch you can just comment the activity block in the login.html

<div class="row lp-section" style="height: 400px;">
<div class="center-block">
<h4 class="lp-premium">ACTIVITY</h4>
</div>
<div class="col-md-4 col-md-offset-4" text-slider active="active" time='5000' style="text-align: center; margin-top: 3em">
<p class="lp-textblock" ng-class="{true:'lp-textblock-animate', false:''}[active === 0]">
<i class="octicon octicon-repo"></i> {{numberRepos}} registered repositories</p>
<p class="lp-textblock" ng-class="{true:'lp-textblock-animate', false:''}[active === 1]">
<img src="/assets/images/CLA_logo.svg" class="lp-textblock-icon" /> {{numberClas}} signed CLAs</p>
<p class="lp-textblock" ng-class="{true:'lp-textblock-animate', false:''}[active === 2]">
<i class="octicon octicon-star"></i> {{numberStars}} GitHub stars</p>
</div>
</div>

and the api call in the controller/home.js

$scope.count = function () {
$RAW.get('/count/clas').then(function (res) {
$scope.numberClas = res.data.count;
});
$RAW.get('/count/repos').then(function (res) {
$scope.numberRepos = res.data.count;
});
$RAW.get('/count/stars').then(function (res) {
$scope.numberStars = res.data.count;
});
};

@roshvin
Copy link

roshvin commented Jun 30, 2022

hi @kneal are you still running cla in your GHE instance . we are trying to do but during call back its going to api.github.com

"cla-9dd65f9c6-cb2hf","pid":18,"level":40,"msg":"Error: HttpError: request to https://api.github.com/user/repos?affiliation=owner%2Corganization_member&per_page=100 failed, reason: getaddrinfo ENOTFOUND api.github.com\n    at Strategy._verify (/cla-assistant/src/server/src/passports/github.js:111:25)","time":"2022-06-30T14:57:16.864Z","src":{"file":"/cla-assistant/src/server/src/passports/github.js","line":111},"v":0,"req_id":"e63901f0-f884-11ec-8b45-9b13af792116"}

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