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

feat: added prefix_path input that can be used to add a prefix to each filename in the cobertura report #74

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

kevinvalk
Copy link

@kevinvalk kevinvalk commented Sep 8, 2022

The PR #59 introduces link_missing_lines_source_dir which can be used to "fix" the generated URLs for the missing lines links. As far as I understand the real issue is due to the fact the filename inside the cobertura reports are not relative the root of the repository.

As indicated in PR #59 there is a <source>...</source> element in the cobertura report, but this may not always be correct.

This PR add the provide prefix_path to ALL filename attributes. This fixes both the link_missing_lines issue and also add support for showing the correct coverage when using only_changed_files.

I added backwards compatibility to the link_missing_lines_source_dir.

@kevinvalk kevinvalk changed the title chore: prepared change of branch feat: added prefix_path input that can be used to add a prefix to each filename in the cobertura report Sep 8, 2022
@kevinvalk kevinvalk force-pushed the prefix branch 2 times, most recently from c3259d7 to ccc4fcb Compare September 8, 2022 14:11
@kevinvalk kevinvalk marked this pull request as ready for review September 8, 2022 14:16
@kevinvalk kevinvalk force-pushed the prefix branch 2 times, most recently from 81f5bc3 to 5012d04 Compare September 9, 2022 06:50
@antoinesaliba
Copy link

This would be extremely useful. Is there anything I can do to help get this merged?

@arturs-at-levelpath
Copy link

Would appreciate pushing this to master as well. 🙏

Vadgyik pushed a commit to Vadgyik/cobertura-action that referenced this pull request Jan 19, 2024
Vadgyik added a commit to Vadgyik/cobertura-action that referenced this pull request Jan 23, 2024
… version (#1)

* feat: added prefix_path input that can be used to add a prefix to each filename in the cobertura report
applied 5monkeys#74 from https://github.com/kevinvalk/cobertura-action/tree/prefix

* fix: update dependencies (npm audit fix)

* feat: allow to set only desired output, add header_text, add outputs

* feat: report total/covered line/branch count

* improvement: upgrade to node20

---------

Co-authored-by: Kevin Valk <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants