-
Notifications
You must be signed in to change notification settings - Fork 733
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
Make sure we refresh the PRs with the PR API (and not the issues API) #1810
Conversation
When a PR was loaded from a search, the refresh() method was reloading information from the issues API, which would lead to some information not being refreshed properly, typically the mergeable state. Related to hub4j#1779 (comment)
@bitwiseman I created 3 PRs to fix some issues with There might be some conflicts given I added some tests to the same place but they should be easy to fix. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1810 +/- ##
============================================
+ Coverage 80.66% 80.69% +0.02%
Complexity 2342 2342
============================================
Files 220 220
Lines 7082 7085 +3
Branches 379 378 -1
============================================
+ Hits 5713 5717 +4
Misses 1132 1132
+ Partials 237 236 -1 ☔ View full report in Codecov by Sentry. |
// wait a bit for the mergeable state to get populated | ||
Thread.sleep(5000); |
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.
Please implement await()
in some form instead of hard sleeps. Waiting is only needed when recording, not during CI tests.
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 broader problem. Filed #1815.
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.
Yeah I agree on that. I actually asked myself that and saw that there was some Thread.sleep
calls above so I supposed we decided to live with them. I'll try to find some cycles to clean this up.
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.
The thread sleeps are a broader problem. If you want to switch to await, cool. If not, merge freely.
When a PR was loaded from a search, the refresh() method was reloading information from the issues API, which would lead to some information not being refreshed properly, typically the mergeable state.
Related to #1779 (comment)