zaquestion / lab

Lab wraps Git or Hub, making it simple to clone, fork, and interact with repositories on GitLab
https://zaquestion.github.io/lab
Creative Commons Zero v1.0 Universal
1.11k stars 102 forks source link

pipe job output in $EDITOR #889

Open teto opened 9 months ago

teto commented 9 months ago

this is a longshot but I had these crazy ideas:

  1. we have one messy jobs where I would like to have the job collapsible sections locally https://docs.gitlab.com/ee/ci/jobs/#custom-collapsible-sections (and see/convert them into neovim "folds")
  2. we also have playwright's logs, a software to check the rendering of a website against snapshots. The dream would be to display those images in the job output. As far as gitlab is concerned, I dont think this will ever be possible, not in the next 3 years at least. But with lab, I think it could be possible to have the picture shown in terminal via sixel/ the kitty protocol or timg. Even if it's not possible to get the raw bytes, what would be possible if I could pipe the job into my own program is to postprocess it:
    • identify some sections in the output to create the folds
    • identify paths towards images and display them in the terminal via https://github.com/hzeller/timg for instance (or image.nvim within neovim). This implies that I retreive the artifacts from the job I guess. This could be done by the postprocessing script but I would like to plug that into lab ci view that can find the latest sent pipeline (I dont want to write this part).

What do you think ?