Last active
August 29, 2015 14:26
-
-
Save niksurff/a1457c9ac0646ee74ccd to your computer and use it in GitHub Desktop.
Github mention stargazers with node and curl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var curl = require('node-curl'); | |
var mentions = ''; | |
var user = 'USERNAME'; | |
var repo = 'REPO' | |
curl('https://api.github.com/repos/'+user+'/'+repo+'/stargazers', function(err) { | |
if (err) throw Error(err); | |
var gazers = JSON.parse(this.body) | |
.map(function(g) { | |
return g.login; | |
}); | |
mentions = '@' + gazers.join(', @'); | |
// console.log(mentions); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment