Skip to content

Instantly share code, notes, and snippets.

@niksurff
Last active August 29, 2015 14:26
Show Gist options
  • Save niksurff/a1457c9ac0646ee74ccd to your computer and use it in GitHub Desktop.
Save niksurff/a1457c9ac0646ee74ccd to your computer and use it in GitHub Desktop.
Github mention stargazers with node and curl
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