-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gulp: Split gulpfile.js and expanded changes
task
#1835
gulp: Split gulpfile.js and expanded changes
task
#1835
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
premerge.js
should probably only have one top level export.
gulpfile.js/changelog.js
Outdated
} | ||
/** @param {CommitChange} change */ | ||
function notPartlyGenerated(change) { | ||
return change.file !== 'plugins/autoloader/prism-autoloader.js' && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this also remove these files from manual changes to them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes and no.
When looking at where I used this function, you'll see that I always checked whether components.json
was changed. I just assume that all changes in Autoloader & Show language are caused by the generated part of these files. This assumption isn't necessarily true but most of the time it is.
Only addedComponent
and changedComponentOrCore
use notPartlyGenerated
. So you would have to change Autoloader and add/modify a language definition for the two to incorrectly categorize your PR.
It is possible that the sorters (if you know a better name, I'll take it) put a commit in the wrong category but it will rarely happen. But that's also the worst thing that can happen. No commits will be lost.
And, as I said before:
Careful review of the generated changelog is still necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Digging the improvements. Some nits, then good to merge.
This PR splits the
gulpfile.js
into different parts.I also completely rewrote the
changes
task to generate a mostly ready changelog.It automatically assigns a category to commits based on the files changed by a commit. This only includes a few trivial cases where the category is clear; All other commits get the
TODO:
category.'Rebuild commits' (commits where only generated files change) get ignored but a message will be logged just in case.
Note: Careful review of the generated changelog is still necessary.
Here are a few examples of the outputs of
gulp changes
for different commit ranges:The default range is
<currentVersionTag>..HEAD
, but it's easy to specify a different range.v1.14.0..v1.15.0
v1.15.0..v1.16.0
v1.16.0..HEAD