-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathindex.js
More file actions
executable file
·35 lines (28 loc) · 803 Bytes
/
index.js
File metadata and controls
executable file
·35 lines (28 loc) · 803 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
'use strict';
require('./bootstrap');
var fs = require('fs');
var path = require('path');
var cli = require('./cli');
var args = cli.parse(process.argv);
var config = require(path.resolve(process.cwd(), args.config));
var template = fs.readFileSync(args.template, 'utf8');
var jira = require('./jira')(config.jira);
var github = require('./github')({token: args.token}, args.owner, args.repo);
var range = github.helper.range(args.since, args.until);
var pullRequests = range
.getPullRequests
.flatMap(github.helper.jira(jira).fetch);
var changelog = require('./changelog')(github.api);
changelog.build(
{
json: args.json,
gist: args.gist,
release: args.release
},
config,
template,
range.sinceDateStream,
range.untilDateStream,
pullRequests,
args.data
);