summaryrefslogtreecommitdiff
path: root/pkgs/check-pr/package.nix
blob: 3c5961be6bcc8d434a929458a230a471e0c05dc5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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}"
  '';
}