ubiquity-os-marketplace / text-conversation-rewards

1 stars 27 forks source link

Change ts-retry to Octokit plugin retry #66

Closed gentlementlegen closed 4 months ago

gentlementlegen commented 4 months ago

We should use the official Octokit plugin to handle retries instead of a manual retry tool.

          actually there is an official octokit plugin [plugin-retry](https://github.com/octokit/plugin-retry.js) that handles retries for all octokit requests - we are already using this in the kernel

Originally posted by @whilefoo in https://github.com/ubiquibot/conversation-rewards/issues/63#issuecomment-2239255101

ubiquibot[bot] commented 4 months ago

@whilefoo the deadline is at 2024-07-23T09:18:13.120Z

ubiquibot[bot] commented 4 months ago
+ Evaluating results. Please wait...
ubiquibot-dev[bot] commented 4 months ago

[ 27.96 WXDAI ]

@whilefoo
Contributions Overview
View Contribution Count Reward
Issue Task 1 25
Review Comment 5 2.96
Conversation Incentives
Comment Formatting Relevance Reward
resolves #66
0
content:
  p:
    count: 2
    score: 1
wordValue: 0
formattingMultiplier: 0
- -
I formatted it with prettier, I'm guessing it wasn't formatted b…
4.4
content:
  p:
    count: 11
    score: 1
wordValue: 0.2
formattingMultiplier: 2
- -
we can also use `.toNumber()`
2.4
content:
  p:
    count: 5
    score: 1
  code:
    count: 1
    score: 1
wordValue: 0.2
formattingMultiplier: 2
- -
No, but I think it doesn't make sense to post on every retry bec…
14.8
content:
  p:
    count: 37
    score: 1
wordValue: 0.2
formattingMultiplier: 2
0.2 2.96
@gentlementlegen I think something changed and now tests are fai…
129.6
content:
  p:
    count: 197
    score: 1
  code:
    count: 127
    score: 1
wordValue: 0.2
formattingMultiplier: 2
- -

[ 4.64 WXDAI ]

@gentlementlegen
Contributions Overview
View Contribution Count Reward
Issue Specification 1 2.82
Review Comment 5 1.82
Conversation Incentives
Comment Formatting Relevance Reward
We should use the official Octokit plugin to handle retries inst…
14.10000000000000188
content:
  p:
    count: 46
    score: 1
  a:
    count: 1
    score: 1
  em:
    count: 6
    score: 0
wordValue: 0.1
formattingMultiplier: 3
0.2 2.82
Maybe would be nice to wrap with `{}` to avoid mistakes.
1.2
content:
  p:
    count: 11
    score: 1
  code:
    count: 1
    score: 1
wordValue: 0.1
formattingMultiplier: 1
0.5 0.6
Since you removed this, what happens on retry, is any comment po…
1.7
content:
  p:
    count: 17
    score: 1
wordValue: 0.1
formattingMultiplier: 1
0.1 0.17
@whilefoo It must be because I figured out yesterday that if a u…
8.1
content:
  p:
    count: 81
    score: 1
wordValue: 0.1
formattingMultiplier: 1
0.1 0.81
@whilefoo The logic works however the posted message is wrong ([…
2.4
content:
  p:
    count: 21
    score: 1
  a:
    count: 3
    score: 1
wordValue: 0.1
formattingMultiplier: 1
0.1 0.24
Seems to work fine: https://github.com/Meniole/conversation-rewa…
0.5
content:
  p:
    count: 5
    score: 1
wordValue: 0.1
formattingMultiplier: 1
- -

[ 0 WXDAI ]

@0x4007
Contributions Overview
View Contribution Count Reward
Conversation Incentives
Comment Formatting Relevance Reward
ubiquibot[bot] commented 4 months ago

[ 35.6 WXDAI ]

@gentlementlegen
Contributions Overview
ViewContributionCountReward
IssueSpecification110.4
ReviewComment325.2
Conversation Incentives
CommentFormattingRelevanceReward
We should use the official Octokit plugin to handle retries inst...
10.4
code:
  count: 1
  score: "1"
  words: 0
110.4
@whilefoo It must be because I figured out yesterday that if a u...
16.20.8316.2
@whilefoo The logic works however the posted message is wrong ([...
6.2
a:
  count: 1
  score: "2"
  words: 3
0.8156.2
Seems to work fine: https://github.com/Meniole/conversation-rewa...
2.80.6252.8

[ 73 WXDAI ]

@whilefoo
Contributions Overview
ViewContributionCountReward
IssueTask125
ReviewComment124
ReviewComment124
Conversation Incentives
CommentFormattingRelevanceReward
@gentlementlegen I think something changed and now tests are fai...
24
code:
  count: 3
  score: "3"
  words: 2
0.6724
@gentlementlegen I think something changed and now tests are fai...
24
code:
  count: 3
  score: "3"
  words: 2
0.6724
0x4007 commented 4 months ago

@gentlementlegen 0 WXDAI isn't right. It shouldn't display this in the first place. Also I'm unsure how that could have happened at all. Is it for some type of comment?

gentlementlegen commented 4 months ago

@0x4007 I think the comment it picked up was https://github.com/ubiquibot/conversation-rewards/pull/67#pullrequestreview-2195572555 but somehow it is broken.

0x4007 commented 4 months ago

@0x4007 I think the comment it picked up was #67 (review) but somehow it is broken.

I am unsure of how GitHub technically refers to this object/entity from within its API, but when you post any "review state" you can associate a comment with it as well. Let's be sure to parse that.