-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
skip assets of unpublished posts and delete them if exist #3489
Conversation
Hi, the build failed because of codecoverage reduction & some eslint warning. Are you able to fix those? |
Thanks for your review. |
Oh, I found it, it's "npm run test-cov". So what's your coverage requirement? 100%, 98% or a specific num? |
This issue has been automatically marked as stale because lack of recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
There is no coverage requirement, just that this new behavior is covered by new tests |
@DaemondShu thanks for providing a fix. could you please resolve the merge conflicts, so the PR hopefully gets merged? If not, I could do it and open a new PR based on this one. |
83cc7e7
to
6c59cba
Compare
I've fixed the merge conflict and also rebased to the latest master. |
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.
LGTM!
Merged, thanks! |
Since hexojs#3489, no draft assets are generated. This is the desired behavior when not rendering draft posts. But when working on drafts, the according assets are never rendered. This change checks if draft posts should be rendered, and if this is the case, the assets will not be deleted. I validated this fix by - Running `hexo clean && rm -rf public/ && hexo generate` - Draft assets are not generated (as before) - Running `hexo clean && rm -rf public/ && hexo generate --draft` - Draft assets are generated - Running `hexo server --draft` - Draft assets are generated - Adjusting the existing unit test Fixes: hexojs#4556
Since hexojs#3489, no draft assets are generated. This is the desired behavior when not rendering draft posts. But when working on drafts, the according assets are never rendered. This change checks if draft posts should be rendered, and if this is the case, the assets will not be deleted. I validated this fix by - Running `hexo clean && rm -rf public/ && hexo generate` - Draft assets are not generated (as before) - Running `hexo clean && rm -rf public/ && hexo generate --draft` - Draft assets are generated - Running `hexo server --draft` - Draft assets are generated - Adjusting the existing unit test Fixes: hexojs#4556
Since hexojs#3489, no draft assets are generated. This is the desired behavior when not rendering draft posts. But when working on drafts, the according assets are never rendered. This change checks if draft posts should be rendered, and if this is the case, the assets will not be deleted. I validated this fix by - Running `hexo clean && rm -rf public/ && hexo generate` - Draft assets are not generated (as before) - Running `hexo clean && rm -rf public/ && hexo generate --draft` - Draft assets are generated - Running `hexo server --draft` - Draft assets are generated - Adjusting the existing unit test Fixes: hexojs#4556
Since hexojs#3489, no draft assets are generated. This is the desired behavior when not rendering draft posts. But when working on drafts, the according assets are never rendered. This change checks if draft posts should be rendered, and if this is the case, the assets will not be deleted. I validated this fix by - Running `hexo clean && rm -rf public/ && hexo generate` - Draft assets are not generated (as before) - Running `hexo clean && rm -rf public/ && hexo generate --draft` - Draft assets are generated - Running `hexo server --draft` - Draft assets are generated - Adjusting the existing unit test Fixes: hexojs#4556
Since hexojs#3489, no draft assets are generated. This is the desired behavior when not rendering draft posts. But when working on drafts, the according assets are never rendered. This change checks if draft posts should be rendered, and if this is the case, the assets will not be deleted. I validated this fix by - Running `hexo clean && rm -rf public/ && hexo generate` - Draft assets are not generated (as before) - Running `hexo clean && rm -rf public/ && hexo generate --draft` - Draft assets are generated - Running `hexo server --draft` - Draft assets are generated - Adjusting the existing unit test Fixes: hexojs#4556
Since hexojs#3489, no draft assets are generated. This is the desired behavior when not rendering draft posts. But when working on drafts, the according assets are never rendered. This change checks if draft posts should be rendered, and if this is the case, the assets will not be deleted. I validated this fix by - Running `hexo clean && rm -rf public/ && hexo generate` - Draft assets are not generated (as before) - Running `hexo clean && rm -rf public/ && hexo generate --draft` - Draft assets are generated - Running `hexo server --draft` - Draft assets are generated - Adjusting the existing unit test Fixes: hexojs#4556
What does it do?
Fixed issue #3478.
How to test
Screenshots
the result before adding the unittest
The result is the same as the original master branch on my machine.
the result after adding the unittest
code coverage summary
Pull request tasks