From 801093bfc41d106d6568ce4ad4387c643c63a262 Mon Sep 17 00:00:00 2001
From: ahuston-0 <aliceghuston@gmail.com>
Date: Sat, 20 Apr 2024 15:21:40 -0400
Subject: [PATCH] fix double read

Signed-off-by: ahuston-0 <aliceghuston@gmail.com>
---
 hydra/jobsets.nix | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/hydra/jobsets.nix b/hydra/jobsets.nix
index fc6e22e..50b9e7a 100644
--- a/hydra/jobsets.nix
+++ b/hydra/jobsets.nix
@@ -24,8 +24,8 @@ let
       contents = builtins.toJSON contents;
     };
 
-  prs = builtins.fromJSON (builtins.readFile pulls);
-  refs = builtins.fromJSON (builtins.readFile branches);
+  prs = readJSONFile pulls;
+  refs = readJSONFile branches;
   repo = "ahuston-0/nix-dotfiles-hydra";
 
   makeJob =
@@ -65,8 +65,8 @@ let
   jobOfPR = id: info: {
     name = "pr-${id}";
     value = makeJob {
-      description = "PR ${id}: ${info.${id}.title}";
-      flake = "git+ssh://git@github.com/${info.${id}.head.repo.full_name}?ref=${info.${id}.head.ref}";
+      description = "PR ${id}: ${info.title}";
+      flake = "git+ssh://git@github.com/${info.head.repo.full_name}?ref=${info.head.ref}";
     };
   };
   attrsToList = l: builtins.attrValues (builtins.mapAttrs (name: value: { inherit name value; }) l);