-
Notifications
You must be signed in to change notification settings - Fork 15
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
feat: cancel the previous run when a new event occurs for the same PR #386
Conversation
✅ Deploy Preview for reviewbot-x ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #386 +/- ##
==========================================
- Coverage 36.01% 35.75% -0.27%
==========================================
Files 27 27
Lines 2335 2358 +23
==========================================
+ Hits 841 843 +2
- Misses 1369 1390 +21
Partials 125 125 ☔ View full report in Codecov by Sentry. |
2bedc6b
to
8edd44c
Compare
|
||
defer func() { | ||
select { | ||
case <-ctx.Done(): |
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.
defer 里面单纯的加个 delete 逻辑就好,应该不需要select
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.
当前一个事件的ctx 被取消,还是会执行defer func 内容,若不加 select ,即每次都会进行delete删除,导致该PR map内容为空,不符合预期
8edd44c
to
75e59b4
Compare
fix #177