Skip to content

Commit

Permalink
(FatalBadgers#1) For Circle Ci, use environment variables for Github …
Browse files Browse the repository at this point in the history
…id and secret.
  • Loading branch information
scottrice10 committed Feb 4, 2015
1 parent 1551d20 commit 6a1897b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
1 change: 0 additions & 1 deletion client/app/skills/skills.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@


<div ng-controller="SkillsCtrl">
<div>
<h1>{{ getCurrentUser().name }}'s Skill Details:</h1>
</div>
11 changes: 9 additions & 2 deletions server/api/user/user.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,16 @@
var User = require('./user.model');
var passport = require('passport');
var config = require('../../config/environment');
var githubKeys = require('../../config/local.env.js');
var jwt = require('jsonwebtoken');
var request = require('request');
var Promise = require('bluebird');
var githubKeys;

try {
githubKeys = require('../../config/local.env.js');
} catch(e) {
//do nothing
}

var validationError = function(res, err) {
return res.json(422, err);
Expand Down Expand Up @@ -92,7 +98,8 @@ exports.changePassword = function(req, res, next) {
var getReposPromise = function(user, username) {
return new Promise(function(resolve, reject) {
var repoOptions = {
url: user.repos_url + "?client_id=" + githubKeys.GITHUB_ID + "&client_secret=" + githubKeys.GITHUB_SECRET + "&page=1&per_page=3",
url: user.repos_url + "?client_id=" + (process.env.GITHUB_ID || githubKeys.GITHUB_ID)
+ "&client_secret=" + (process.env.GITHUB_SECRET || githubKeys.GITHUB_SECRET) + "&page=1&per_page=3",
headers: {
'User-Agent': username
}
Expand Down

0 comments on commit 6a1897b

Please sign in to comment.