Skip to content

Instantly share code, notes, and snippets.

@dhsathiya
Last active October 21, 2020 18:28
Show Gist options
  • Save dhsathiya/aab8d7fdbc686c41fc4180af7b5eab6f to your computer and use it in GitHub Desktop.
Save dhsathiya/aab8d7fdbc686c41fc4180af7b5eab6f to your computer and use it in GitHub Desktop.
# !/bin/bash
# Because GH API was not able to do this.
# 1. Copy cURL request from Inspect > Network.
# 2. Update the URL like line number 8 (?page='"$i"'&q)
# Done!
i=0
curl -s 'https://github.com/pulls?page='"$i"'&q=is%3Aopen+is%3Apr+org%3AEXAMPLE+archived%3Afalse+author%3AUSER' \
-H 'Connection: VALUE_123' \
-H 'Pragma: VALUE_123' \
-H 'Cache-Control: VALUE_123' \
-H 'Upgrade-Insecure-Requests: VALUE_123' \
-H 'User-Agent: VALUE_123' \
-H 'Accept: VALUE_123' \
-H 'Sec-Fetch-Site: VALUE_123' \
-H 'Sec-Fetch-Mode: VALUE_123' \
-H 'Sec-Fetch-User: VALUE_123' \
-H 'Sec-Fetch-Dest: VALUE_123' \
-H 'Referer: VALUE_123' \
-H 'Accept-Language: VALUE_123' \
-H 'Cookie: VALUE_123' \
--compressed | grep 'data-skip-pjax="true"' | grep -Eo 'href="[^\"]+"'
i=$(( $i + 1 ))
[[ $i -gt 10 ]]&& exit
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment