nodejs / changelog-maker Goto Github PK
View Code? Open in Web Editor NEWA git log to CHANGELOG.md tool
License: MIT License
A git log to CHANGELOG.md tool
License: MIT License
I haven't had much time to debug this properly, so I dunno if the root is something in the repo I'm using (hope not, it's private so I can't share access), or the lib this util is using, but it can be protected against.
Here is my usage (on io.js):
IWhitfieldMBPR:master iwhitfield$ changelog-maker --start-ref=f3f513790f71eaffe23d18efb790b234ef88328c <redacted-org> <redacted-repo>
/Users/iwhitfield/.nvm/versions/io.js/v2.3.1/lib/node_modules/changelog-maker/changelog-maker.js:97
var summary = commit.summary.replace(revertRe, '')
^
TypeError: Cannot read property 'replace' of undefined
at commitToGroup (/Users/iwhitfield/.nvm/versions/io.js/v2.3.1/lib/node_modules/changelog-maker/changelog-maker.js:97:31)
at commitToOutput (/Users/iwhitfield/.nvm/versions/io.js/v2.3.1/lib/node_modules/changelog-maker/changelog-maker.js:162:18)
at Array.map (native)
at Immediate._onImmediate (/Users/iwhitfield/.nvm/versions/io.js/v2.3.1/lib/node_modules/changelog-maker/changelog-maker.js:210:17)
at processImmediate [as _immediateCallback] (timers.js:371:17)
So I dug a little, and put in some logging and it somehow appears that this commit is being passed in:
{ sha: 'eb27d2e12431656b6725ff665c9c2babbc59ab39',
author:
{ name: 'Isaac Whitfield',
email: '[email protected]' },
prUrl: 'eoptimize distinct queries' }
But of course... no summary property. It appears something has gone wrong with the parsing somewhere - the summary was initially Preoptimize distinct queries
, which explains the pr
in the field name, and why the value makes no sense.
Regardless of whether this is a lib issue or not, I think it's pretty safe to add some protection to changelog-maker
. In my case, I edited the blocks in question to:
function commitToGroup (commit) {
if (commit.summary !== undefined) {
var summary = commit.summary.replace(revertRe, '')
, m = summary.match(groupRe)
}
return m && m[1]
}
and
data.summary = commit.summary && commit.summary.replace(revertRe, '').replace(/"$/, '').replace(groupRe, '') || ''
I just want to make sure that there are no adverse effects of this and whether this is deemed something which should be protected against in the first place.
As I said, haven't narrowed down the root cause but I'll keep looking when I get a chance.
Not sure how much work will this be, but currently this doesn't work on Windows.
I'll add more info later.
nodejs/node@2cedff9 for example is not generating appropriate meta data
$ changelog-maker --group --start-ref v5.4.1
/usr/local/lib/node_modules/changelog-maker/changelog-maker.js:44
return name[0] === '@' && name.indexOf('/') > 0 ? name.split('/')[1] : name
^
TypeError: Cannot read property '0' of undefined
at stripScope (/usr/local/lib/node_modules/changelog-maker/changelog-maker.js:44:14)
at Object.<anonymous> (/usr/local/lib/node_modules/changelog-maker/changelog-maker.js:30:30)
at Module._compile (module.js:397:26)
at Object.Module._extensions..js (module.js:404:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Function.Module.runMain (module.js:429:10)
at startup (node.js:139:18)
at node.js:999:3
Just noting a few warnings I got while preparing the v9.9.0 release:
$ NODE_OPTIONS="--trace-warnings" changelog-maker --group --start-ref v9.8.0
(node:10896) [DEP0005] DeprecationWarning: The Buffer() and new Buffer() constructors are not recommended for use due to security and usability concerns. Please use the new Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() construction methods instead.
at showFlaggedDeprecation (buffer.js:139:13)
at new Buffer (buffer.js:160:3)
at BufferList.copy (/home/mzasso/.nvm/versions/node/v9.8.0/lib/node_modules/changelog-maker/node_modules/gitexec/node_modules/bl/bl.js:108:19)
at BufferList.slice (/home/mzasso/.nvm/versions/node/v9.8.0/lib/node_modules/changelog-maker/node_modules/gitexec/node_modules/bl/bl.js:99:15)
at BufferList.end (/home/mzasso/.nvm/versions/node/v9.8.0/lib/node_modules/changelog-maker/node_modules/gitexec/node_modules/bl/bl.js:89:31)
at Socket.onend (_stream_readable.js:602:10)
at Object.onceWrapper (events.js:272:13)
at Socket.emit (events.js:185:15)
at endReadableNT (_stream_readable.js:1101:12)
at process._tickCallback (internal/process/next_tick.js:114:19)
Your GitHub username: targos
Your GitHub password: XXXXXX
(node:10896) TimeoutOverflowWarning: 4294967296000 does not fit into a 32-bit signed integer.
Timer duration was truncated to 2147483647.
at Object.exports.enroll (timers.js:407:13)
at TLSSocket.Socket.setTimeout (net.js:369:12)
at TLSSocket.<anonymous> (_http_client.js:725:14)
at Object.onceWrapper (events.js:272:13)
at TLSSocket.emit (events.js:185:15)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1157:10)
Your GitHub OTP/2FA Code (optional): XXXXXX
(node:10896) TimeoutOverflowWarning: 4294967296000 does not fit into a 32-bit signed integer.
Timer duration was truncated to 2147483647.
at Object.exports.enroll (timers.js:407:13)
at TLSSocket.Socket.setTimeout (net.js:369:12)
at TLSSocket.<anonymous> (_http_client.js:725:14)
at Object.onceWrapper (events.js:272:13)
at TLSSocket.emit (events.js:185:15)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1157:10)
we have a "internal/child_process" commit in core, better support this because we're not going to stop it
;)
I suppose that you are using a real UNIX SO instead of Mac :P
changelog-maker joyent/node
/usr/local/lib/node_modules/changelog-maker/changelog-maker.js:25
configName : `changelog-maker`
^
SyntaxError: Unexpected token ILLEGAL
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:929:3
Maybe add task number parser and add link to it?
git commit -m"fix: #212"
to:
* [[`20f8e7f17a`](https://github.com/user/repo/commit/20f8e7f17a)] -
**fix**: [#212](https://github.com/user/repo/issues/212) (LestaD)
Run on master
in Node core:
$ changelog-maker --start-ref=66cb4bcf0 --end-ref=66cb4bcf0
* [[`66cb4bcf0c`](https://github.com/nodejs/node/commit/66cb4bcf0c)] - Event emitters support symbols as event names. The process object (cjihrig) [#4798](https://github.com/nodejs/node/pull/4798)
$ git log 66cb4bcf0c | head
commit 66cb4bcf0c032adc0f6abf7452150875c8a82243
Author: cjihrig <[email protected]>
Date: Thu Jan 21 13:07:25 2016 -0500
process: support symbol events
Event emitters support symbols as event names. The process object
assumes that the event name is a string, and examines the first
three characters to check for signals. This causes an exception
if the event name is a symbol. This commit ensures that the
i.e. it's not picking up process: support symbol events
as the summary of this commit
I'm getting this error when trying to run changelog-maker
command:
/usr/lib/node_modules/changelog-maker/changelog-maker.js:75
console.error(`Error fetching issue #${commit.ghIssue}: ${err.messag
^
SyntaxError: Unexpected token ILLEGAL
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:935:3
#98 has broken coloring of changelog entries in a terminal.
e.g. with current v14.x-staging
expected (with [email protected])
It looks like the formatting is corrupting the ansi escape codes. Both @BethGriggs and I ran into this preparing the most recent releases and we had to manually remove the corrupted ansi when pasting into the changelogs.
I guess we could stripAnsi()
before formatting but then we'd lose the coloring completely.
cc @Trott
What's needed to make tests work locally with exact steps like the config path, the token permissions, etc.
Note that for me on Windows, running node changelog-maker.js
I don't get asked for credentials or anything. So, when I do npm t
it just fails.
2016-10-18 Node.js v6.9.0 'Boron' (LTS) Release
(nodejs/node@0e6750d1cd)
Could this tool support either of this?
When a changelog is generated, there is an instance when the incorrect author is listed.
When the changelog is generated, the commit author should be listed as the author.
Notice the PR-URL has a trailing / and it breaks all the things
$ changelog-maker --group --start-ref=1.0.0 --end-ref=1.0.1 Kikobeats/acho
/usr/local/lib/node_modules/changelog-maker/commit-stream.js:25
throw new Error('wut?')
^
Error: wut?
at addLine (/usr/local/lib/node_modules/changelog-maker/commit-stream.js:25:15)
at DestroyableTransform.onLine [as _transform] (/usr/local/lib/node_modules/changelog-maker/commit-stream.js:54:18)
at DestroyableTransform.Transform._read (/usr/local/lib/node_modules/changelog-maker/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:184:10)
at DestroyableTransform.Transform._write (/usr/local/lib/node_modules/changelog-maker/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:172:12)
at doWrite (/usr/local/lib/node_modules/changelog-maker/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:237:10)
at writeOrBuffer (/usr/local/lib/node_modules/changelog-maker/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:227:5)
at DestroyableTransform.Writable.write (/usr/local/lib/node_modules/changelog-maker/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:194:11)
at write (/usr/local/lib/node_modules/changelog-maker/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:623:24)
at flow (/usr/local/lib/node_modules/changelog-maker/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:632:7)
at DestroyableTransform.pipeOnReadable (/usr/local/lib/node_modules/changelog-maker/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:664:5)
and:
iojs -v
v1.5.1
Refs: nodejs/Release#557 (comment)
Would anyone object to granting the release team (@nodejs/releasers) write access to this repository? Recent changes here and in branch-diff (nodejs/branch-diff#45) have broken the release team's workflow and it would be useful if the team were able to merge in fixes such as #127.
There are no errors on passing wrong arguments or in wrong order or passing unknown flags, params.
Can we implement something?
--usage
(for short) and --help
/-?
for more detailed help would be enough.
I noticed this difference in the upgrade from 1.3.10 to 1.4.0
1.4.0 outputs this:
* [[e09e75b338](https://github.com/organization/private-repo/commit/e09e75b338) - subsystem: summary (James Young) #220
1.3.10 would output this:
* [[`361ac84d97`](https://github.com/organization/private-repo/commit/361ac84d97)] - **subsystem**: summary (James Young) [#214](https://github.com/organization/private-repo/pull/214)
361ac84d97
] - subsystem: summary (James Young) #214I haven't had a chance to look at the changes yet, but wanted to go ahead and log the issue.
The commit messages are initially in text, so rendering them as Markdown can cause errors.
To reproduce, in node
, do:
$ changelog-maker --start-ref=9eddaebb --end-ref=9eddaebb
* [[`9eddaebb79`](https://github.com/nodejs/node/commit/9eddaebb79)] - **assert**: remove unnecessary use of __proto__ (Nathan Rajlich)
If a changelog includes __proto__
, we don't want it to render as «proto», we want to render it as «__proto__
» or «__proto__». Without knowing more if that is code block or not, it would make sense to just escape some symbols like `_*~\
, prefixing those with \
.
Refs: nodejs/node#a58b48bc3bc, nodejs/node#7637, nodejs/node#12756 (comment).
Sometimes it will drop commits, add to many commits, not get anything at all, etc, when using --start-ref=
and/or --end-ref=
on io.js.
For example, to get the commits in nodejs/node#1383 (comment) I ran changelog-maker --start-ref=b8310cb --end-ref=08e89b1 iojs io.js
, but it gets commits well before b8310cb also.
(This is the same issue I had trying to use this to make the 1.6.4 release before it was properly re-tagged.)
I have repositories in bitbucket and gitlab.
I want:
changelog-maker --url=http://git.lestad.net game src
and in result:
* [[`123abc456`](http://git.lestad.net/game/src/commit/123abc456)] - **label**: commit text (lestad)
Currently labels are fetched from original PR. sometimes we backport a semver-patch version of a semver-major change.
We should check for backport-pr-url and fetch appropriate labels
See nodejs/node#10127 (comment). A HTML tag in a commit message can throw off markdown parsers. I think problematic chars like <
should be escaped as \<
.
I'm going to try http://keepachangelog.com/ and need some tiny improvements for autogenerating CHANGELOG.md.
As I see:
Also it can be an option to finalize unreleased
section with some tag (in that way we need to fetch 2 tags: previous and the last, and use them as start and end refs).
Something's bad about this one:
process: internal/process/stdio.js cleanup / modernization
Avoid using deprecated getter syntax plus other
miscellaneous updates.
PR-URL: https://github.com/nodejs/node/pull/6766
Reviewed-By: Colin Ihrig <[email protected]>
Comes out as Avoid using deprecated getter syntax plus other
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.