Skip to content
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

Only annotate lines that the PR modifies #306

Merged
merged 10 commits into from Aug 30, 2022
Merged

Only annotate lines that the PR modifies #306

merged 10 commits into from Aug 30, 2022

Conversation

Floby
Copy link
Contributor

@Floby Floby commented Aug 19, 2022

This PR adds the option annotations = 'changed-coverage'
When active, the action will filter any coverage annotations to only include lines that the PR actually modifies.
This is useful when inheriting a poorly covered codebase, but trying not to worsen the coverage, because otherwise annotations are ignored after the 50th.

See it in action at https://github.com/Floby/test-coverage-action/pull/1/files#diff-a2a171449d862fe29692ce031981047d7ab755ae7f84c707aef80701b3ea0c80

Copy link
Owner

@ArtiomTr ArtiomTr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @Floby 👋,

Thank you for this amazing PR! Just have a few notes on this.

src/filters/onlyChanged.ts Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@Floby
Copy link
Contributor Author

Floby commented Aug 20, 2022

There seems to be an issue with the package lock file as well. What would you like me to do with it?

@Floby Floby changed the title Add option to only annotate lines that the PR modifies Only annotate lines that the PR modifies Aug 20, 2022
Copy link
Owner

@ArtiomTr ArtiomTr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect 👍

@ArtiomTr
Copy link
Owner

@Floby, the package-lock file looks good to me, what is the issue? Also, it seems like the run.test.ts test is failing, can you please check and update it if necessary?

action.yml Outdated Show resolved Hide resolved
@HarelM
Copy link

HarelM commented Aug 29, 2022

Any way for me to help push this forward?
I would really love to see coverage annotation in our project so that I can direct PR writers to improve the coverage of the code they want to add to our library...

@ArtiomTr ArtiomTr merged commit 9699901 into ArtiomTr:main Aug 30, 2022
@ArtiomTr
Copy link
Owner

Thank you for contribution!

@all-contributors please add @Floby for code

@allcontributors
Copy link
Contributor

@ArtiomTr

I've put up a pull request to add @Floby! 🎉

@ArtiomTr ArtiomTr added the enhancement New feature or request label Aug 30, 2022
@Floby
Copy link
Contributor Author

Floby commented Sep 6, 2022

hello, sorry i've been on holiday and trying to detox ^^
Thank you for merging this !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants