all: wire up pr-status checking
This commit is contained in:
parent
2348f850ac
commit
e27c75b904
16
bin/deploy
16
bin/deploy
@ -31,6 +31,22 @@ rebuild() {
|
||||
return $?
|
||||
}
|
||||
|
||||
if [ "$1" = "watch" ]; then
|
||||
if [ "$2" = "update" ]; then
|
||||
msg "updating watches..."
|
||||
for f in pull_requests/*.json; do
|
||||
pr=$(basename $f .json)
|
||||
curl -s -o pull_requests/${pr}.json https://pr-status.humpback-trout.ts.net/${pr}
|
||||
msg "Updated watch for ${pr}: $(jq -r .title <pull_requests/${pr}.json)"
|
||||
done
|
||||
else
|
||||
pr="$2"
|
||||
curl -s -o pull_requests/${pr}.json https://pr-status.humpback-trout.ts.net/${pr}
|
||||
msg "Added watch for ${pr}: $(jq -r .title <pull_requests/${pr}.json)"
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$1" = "status" ]; then
|
||||
rev=$(git rev-parse HEAD)
|
||||
msg "Currently at: ${rev}\t($(git log --format=%B -n 1 $rev | head -n1))"
|
||||
|
@ -1,11 +1,15 @@
|
||||
{ lib, ... }:
|
||||
let
|
||||
prStatus = builtins.fromJSON (builtins.readFile ../pr_status.json);
|
||||
prIsOpen = pr: overlay:
|
||||
if prStatus."${builtins.toString pr}".status == "open" then
|
||||
let
|
||||
prstr = builtins.toString pr;
|
||||
prStatus =
|
||||
builtins.fromJSON (builtins.readFile ../pull_requests/${prstr}.json);
|
||||
in if prStatus.status == "open" then
|
||||
overlay
|
||||
else
|
||||
null;
|
||||
lib.warn "PR: ${prstr} (${prStatus.title}) is COMPLETE!" (_: _: {});
|
||||
|
||||
|
||||
mkCronScript = name: src: ''
|
||||
. /etc/profile;
|
||||
@ -35,6 +39,7 @@ let
|
||||
( . ./common.sh; start ) || true;
|
||||
'';
|
||||
nativeBuildInputs = with pkgs; [
|
||||
curl
|
||||
deadnix
|
||||
git
|
||||
git-bug
|
||||
@ -62,7 +67,8 @@ let
|
||||
};
|
||||
|
||||
xinlib = {
|
||||
inherit buildVer mkCronScript jobToUserService jobToService buildShell prStatus prIsOpen;
|
||||
inherit buildVer mkCronScript jobToUserService jobToService buildShell
|
||||
prIsOpen;
|
||||
};
|
||||
|
||||
in xinlib
|
||||
|
@ -3,7 +3,9 @@ let
|
||||
openssh = import ./openssh.nix;
|
||||
tailscale = xinlib.prIsOpen 231281 (import ./tailscale.nix);
|
||||
jetbrains = xinlib.prIsOpen 232308 (import ./jetbrains.nix);
|
||||
tidal-hifi = xinlib.prIsOpen 228552 (import ./tidal-hifi.nix { inherit lib; });
|
||||
tidal-hifi =
|
||||
xinlib.prIsOpen 228552 (import ./tidal-hifi.nix { inherit lib; });
|
||||
matrix-synapse = xinlib.prIsOpen 233651 (import ./matrix-synapse.nix);
|
||||
in {
|
||||
nixpkgs.overlays = if isUnstable then [
|
||||
(_: super: {
|
||||
@ -18,7 +20,7 @@ in {
|
||||
openssh
|
||||
tailscale
|
||||
] else [
|
||||
(import ./matrix-synapse.nix)
|
||||
matrix-synapse
|
||||
openssh
|
||||
tailscale
|
||||
];
|
||||
|
@ -1,17 +0,0 @@
|
||||
{
|
||||
"232308": {
|
||||
"status": "open",
|
||||
"target": "unstable",
|
||||
"link": "https://github.com/NixOS/nixpkgs/pull/232308"
|
||||
},
|
||||
"228552": {
|
||||
"status": "open",
|
||||
"target": "unstable",
|
||||
"link": "https://github.com/NixOS/nixpkgs/pull/228552"
|
||||
},
|
||||
"231281": {
|
||||
"status": "open",
|
||||
"target": "stable",
|
||||
"link": "https://github.com/NixOS/nixpkgs/pull/231281"
|
||||
}
|
||||
}
|
1
pull_requests/228552.json
Normal file
1
pull_requests/228552.json
Normal file
@ -0,0 +1 @@
|
||||
{"branches":["master","nixos-23.05","nixos-23.05-small","nixos-unstable","nixos-unstable-small","nixpkgs-unstable","release-23.05","staging","staging-23.05","staging-next","staging-next-23.05"],"pull_request":"228552","queryTime":"0.105569","release":"unstable","status":"complete","status_info":{"master":true,"nixos-unstable":true,"nixos-unstable-small":true,"nixpkgs-unstable":true,"staging":true,"staging-next":true},"title":"tidal-hifi: 5.0.0 -> 5.1.0"}
|
1
pull_requests/231281.json
Normal file
1
pull_requests/231281.json
Normal file
@ -0,0 +1 @@
|
||||
{"branches":["nixos-22.11","nixos-22.11-small","nixpkgs-22.11-darwin","release-22.11","staging-22.11","staging-next-22.11"],"pull_request":"231281","queryTime":"0.111847","release":"stable","status":"complete","status_info":{"nixos-22.11":true,"nixos-22.11-small":true,"release-22.11":true,"staging-22.11":true,"staging-next-22.11":true},"title":"tailscale: 1.40.0 -> 1.40.1"}
|
1
pull_requests/232308.json
Normal file
1
pull_requests/232308.json
Normal file
@ -0,0 +1 @@
|
||||
{"branches":["master","nixos-unstable-small","staging","staging-next"],"pull_request":"232308","queryTime":"0.072896","release":"unstable","status":"open","status_info":{"master":true,"nixos-unstable":false,"nixos-unstable-small":true,"nixpkgs-unstable":false,"staging":true,"staging-next":true},"title":"jetbrains.jdk: 17.0.6-b829.5 â 17.0.6-b829.9"}
|
1
pull_requests/233651.json
Normal file
1
pull_requests/233651.json
Normal file
@ -0,0 +1 @@
|
||||
{"branches":[],"pull_request":"233651","queryTime":"0.043749","release":"stable","status":"complete","status_info":{},"title":"matrix-synapse: 1.83.0 -> 1.84.0"}
|
Loading…
Reference in New Issue
Block a user