Repository navigation
Show approvals against the required count on pull requests #39865
cck197-caprx
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Problem
My team's repository requires 3 approvals on every pull request, and GitHub blocks the merge until it has them. T3 Code shows the review decision ("Approved", "Awaiting review") but not how many approvals a pull request has or needs. To check, I open the pull request on GitHub.
The PR panel has an approval count on the Timeline tab, but it skips approvals given before the last push. GitHub still counts those approvals unless the repository dismisses stale reviews. On one of my pull requests, the panel showed no approvals while GitHub counted 3 of 3 and allowed the merge.
Proposal
Show approvals against the required count, for example "2/3", beside the review decision in these places:
The count is grey until it meets the requirement, then green. If the branch requires no approvals, T3 Code shows the count alone.
(I replaced the titles, names and repository in the screenshots.)
How it works on GitHub
latestOpinionatedReviews(writersOnly: true)returns the approvals that GitHub counts toward the requirement.baseRef.refUpdateRule.requiredApprovingReviewCountreturns the required count. A user without admin rights can read it, whereasbranchProtectionRulereturns null for that user.I tested a repository that uses classic branch protection. I have not tested a repository that uses rulesets.
Status
I have a working branch with tests. If a maintainer wants it, I can open a PR.
All reactions