github-release-notes
Advanced tools
Comparing version 0.10.1 to 0.11.0
@@ -84,3 +84,3 @@ 'use strict'; | ||
description: 'Get the commits or issues closed between the specified tag and the one before.', | ||
code: 'gren release --tags=all' | ||
code: 'gren release --tags=all --limit=200' | ||
}, { | ||
@@ -87,0 +87,0 @@ name: 'Work with milestones', |
@@ -58,2 +58,8 @@ 'use strict'; | ||
}, { | ||
short: '-l', | ||
name: 'limit', | ||
valueType: '<number>', | ||
description: 'The limit of tags/releases to get. [30]', | ||
defaultValue: '30' | ||
}, { | ||
short: '-D', | ||
@@ -60,0 +66,0 @@ name: 'data-source', |
@@ -57,2 +57,3 @@ 'use strict'; | ||
groupBy: false, | ||
limit: 30, | ||
milestoneMatch: 'Release {{tag_name}}' | ||
@@ -221,7 +222,7 @@ }; | ||
return this.repo.updateRelease(releaseId, releaseOptions).then(function (response) { | ||
return this.repo.updateRelease(releaseId, releaseOptions).then(function (_ref) { | ||
var release = _ref.data; | ||
loaded(); | ||
var release = response.data; | ||
console.log(_chalk2.default.green('\n' + release.name + ' has been successfully updated!')); | ||
@@ -258,5 +259,6 @@ console.log(_chalk2.default.blue('See the results here: ' + release.html_url)); | ||
return this.repo.createRelease(releaseOptions).then(function (response) { | ||
return this.repo.createRelease(releaseOptions).then(function (_ref2) { | ||
var release = _ref2.data; | ||
loaded(); | ||
var release = response.data; | ||
@@ -334,4 +336,4 @@ console.log(_chalk2.default.green('\n' + release.name + ' has been successfully created!')); | ||
return allTags.filter(function (_ref, index) { | ||
var name = _ref.name; | ||
return allTags.filter(function (_ref3, index) { | ||
var name = _ref3.name; | ||
@@ -348,2 +350,17 @@ var isSelectedTag = selectedTags.includes(name); | ||
/** | ||
* Temporary function for this.repo.listReleases to accept options | ||
* | ||
* @see https://github.com/github-tools/github/pull/485 | ||
* @param {Object} options | ||
* | ||
* @return {Promise} | ||
*/ | ||
}, { | ||
key: '_listTags', | ||
value: function _listTags(options) { | ||
return this.repo._request('GET', '/repos/' + this.repo.__fullname + '/tags', options); | ||
} | ||
/** | ||
* Get all the tags of the repo | ||
@@ -364,7 +381,9 @@ * | ||
return this.repo.listTags().then(function (response) { | ||
return this._listTags({ | ||
per_page: this.options.limit | ||
}).then(function (_ref4) { | ||
var tags = _ref4.data; | ||
loaded(); | ||
var tags = response.data; | ||
if (!tags.length) { | ||
@@ -422,2 +441,17 @@ throw _chalk2.default.red('Looks like you have no tags! Tag a commit first and then run gren again'); | ||
/** | ||
* Temporary function for this.repo.listReleases to accept options | ||
* | ||
* @see https://github.com/github-tools/github/pull/485 | ||
* @param {Object} options | ||
* | ||
* @return {Promise} | ||
*/ | ||
}, { | ||
key: '_listReleases', | ||
value: function _listReleases(options) { | ||
return this.repo._request('GET', '/repos/' + this.repo.__fullname + '/releases', options); | ||
} | ||
/** | ||
* Get all releases | ||
@@ -436,7 +470,9 @@ * | ||
return this.repo.listReleases().then(function (response) { | ||
return this._listReleases({ | ||
per_page: this.options.limit | ||
}).then(function (_ref5) { | ||
var releases = _ref5.data; | ||
loaded(); | ||
var releases = response.data; | ||
process.stdout.write(releases.length + ' releases found\n'); | ||
@@ -488,8 +524,8 @@ | ||
key: '_templateCommits', | ||
value: function _templateCommits(_ref2) { | ||
var sha = _ref2.sha, | ||
_ref2$commit = _ref2.commit, | ||
name = _ref2$commit.author.name, | ||
message = _ref2$commit.message, | ||
url = _ref2$commit.url; | ||
value: function _templateCommits(_ref6) { | ||
var sha = _ref6.sha, | ||
_ref6$commit = _ref6.commit, | ||
name = _ref6$commit.author.name, | ||
message = _ref6$commit.message, | ||
url = _ref6$commit.url; | ||
@@ -601,6 +637,6 @@ return (0, _template.generate)({ | ||
return Object.entries(groups).map(function (_ref3) { | ||
var _ref4 = _slicedToArray(_ref3, 2), | ||
key = _ref4[0], | ||
value = _ref4[1]; | ||
return Object.entries(groups).map(function (_ref7) { | ||
var _ref8 = _slicedToArray(_ref7, 2), | ||
key = _ref8[0], | ||
value = _ref8[1]; | ||
@@ -629,4 +665,4 @@ var heading = (0, _template.generate)({ | ||
key: '_filterCommit', | ||
value: function _filterCommit(_ref5) { | ||
var message = _ref5.commit.message; | ||
value: function _filterCommit(_ref9) { | ||
var message = _ref9.commit.message; | ||
@@ -701,4 +737,4 @@ var messageType = this.options.includeMessages; | ||
return this.repo.listCommits(options).then(function (_ref6) { | ||
var data = _ref6.data; | ||
return this.repo.listCommits(options).then(function (_ref10) { | ||
var data = _ref10.data; | ||
return data; | ||
@@ -764,4 +800,4 @@ }); | ||
return ignoreIssuesWith.some(function (label) { | ||
return labels.map(function (_ref7) { | ||
var name = _ref7.name; | ||
return labels.map(function (_ref11) { | ||
var name = _ref11.name; | ||
return name; | ||
@@ -791,4 +827,4 @@ }).includes(label); | ||
since: releaseRanges[releaseRanges.length - 1][1].date | ||
}).then(function (_ref8) { | ||
var data = _ref8.data; | ||
}).then(function (_ref12) { | ||
var data = _ref12.data; | ||
@@ -795,0 +831,0 @@ loaded(); |
{ | ||
"name": "github-release-notes", | ||
"version": "0.10.1", | ||
"version": "0.11.0", | ||
"description": "Create a release from a tag and uses issues or commits to creating the release notes. It also can generate a CHANGELOG.md file based on the release notes (or generate a brand new).", | ||
@@ -5,0 +5,0 @@ "main": "./github-release-notes.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
238103
21
1827