ofborg icon indicating copy to clipboard operation
ofborg copied to clipboard

Detect package better for PRs that don't touch default.nix

Open lilyball opened this issue 6 years ago • 1 comments

When I submit a PR for a bundlerApp package where all I did was modify the Gemfile.lock and gemset.nix files, ofborg doesn't detect the package and therefore doesn't label my PR correctly (e.g. it's missing 8.has: package (update) and 11.by: package-maintainer).

Example PR: https://github.com/NixOS/nixpkgs/pull/66251

I'm not actually sure what logic ofborg uses to detect the packages modified by the PR, so I don't know what the best approach for teaching it about this scenario. One simple possibility would be if the PR title or any commit in the PR follows the format "attrname: …" then check that attribute and see if anything in it was modified by the PR. That simple check would handle the above PR, because the cocoapods-beta attribute is a derivation that references both Gemfile.lock and gemset.nix (and in fact its version attribute is also changed since that comes from gemset.nix).

lilyball avatar Aug 08 '19 18:08 lilyball

If ofborg can also use the commit titles, then I don't think we need to complicate the part that detects based on files. In that case it is related to https://github.com/NixOS/ofborg/issues/318.

E.g., foobar: 50 -> 60 is simply an upgrade for which we have a label, and foobar: init at 50 is a new package. Maybe we only need to check whether it is in the nixos/ folder or not.

FRidh avatar Oct 15 '19 14:10 FRidh