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

Allow the link to the file in the comments to be changed to an HTML file to check the line of coverage #161

Open
k2tzumi opened this issue Aug 27, 2022 · 10 comments

Comments

@k2tzumi
Copy link
Contributor

k2tzumi commented Aug 27, 2022

Proposal

Some coverage tools output reports in html to check coverage lines.

I want to change the file link destination for the code coverage of the files in the scope of the pull request.

Issue

  • github actions by itself cannot host the html of the coverage report, so we need to put the html on an external server.
    Need to change the link to an external server
  • Some HTML in the coverage report does not allow assembling URLs that refer to the coverage in question from the path of the change file
    It may be necessary to generate URLs from the path of changed files only for reports that can be handled.
@k1LoW
Copy link
Owner

k1LoW commented Aug 27, 2022

For example.

If octocov could provide a mechanism to replace f.BlobURL in

rows = append(rows, []string{fmt.Sprintf("[%s](%s)", f.Filename, f.BlobURL), fmt.Sprintf("%.1f%%", cover)})
with fmt.Sprintf("%s/%s", yourExternalServerPrefix, f.Filename), would that satisfy your request?

@k2tzumi
Copy link
Contributor Author

k2tzumi commented Aug 28, 2022

with fmt.Sprintf("%s/%s", yourExternalServerPrefix, f.Filename), would that satisfy your request?

Yes, I do.
The general outline of what you want to do is fine, although I think there may be a way to specify anchor as well as path delimitation.

@yyamanoi1222
Copy link

Hi @k1LoW
Any progress or plan on this issue?

@k2tzumi
Copy link
Contributor Author

k2tzumi commented Nov 8, 2022

No particular progress.
I wish I had some good ideas for hosting the coverage report on GitHub only.

@k1LoW
Copy link
Owner

k1LoW commented Nov 8, 2022

We have not been able to find a definitive solution for generating custom links.

"Is it enough to just customize the link anyway?" I don't have a good answer to the question.

I am waiting for us to come up with the next idea that will lead to the next step.

@yyamanoi1222
Copy link

#161 (comment)

Do you have any concerns about adopting the means described here?

@k1LoW
Copy link
Owner

k1LoW commented Nov 8, 2022

Do you have any concerns about adopting the means described here?

Yes, I have. I consider the following

"Is it enough to just customize the link anyway?" I don't have a good answer to the question.

@yyamanoi1222
Copy link

I see. Thank you for your reply!

@k2tzumi
Copy link
Contributor Author

k2tzumi commented Jan 8, 2024

How about handling URLs as an attribute of custom metrics?
https://github.com/k1LoW/octocov/blob/main/report/custom_metrics_schema.json

@k1LoW
Copy link
Owner

k1LoW commented Jan 8, 2024

How about handling URLs as an attribute of custom metrics?

We cannot afford to forget the three default metrics.

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

No branches or pull requests

3 participants