-
-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: add calculation to display correct pull request velocity #47
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Compliance Checks Passed!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great!! 👏🏼 I think this needs just abit more to be in line with what we surface in the insights app. For example, on Nick's profile:
and in the pizza show
:
So, the 80
in this case should really be "80% merged" which represents the percent of merged prs within the given time frame. And we should also surface 1d
which represents that averge velocity of prs to merge. You should be able to pull off the
m.userInfo.RecentPullRequestVelocityCount
which gets surfaced off the API.
So something like this (ignore the poorly formatted table 🙈 )?
│ nickytonline │
│ │
│ 🔥 PR Velocity (30d): 1d - 80% merged 📄 Issues: 50 │
│ │
│ │
│ 🚀 PR Count (30d): 17 🔨 Maintainer: true │
│ │
c23b330
to
5a17c5d
Compare
Thanks for the feedback! I understand better this metric. I always though it referred to the percentage, but reading through this issue was helpful refactor: update pr velocity indicator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🕺🏼
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📈
Description
This PR adds a calculation to get the correct pull request velocity percentage to display. It calculates the percentage with the same formula implemented by the
getPercent(total, count)
method. This approach is used indev-card
component viagetPercent(prTotal, mergedPrs)
to render the percentage in theVelocityPill
.https://github.com/open-sauced/app/blob/5b15a49d6dfbd371799d7dbf81cd5cbfef5e1d60/lib/utils/get-percent.ts#L1
What type of PR is this? (check all applicable)
Related Tickets & Documents
Fixes #45
Mobile & Desktop Screenshots/Recordings
Added tests?
Added to documentation?
[optional] Are there any post-deployment tasks we need to perform?
[optional] What gif best describes this PR or how it makes you feel?