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

Generate html diff output #91

Open
sergeyshevch opened this issue Jan 7, 2025 · 3 comments
Open

Generate html diff output #91

sergeyshevch opened this issue Jan 7, 2025 · 3 comments
Labels
feature-request Feature Request

Comments

@sergeyshevch
Copy link

Hello! I'm looking to expose diff output into gitlab, and for now it's not support .md files to expose on pages.

Maybe it's possible to add .html output with generated styles. Later we can also improve diff readability as well

@dag-andersen
Copy link
Owner

Hi @sergeyshevch
How do you want the html output to look?
Here you can see how the markdown is generated [link]. As you can see it is very basic. We can easily add a another format that works better for GitLab :)

@sergeyshevch
Copy link
Author

sergeyshevch commented Jan 7, 2025

Maybe something like: https://diff2html.xyz. I guess rust also has some solution for it

For not it's slightly hard to send output to comment in gitlab but it already support exposing artifacts on gitlab pages, but it doesn't support markdown for now
https://archives.docs.gitlab.com/16.8/ee/ci/jobs/job_artifacts.html#browse-the-contents-of-the-artifacts-archive

Regarding current diff, maybe it's good idea to place each file in it's own spoiler. It will help reading of large diffs

@sergeyshevch
Copy link
Author

sergeyshevch commented Jan 7, 2025

Maybe I can handle it on my side later then, with something like https://github.com/pycontribs/ansi2html or https://github.com/Wilfred/difftastic/?tab=readme-ov-file

Then it can be good to have just plain git diff as an output and leave postprocessing to end user

@dag-andersen dag-andersen added the feature-request Feature Request label Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Feature Request
Projects
None yet
Development

No branches or pull requests

2 participants