Last active
August 29, 2015 14:05
-
-
Save focusaurus/c0f447cf41d915f217f4 to your computer and use it in GitHub Desktop.
node.js script to create a github milestone
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
#!/usr/bin/env node | |
var request = require('superagent'); | |
var config = require('config'); | |
var GITHUB_API_URL = 'https://api.github.com'; | |
var MILESTONES = '/repos/owner/project/milestones'; | |
request.post(GITHUB_API_URL + MILESTONES) | |
.set('Authorization', 'token ' + config.githubToken) | |
.set('User-Agent', 'focusaurus-create-github-milestone') | |
.send({title: process.argv[2]}).end(function (error, res) { | |
console.log(error, res.text); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment