import re


def parse_github_url(gh_url):
  """Util to parse Github repo/PR id from a Github PR URL.

  Args:
    gh_url (string): URL of Github pull request.

  Returns:
    Tuple of (repo name, pr number)
  """
  matches = re.match(r'https://github.com/([\w-]+/[\w-]+)/pull/(\d+)', gh_url)
  if matches:
    repo, prnum = matches.groups()
    return (repo, int(prnum))
  return None