Skip to content

Instantly share code, notes, and snippets.

@KyMidd

KyMidd/asd.fsh Secret

Created December 4, 2022 19:00
Show Gist options
  • Select an option

  • Save KyMidd/617ca4d0b1e921de5c92683a17a6c6fb to your computer and use it in GitHub Desktop.

Select an option

Save KyMidd/617ca4d0b1e921de5c92683a17a6c6fb to your computer and use it in GitHub Desktop.
while IFS= read -r GH_REPO; do
unset GITHUB_URL
GITHUB_URL=$(curl -s \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $GITHUB_TOKEN" \
https://api.github.com/repos/$GH_ORG/$GH_REPO/pulls 2>&1 | jq -r ".[] | select (.title==\"$PR_TITLE\")| .html_url")
if [ $(echo $GITHUB_URL | awk 'NF' | wc -l) -gt 0 ]; then
echo $GITHUB_URL
fi
done <<< "$org_repos"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment