From 7dc636d47a15048ccf978bfe32718893c65aa911 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charlotte=20=F0=9F=A6=9D=20Delenk?= Date: Mon, 25 Apr 2022 13:15:18 +0100 Subject: [PATCH] change the name of the pr jobname --- resolve-jobs.nix | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/resolve-jobs.nix b/resolve-jobs.nix index d2d616a7..c212e697 100644 --- a/resolve-jobs.nix +++ b/resolve-jobs.nix @@ -9,6 +9,11 @@ let + inherit (builtins) attrNames listToAttrs; + + mapAttrs' = f: set: + listToAttrs (map (attr: f attr set.${attr}) (attrNames set)); + flake_compat = src: let @@ -203,13 +208,15 @@ let prs = builtins.fromJSON (builtins.readFile ); - srcs = builtins.mapAttrs - (n: value: - builtins.fetchgit { - url = "https://github.com/${value.base.repo.owner}/${value.base.repo.name}"; - ref = "pulls/${n}/head"; - } - ) + srcs = builtins.mapAttrs' + (n: value: { + name = "pr${n}"; + value = builtins.fetchgit + { + url = "https://github.com/${value.base.repo.owner}/${value.base.repo.name}"; + ref = "pulls/${n}/head"; + }; + }) prs; in builtins.mapAttrs (_: flake_compat) srcs