octocov icon indicating copy to clipboard operation
octocov copied to clipboard

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

Open k2tzumi opened this issue 2 years ago • 10 comments

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.

k2tzumi avatar Aug 27 '22 04:08 k2tzumi

For example.

If octocov could provide a mechanism to replace f.BlobURL in https://github.com/k1LoW/octocov/blob/bd6c38135491b410be5c984015e6ee7e353f37bd/report/report.go#L180 with fmt.Sprintf("%s/%s", yourExternalServerPrefix, f.Filename), would that satisfy your request?

k1LoW avatar Aug 27 '22 08:08 k1LoW

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.

k2tzumi avatar Aug 28 '22 23:08 k2tzumi

Hi @k1LoW Any progress or plan on this issue?

yyamanoi1222 avatar Nov 08 '22 13:11 yyamanoi1222

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

k2tzumi avatar Nov 08 '22 13:11 k2tzumi

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.

k1LoW avatar Nov 08 '22 14:11 k1LoW

https://github.com/k1LoW/octocov/issues/161#issuecomment-1229148738

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

yyamanoi1222 avatar Nov 08 '22 14:11 yyamanoi1222

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.

k1LoW avatar Nov 08 '22 15:11 k1LoW

I see. Thank you for your reply!

yyamanoi1222 avatar Nov 08 '22 22:11 yyamanoi1222

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

k2tzumi avatar Jan 08 '24 13:01 k2tzumi

How about handling URLs as an attribute of custom metrics?

We cannot afford to forget the three default metrics.

k1LoW avatar Jan 08 '24 22:01 k1LoW