Investigate integration of nixpkgs-hammering
cole-h opened this issue · comments
It would be nice to integrate nixpkgs-hammering
, because the suggestions it provides are helpful. Especially if we can make it a honest-to-goodness GitHub check that supports annotating the line(s) that suggestions are referring to.
It may be better to integrate nixpkgs-hammering
using a self-hosted GHA runner on Nixpkgs, rather than moving it directly into ofborg, but I'll leave this open until we decide for certain.
cc'ing @jtojnar
I'm not quite clear on what the logical relationship between Github Checks and self-hosted Github Actions Runners are, with respect to nixpkgs-hammering integration into nixpkgs.
If I understand correctly though, it seems like
- Github Actions and the Checks API are not really alternatives to one another. The only way to get
nixpkgs-hammering
producing green check marks and line-by-line annotations is to use the Checks API, which can only be run a "Github App" with the appropriate permissions on the repo. - The App that's using the Checks API could be running anywhere that can receive webhooks.
- The App running nixpkgs-hammering could be ofborg, it could be GHA running on github's servers, or it could be GHA running in self-hosted mode.
- Github Actions is a "Github App", and there's a plugin for github actions that connects it to the Checks API here: https://github.com/LouisBrunner/checks-action
- Since
nixpkgs-hammering
normally has low resource requirements, I wonder if running on GHA hosted on github's servers is the easiest option?
I can look into the process of building a Github Action based on LouisBrunner/checks-action that runs nixpkgs-hammering.
I think I got this working.
See:
- rmcgibbo/nixpkgs-hammering-action-example#3
- https://github.com/rmcgibbo/nixpkgs-hammering-action-example/pull/3/files
- rmcgibbo/nixpkgs-hammering-action-example@a0d5782
- https://github.com/rmcgibbo/nixpkgs-hammering-action-example/pull/3/checks?check_run_id=1996824495
I wish it looked like a Review -- I don't think the way the data is presented looks that great personally. But it's better than a comment, I suppose?