add pending-reviews script
This commit is contained in:
@@ -10,6 +10,7 @@
|
|||||||
pkgs.tea
|
pkgs.tea
|
||||||
self'.packages.tea-create-pr
|
self'.packages.tea-create-pr
|
||||||
self'.packages.merge-after-ci
|
self'.packages.merge-after-ci
|
||||||
|
self'.packages.pending-reviews
|
||||||
# treefmt with config defined in ./flake-parts/formatting.nix
|
# treefmt with config defined in ./flake-parts/formatting.nix
|
||||||
config.treefmt.build.wrapper
|
config.treefmt.build.wrapper
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
merge-after-ci = pkgs.callPackage ./merge-after-ci {
|
merge-after-ci = pkgs.callPackage ./merge-after-ci {
|
||||||
inherit (config.packages) tea-create-pr;
|
inherit (config.packages) tea-create-pr;
|
||||||
};
|
};
|
||||||
|
pending-reviews = pkgs.callPackage ./pending-reviews { };
|
||||||
nix-unit = pkgs.callPackage ./nix-unit { };
|
nix-unit = pkgs.callPackage ./nix-unit { };
|
||||||
meshname = pkgs.callPackage ./meshname { };
|
meshname = pkgs.callPackage ./meshname { };
|
||||||
inherit (pkgs.callPackages ./node-packages { }) prettier-plugin-tailwindcss;
|
inherit (pkgs.callPackages ./node-packages { }) prettier-plugin-tailwindcss;
|
||||||
|
|||||||
12
pkgs/pending-reviews/default.nix
Normal file
12
pkgs/pending-reviews/default.nix
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{ writeShellApplication
|
||||||
|
, bash
|
||||||
|
, curl
|
||||||
|
}:
|
||||||
|
writeShellApplication {
|
||||||
|
name = "pending-reviews";
|
||||||
|
runtimeInputs = [
|
||||||
|
bash
|
||||||
|
curl
|
||||||
|
];
|
||||||
|
text = builtins.readFile ./script.sh;
|
||||||
|
}
|
||||||
10
pkgs/pending-reviews/script.sh
Normal file
10
pkgs/pending-reviews/script.sh
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
display_pr() { jq -r '.[] | "\(.url) | \(.title) from \(.user.login)"'; }
|
||||||
|
|
||||||
|
echo "# Review needed"
|
||||||
|
curl -s 'https://git.clan.lol/api/v1/repos/clan/clan-core/pulls?state=closed&sort=leastupdate&labels=8' | display_pr
|
||||||
|
|
||||||
|
echo "# Changes requested"
|
||||||
|
curl -s 'https://git.clan.lol/api/v1/repos/clan/clan-core/pulls?sort=leastupdate&labels=9' | display_pr
|
||||||
Reference in New Issue
Block a user