Returns the branch name corresponding to the specified ref name.
- get_repository_for_hook(repository_id, hosting_service_id, local_site_name, hooks_uuid=None)[source]¶
Returns a Repository for the given hook parameters.
- get_review_request_id(commit_message, server_url, commit_id=None, repository=None)[source]¶
Returns the review request ID matching the pushed commit.
We first use a regex (that can be overridden in settings_local.py) to try to find a matching review request ID in the commit message. If no match is found with the regex, we then try to find a review request with a matching commit ID.
We assume there is at most one review request associated with each commit. If a matching review request cannot be found, we return None.
- close_review_request(review_request, review_request_id, description)[source]¶
Closes the specified review request as submitted.
- close_all_review_requests(review_request_id_to_commits, local_site_name, repository, hosting_service_id)[source]¶
Closes each review request in the given dictionary as submitted.
The provided dictionary should map a review request ID (int) to commits associated with that review request ID (list of strings). Commits that are not associated with any review requests have the key None.