| Is it possible to tell the auto-update bot to group commits for a specific set of packages into a single PR? At the moment, auto-updates for COSMIC packages are turned off and I "manually" auto-update them with the following command on my local machine and then creating a PR:
nix-shell maintainers/scripts/update.nix \
--argstr commit true \
--argstr keep-going true \
--argstr max-workers 1 \
--argstr skip-prompt true \
--arg predicate '(path: pkg: let lib = import <nixpkgs/lib>; in lib.lists.elem lib.teams.cosmic (pkg.meta.teams or []))'
I was wondering if this could be automated in such a way that all package update commits are in a single PR. This is because upstream tags new versions for all stable packages at once, meaning we update all stable packages with each new release. But the motivating factor for automating this is that upstream is switching to weekly releases. I'd much rather spend my time on reviewing and let the auto-update bot handle updates, if possible.
I have given this some thought and am thinking of creating these two files in nixpkgs:
# pkgs/by-name/co/cosmic-packages-upgrade-script/package.nix
{
stdenvNoCC,
writeShellScript,
lib,
}:
stdenvNoCC.mkDerivation {
name = "cosmic-packages-upgrade-script";
passthru.updateScript = import ./update-script.nix { inherit writeShellScript; };
meta = {
description = "A package to auto-upgrade all COSMIC packages maintained by the nixpkgs COSMIC team";
license = lib.licenses.mit;
teams = [ lib.teams.cosmic ];
platforms = lib.platforms.linux;
};
}
# pkgs/by-name/co/cosmic-packages-upgrade-script/update-script.nix
{ writeShellScript }:
writeShellScript "cosmic-packages-upgrade-script" ''
cd "$(git rev-parse --show-toplevel)" || exit 1
exec nix-shell maintainers/scripts/update.nix \
--argstr commit true \
--argstr keep-going true \
--argstr max-workers 1 \
--argstr skip-prompt true \
--arg predicate '(path: pkg: let lib = import <nixpkgs/lib>; in lib.lists.elem lib.teams.cosmic (pkg.meta.teams or []))'
''
Is this cursed? Would it even work? What's the recommended method here?
|