summaryrefslogtreecommitdiff
path: root/pkgs/check-pr.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/check-pr.nix')
-rw-r--r--pkgs/check-pr.nix13
1 files changed, 13 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}"
+ '';
+}