Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
Jessica Lord committed Sep 16, 2014
1 parent 7959abb commit 3336097
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion problems/githubbin/solution.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
console.log("Username added to Git config!")
console.log("You're on GitHub!")
console.log("Username is same on GitHub and in Git config!")
console.log("Username same on GitHub and\nGit config!")
11 changes: 5 additions & 6 deletions problems/githubbin/verify.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
var exec = require('child_process').exec
var request = require('request')

// var url = "https://api.github.com/users/"

// verify they set up git config
// verify that user exists on GitHub (not case sensitve)
// compare the two to make sure cases match

exec('git config user.username', function(err, stdout, stderr) {
var user = stdout.trim()
Expand All @@ -16,7 +16,7 @@ exec('git config user.username', function(err, stdout, stderr) {
}
})

function checkGitHub(user, callback) {
function checkGitHub(user) {
var options = {
url: "https://api.github.com/users/" + user,
json: true,
Expand All @@ -37,7 +37,6 @@ function checkGitHub(user, callback) {

function checkCapitals(githubUsername, configUsername) {
if (configUsername.match(githubUsername)) {
console.log("Username is same on GitHub and in Git config!")
} else console.log("GitHub username doesn't match\nthe one set in Git config\n"
+ githubUsername +" on GitHub, " + configUsername + " in Git Config" )
console.log("Username same on GitHub and\nGit config!")
} else console.log("GitHub & Git config usernames\ndo not match")
}

0 comments on commit 3336097

Please sign in to comment.