Skip to content
This repository has been archived by the owner on Jul 29, 2023. It is now read-only.

[BUG] Incorrect counting of merged and open PRs #50

Open
ashwaniYDV opened this issue Mar 21, 2019 · 3 comments
Open

[BUG] Incorrect counting of merged and open PRs #50

ashwaniYDV opened this issue Mar 21, 2019 · 3 comments
Labels
bug Something isn't working

Comments

@ashwaniYDV
Copy link

Describe the bug

My 2 prs are merged in Rocket.Chat but it only shows 1 merged

@shubhsherl
Copy link
Owner

@ashwaniYDV Thank you for reporting! There are some edge cases. One of your PR(let PR_1) is merged before PR_2, although PR_2 was created before PR_1. We will fix it soon.

@shiqimei
Copy link

@ashwaniYDV Thank you for reporting! There are some edge cases. One of your PR(let PR_1) is merged before PR_2, although PR_2 was created before PR_1. We will fix it soon.

This bug is still existing. Do you need a hand?

@shubhsherl
Copy link
Owner

@lolimay Sure

Current workflow-

  • lastMergedPR, lastOpenPR, lastIssue, which keeps track of the last created_at of corresponding data for a user of a given repo.
  • Refresh will fetch all the repo of org -> fetch total_issue_count of marked repo -> check if there is the difference between the total_issue_count.
  • If there is a difference, (let n be that difference) fetch last n issues and pulls, and update, if the stored created_at is less than fetched created_at

But storing only created_at lead to the bug which we are facing right now.
Proposed changes to fix the bug is here(pull #57).
Feel free to propose any approach which can fix the miscounting.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants