summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorseth <[email protected]>2023-07-08 19:13:06 -0400
committerseth <[email protected]>2023-07-08 19:13:06 -0400
commitc0f09dbff53c41ddcfd0c08bd4121b4978c32999 (patch)
tree220c5c607b34dee167f90d2d0a4aa915ac758d19
parentd207d629aff4cdc6b046c92242229e976a0f296b (diff)
pkgs: init check-pr
-rw-r--r--pkgs/check-pr.nix13
-rw-r--r--pkgs/default.nix1
2 files changed, 14 insertions, 0 deletions
diff --git a/pkgs/check-pr.nix b/pkgs/check-pr.nix
new file mode 100644
index 0000000..fca30b1
--- /dev/null
+++ b/pkgs/check-pr.nix
@@ -0,0 +1,13 @@
+{writeShellApplication}:
+writeShellApplication {
+ name = "check-pr";
+ text = ''
+ _usage="
+ usage: check-pr <owner/repo> <pr_id> [package]
+ "
+
+ [ "$#" -lt 2 ] && echo -n "$_usage" && exit 1
+
+ nix run "github:$1?ref=pull/$2/head''${3:+#$3}"
+ '';
+}
diff --git a/pkgs/default.nix b/pkgs/default.nix
index 2b9c515..02906f1 100644
--- a/pkgs/default.nix
+++ b/pkgs/default.nix
@@ -4,6 +4,7 @@ in {
# original packages
cartridges = callPackage ./cartridges.nix {};
cfspeedtest = callPackage ./cfspeedtest.nix {};
+ check-pr = callPackage ./check-pr.nix {};
huion = callPackage ./huion.nix {};
mommy = callPackage ./mommy.nix {};
theseus = callPackage ./theseus {};