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
[core] Generate CHANGELOG from GitHub API #3313
Conversation
Did you consider that the results might be paginated? In #3312 it has 2 pages in the GitHub UI. In the core repo, there's this script which you could take some inspiration: https://github.com/mui-org/material-ui/blob/master/scripts/releaseChangelog.js It uses https://github.com/octokit/octokit.js instead of manually fetching the REST API. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
aa40908
to
41be2d6
Compare
The script is now able to look for PR description containing |
88fe6b3
to
af4f3c4
Compare
@m4theushw if you have a github token, the l10n can automatically update the issue when running |
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.
Finally, it's the end for the inconsistencies in the CHANGELOG between each release. 😁
scripts/l10n.ts
Outdated
await octokit.request('PATCH /repos/{owner}/{repo}/issues/{issue_number}', { | ||
owner: 'mui-org', | ||
repo: 'material-ui-x', | ||
issue_number: 3211, |
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.
Better to read it from a env var or argument.
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.
What about defining them as constants at the beginning of the file
GIT_ORGANIZATION = 'mui-org';
GIT_REPO = 'material-ui-x';
L10N_ISSUE_ID = 3211;
My concern is that someone debugging this code in 2 years will have every information set in a single file.
@m4theushw The dedicated PR for translation is #3588 |
scripts/releaseChangelog.js
Outdated
TODO INSERT HIGHLIGHTS | ||
|
||
${changeLogMessages.join('\n')} |
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.
The highlights come before the package names.
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.
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.
My bad, I moved the "TODO INSERT HIGHLIGHTS" and forget the changeLogMessages
done
These are the results for the performance tests:
|
I merge it because I'm doing the release this week. That will be a perfect occasion for a first test ;) |
The goal is to get a script that will not break when GitHub updates its font-end