Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
node.js script to create a github milestone
#!/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
You can’t perform that action at this time.