message: ci: Rework github-list-prs.py script to use only builtin python
diff: #!/usr/bin/env python3
  import sys
  -import requests
  -
  import argparse
  -from github import Github
  +import urllib.request
  +import json
  parser = argparse.ArgumentParser(description="List open PRs")
  +parser.add_argument("-t", "--token", help="GitHub access token")
  group = parser.add_mutually_exclusive_group()
  group.add_argument("-o", "--open", help="List open PRs",
  - action="store_true", default=True)
  + action="store_true", default=False)
  group.add_argument("-c", "--closed", help="List closed PRs",
  action="store_true", default=False)
  group.add_argument("-a", "--all", help="List all PRs",
  @@ -21,15 +21,21 @@ if args.open:
  state = "open"
  elif args.closed:
  state = "closed"
  -else: #args.all
  +elif args.all:
  state = "all"
  +else:
  + state = "open"
  try:
  - response = requests.get('https://api.github.com/repos/%s/pulls?state=%s' % (args.repo, state))
  - response.raise_for_status()
  - prs = response.json()
  -except:
  + request = urllib.request.Request(
  + 'https://api.github.com/repos/%s/pulls?state=%s' % (args.repo, state))
  + if args.token:
  + request.add_header('Authorization', 'token %s' % args.token)
  + response = urllib.request.urlopen(request)
  +except OSError:
  sys.exit(1)
  +prs = json.loads(response.read())
  +
  for pr in prs:
  print("%d %s" % (pr['number'], pr['head']['ref']))
  