Skip to content

Instantly share code, notes, and snippets.

@itayw
Last active August 12, 2020 17:16
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save itayw/10249629 to your computer and use it in GitHub Desktop.
Save itayw/10249629 to your computer and use it in GitHub Desktop.
Generate HISTORY.md from GitHub Milestones and Tags

v0.4.1

#367 Version bump to 0.4.1
#372 Change Expressjs x-powered-by
#350 Document RabbitMQ installation process [docs]
#368 Realtime query fails to stop when requested by SDK [bug, core, query]
#352 Beacon insert according to docs fail [beacon, bug, expedite]
#347 Demo baseline config should have short TTLs
#345 Issues with Welcome page
#349 Shared realtime queries [core, query]
#360 PM2 kill/stop leads to error
#346 README.md travis badge should point to master.
#365 Wrong coverage shown on README.md
#363 Update AUTHORS.md script
#353 Crash due to STOMP disconnect [bug, core, expedite]
#348 Locks on crunch [core]
#355 Merge SDK docs with joola.io wiki [docs]
#358 Move geoip-lite to optional deps [task]

v0.4.0

#316 Setup a welcome page [core, expedite, feature]
#343 Update README.md for version 0.4 release [docs]
#341 Demote version number from 3.4 -> 0.4
#342 bin fails to execute on global install [bug]
#339 Travis builds failing on RabbitMQ connection
#337 Add RabbitMQ interface on allow for joola.io
#329 Initial joola.io load does not display graphs correctly [bug]
#332 Dispatch.router is causing lock in mongo [core]
#334 Replace internal dispatch with external Q system
#330 Add diff changes when blocking collection change by Beacon [beacon]
#331 Add local copy of ip_codehelper instead of using online [core]
#324 Setup demo configuration
#295 Support for min/max value in typed collections [beacon, core]
#328 Logger does not pick up options [bug, core]
#325 Allow baseconfig to be called from an environment env [core]
#327 Add TTL on store/collection level [core]
#326 Strong typed collections cannot be modified by beacon [beacon]
#302 Replace README and Wiki images to fontawesome based [docs, task]
#322 Add CLI to default package and ensure global bin [core]
#320 Event Loop Blocks (ELB) [core, epic]
#313 Add system dispatch tests [core, tests]
#293 Add system stats to show how many connected users.
#303 Add system function to list all connected clients [core, feature]
#305 Heavy use of beacon crashes joola.io [beacon, blocker, bug, core, expedite]
#308 Bug with realtime query on intervals other than second [bug, core, query]
#296 PM2 fails to start nodes [bug, core]
#291 Force collection specification when query [core]
#289 Local route bug [bug]

/**
Build HISTORY.md from your GitHub Tags and Milestones.
Note: Tag and Milestone name/title MUST MATCH!
**/
var
GitHubApi = require('github'),
async = require('async'),
fs = require('fs'),
_ = require('underscore');
var github = new GitHubApi({
// required
version: '3.0.0',
// optional
timeout: 5000
});
var REPO = 'YOURREPONAME';
var USER = 'YOURGITHUBUSERNAME';
/*
--optional
github.authenticate({
type: 'oauth',
token: 'yourtoken'
});
*/
var MDContent = '';
var calls = [];
github.repos.getTags({user: USER, repo: REPO}, function (err, tags) {
if (err)
throw err;
github.issues.getAllMilestones({user: USER, repo: REPO, state: 'closed'}, function (err, milestones) {
if (err)
throw err;
tags.forEach(function (tag) {
var milestone = _.find(milestones, function (m) {
return m.title === tag.name;
});
if (milestone) {
var call = function (callback) {
github.issues.repoIssues({user: USER, repo: REPO, state: 'closed', milestone: milestone.number}, function (err, issues) {
if (err)
throw err;
if (issues.length == 0)
return callback(null);
MDContent += '\r\n### ' + issues[0].milestone.title + '\r\n\r\n';
issues = _.sortBy(issues, function (issue) {
return issue.closed_at;
});
issues.reverse();
issues.forEach(function (issue) {
var labels = '';
if (issue.html_url.indexOf('/pull/') === -1) {
if (issue.labels.length > 0) {
issue.labels.forEach(function (lbl) {
labels += lbl.name + ', ';
});
}
if (labels) {
labels = labels.substring(0, labels.length - 2);
MDContent += '[#' + issue.number + '](' + issue.html_url + ') ' + issue.title + ' [' + labels + '] \r\n';
}
else
MDContent += '[#' + issue.number + '](' + issue.html_url + ') ' + issue.title + ' \r\n';
}
});
return callback(null);
});
};
calls.push(call);
}
});
async.series(calls, function (err) {
console.log(MDContent);
fs.writeFileSync('./HISTORY.md', MDContent);
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment