Fetch the feature-pacts for a given pull request on github. This is useful for CI builds
    that have access to their associated pull requests.
    Expects a pull_request_url like 'https://github.com/zhammer/morning-cd/pull/17' with a PR body
    that includes a line 'feature-pacts: zh-feature-a, eh-feature-b'. If there is no 'feature-pacts'
    line, this will return an empty set.

def fetch_feature_pacts(pull_request_url: str) -> FrozenSet[str]:
    """Fetch the feature-pacts for a given pull request on github. This is useful for CI builds
    that have access to their associated pull requests.
    Expects a pull_request_url like 'https://github.com/zhammer/morning-cd/pull/17' with a PR body
    that includes a line 'feature-pacts: zh-feature-a, eh-feature-b'. If there is no 'feature-pacts'
    line, this will return an empty set.
    """
    pr_info = _pluck_pull_request_info(pull_request_url)
    r = requests.get(
        f'https://api.github.com/repos/{pr_info.owner}/{pr_info.repo}/pulls/{pr_info.number}'
    )
    if not r.status_code == requests.codes.all_good:
        raise GithubPrError(f'Error fetching pr {pr_info} from github. Response: {r.text}.')

    body = cast(str, r.json()['body'])
    return _pluck_feature_pacts(body)