dev-cmd/contributions: Only count approving reviews
- The `reviewed-by` filter retrieved all reviews for a user, including those they'd added to their own PRs. Since it's impossible to click the "approve" button on one's own PR, filter this to `review:approved` to get "further project goals" kinds of reviews. - Suggested in https://github.com/Homebrew/brew/pull/14813#discussion_r1118696385.
This commit is contained in:
parent
eeadcc8ded
commit
b8b7e6350d
@ -172,7 +172,14 @@ module Homebrew
|
|||||||
data[repo] = {
|
data[repo] = {
|
||||||
commits: GitHub.repo_commit_count_for_user(repo_full_name, person, args),
|
commits: GitHub.repo_commit_count_for_user(repo_full_name, person, args),
|
||||||
coauthorships: git_log_trailers_cmd(T.must(repo_path), person, "Co-authored-by", args),
|
coauthorships: git_log_trailers_cmd(T.must(repo_path), person, "Co-authored-by", args),
|
||||||
reviews: GitHub.count_issues("", is: "pr", repo: repo_full_name, reviewed_by: person, args: args),
|
reviews: GitHub.count_issues(
|
||||||
|
"",
|
||||||
|
is: "pr",
|
||||||
|
repo: repo_full_name,
|
||||||
|
reviewed_by: person,
|
||||||
|
review: "approved",
|
||||||
|
args: args,
|
||||||
|
),
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user