You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lnbook/tools/pr_affecting_file.sh

9 lines
258 B
Bash

#!/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