add pending-reviews script

This commit is contained in:
Jörg Thalheim
2023-11-15 13:48:52 +01:00
parent 7ec378ca62
commit 56f135faed
4 changed files with 24 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
{ writeShellApplication
, bash
, curl
}:
writeShellApplication {
name = "pending-reviews";
runtimeInputs = [
bash
curl
];
text = builtins.readFile ./script.sh;
}

View 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