-
Notifications
You must be signed in to change notification settings - Fork 5k
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
feat(dev): add changelog check into pre-commit #7377
base: 4.x
Are you sure you want to change the base?
Conversation
- [ ] I ran `npm run build` and tested `dist/web3.min.js` in a browser. | ||
- [ ] I have tested my code on the live network. | ||
- [ ] I have checked the Deploy Preview and it looks correct. | ||
- [ ] I have updated the `CHANGELOG.md` file in both the root folder and corresponding packages/web3-xxx folders. |
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.
These spaces are added automatically by the check
scripts/check_changelog.js
Outdated
if (hasError) { | ||
console.log( | ||
colors.red( | ||
'\nCommit rejected: Please update packages/web3-xxx/CHANGELOG.md for all modified packages', |
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.
would be better to name the actual package rather web3-xxx
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 log above will display the specific package names. Maybe something like "Please update the changelog for all aforementioned packages."
is enough? I agree that web3-xxx
is not clear enough
Description
Fix #7219
I don't know how to write tests for it. The images above show the test results that were done manually
Type of change
Checklist:
npm run lint
with success and extended the tests and types if necessary.npm run test:unit
with success.npm run test:coverage
and my test cases cover all the lines and branches of the added code.npm run build
and testeddist/web3.min.js
in a browser.CHANGELOG.md
file in the root folder.