Skip to content

bug: low-priority time, db trapping older pr forever #84

Description

@notamitgamer

so, the file src/tools/numberofdays.js calculates the no of days after a reviewer add status: low priority label.

but there is a problem, it doesn't calculate properly, what it does is written below:

  1. first of all it uses Math.round(), this means a time difference of 2.5 days (60 hours) rounds up to 3. and when the hourly cron job in src/index.js runs, it evaluates this rounded number as >= 3 and removes the label. and the committer get away faster.

  2. also, there is another big bug with how it handles multiple PRs. say i get a low priority on a PR, and the next day i make another PR and get low priority again(auto by the bot). what happens is src/webhooks/opened.js just overwrites my old database entry with the new PR number and resets the timer to the new PR's creation time. if i just keep making a new PR every single day, the timer keeps resetting to 0, so i will never actually hit the 72 hours. even worse, because the database only remembers my latest PR, when the 3 days finally pass(say i didn't made any pr), it will only remove the label from that last PR. all my older PRs will be stuck with the low priority label forever because the bot forgot about them.




fix pr: #85

written by human, yeah, i know my grammar and spelling is like a 10 year old student, i know, hmph!
what? do you have any problem? wanna fight?????
come here, man to man, hand to hand, come on.....


Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions