-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit PR notes to draftlogs and add scripts to provide draft release notes (CHANGELOG.md) and empty draftlogs #5780
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
Changes from 1 commit
a4a2244
80d614e
7154fa4
4e68725
7dcb82e
9bdd412
3a91c0e
eefab9b
ec4417f
d17e77c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
…enames
- Loading branch information
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| ## Directory of draft logs to help prepare the upcoming [CHANGELOG](https://github.com/plotly/plotly.js/blob/master/CHANGELOG.md) | ||
|
|
||
| It is required that the PR contributors start the filename with a number. | ||
| This number should preferably be the PR number. | ||
| The number of issue they are trying to close could also be used. | ||
| The markdown file should end with one of the followings: | ||
| 1. `_fix.md` to propose a bug fix | ||
| 2. `_add.md` to propose new features | ||
| 3. `_remove.md` to propose a feature removal | ||
| 4. `_change.md` to propose a minor/major change | ||
| 5. `_deprecate.md` to propose a feature deprecate | ||
archmoj marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ### Example filename and content for PR numbered 5546 for adding a new feature | ||
| - filename: `5546_add.md` | ||
| - content: | ||
| ``` | ||
| - Add `icicle` trace type [[#5546](https://github.com/plotly/plotly.js/pull/5546)] | ||
| ``` | ||
| which would render | ||
| - Add `icicle` trace type [[#5546](https://github.com/plotly/plotly.js/pull/5546)] | ||
|
|
||
| > Please start your single-line or multiple lined message with a verb. You could basically use the PR description while providing a link to the PR similar to the above example is appreciated too. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,6 +33,7 @@ var all = { | |
|
|
||
| var ENTER = '\n'; | ||
|
|
||
| var skippedFiles = []; | ||
| for(var i = 0; i < len; i++) { | ||
| var filename = allLogs[i]; | ||
| var message = fs.readFileSync(path.join(pathToDraftlogs, filename), { encoding: 'utf-8' }).toString(); | ||
|
|
@@ -49,6 +50,8 @@ for(var i = 0; i < len; i++) { | |
| all.Changed.push(message); | ||
| } else if(filename.endsWith('_fix.md')) { | ||
| all.Fixed.push(message); | ||
| } else { | ||
| skippedFiles.push(filename); | ||
| } | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Else throw an error, logging the filename as having been ignored. Might want to also loosen the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we have a test which disallows use of uppercase in filenames.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We do test for uppercase, but I don't think it'll dig into the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good call. Addressed in 3a91c0e. |
||
| } | ||
|
|
||
|
|
@@ -75,3 +78,9 @@ append('Fixed'); | |
| draftNewChangelog.push(foot); | ||
|
|
||
| fs.writeFileSync(pathToChangelog, draftNewChangelog.join(ENTER), { encoding: 'utf-8' }); | ||
|
|
||
| if(skippedFiles.length) { | ||
| throw JSON.stringify({ | ||
| 'skippedFiles': skippedFiles | ||
| }, null, 2); | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.