Script to find any PR affecting a single file

pull/675/head^2
Andreas M. Antonopoulos 3 years ago
parent 36ef0d0279
commit e1a0a27843

@ -0,0 +1,8 @@
#!/bin/bash
curl -s https://api.github.com/repos/lnbook/lnbook/pulls | jq '.[]|.number' | while read pr; do
git fetch --quiet github refs/pull/$pr/head
if git show --pretty=format:'' --name-only FETCH_HEAD | grep -q $1; then
echo "PR $pr"
fi
done
Loading…
Cancel
Save