Skip to content

Instantly share code, notes, and snippets.

@imhemish
Created March 28, 2023 14:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save imhemish/d63238a3f0130321d3d92c551f5839b0 to your computer and use it in GitHub Desktop.
Save imhemish/d63238a3f0130321d3d92c551f5839b0 to your computer and use it in GitHub Desktop.
Fetch accepted pull requests at GitHub in markdown format
import json
from requests import get
x = get("https://api.contributed.jdocklabs.co.uk/user/imhemish")
y = json.loads(x.text)
print("# Accepted pull requests at GitHub")
for user in y.keys():
pull_requests = y[user]['pullRequests']
for project in pull_requests.keys():
for project2, pull_requests2 in pull_requests.items():
for pull_request_text, pull_request_url in pull_requests2.items():
print(f"- [{pull_request_text}]({pull_request_url}) at [{user}/{project2}](https://github.com{user}/{project2})")
@imhemish
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment