review_ratio: Review to pull request ratio#
The reviews a person gave in the project for each pull request they opened and did not close themselves.
It is reviews_given / (pull_requests_opened - own_pull_requests_closed),
made of those states. Without such pull requests, it is infinite with reviews,
and 0 without. The condition review_ratio: Review to pull request ratio
checks it.
It is observed on a person in a project: the author of a pull request, or a person of GitHub, counted in all repositories of the project that the viewer sees. While the data of a repository of the project is not complete, it is not known yet.
Inputs#
It has the inputs of the states it is made of:
Name |
Type |
Required |
What it is |
|---|---|---|---|
|
|
no, all of them |
The kinds of reviews that count: |
Data#
The update of the repository reads in the background:
issueWhether the pull request is open, closed or merged. Permissions of the GitHub App:
pull_requests: read; webhooks:pull_request.reviewsThe reviews of the pull requests and who closed them. Permissions of the GitHub App:
pull_requests: read; webhooks:pull_request_review,pull_request.
API reference#
- class pycal_dashboard.conditions.state.review_ratio.ReviewRatio#
Bases:
PersonStateThe reviews a person gave for each pull request of theirs that others had to look at.
It is
reviews_given / (pull_requests_opened - own_pull_requests_closed), made of those states (parts), whose inputs it has:kinds, the kinds of reviews that count. Without such pull requests, it is infinite with reviews, and 0 without.- classmethod measure(person, scope, values)#
Reviews given / (pull requests opened - own pull requests closed).
- Parameters:
person – The person.
scope – The repositories of the project.
values – The inputs of its parts, such as
kinds.
- Returns:
The ratio;
infwith reviews but no such pull requests.