Skip to content
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

πŸ§‘β€πŸ”§ check payout bot for not paid PRs #2941

Closed
yangwao opened this issue May 4, 2022 · 15 comments
Closed

πŸ§‘β€πŸ”§ check payout bot for not paid PRs #2941

yangwao opened this issue May 4, 2022 · 15 comments
Assignees
Labels
$ ~<50usd πŸ§™β€β™€οΈ - bug-hunt p1 preventing everyone from using app paid pull-request has been paid

Comments

@yangwao
Copy link
Member

yangwao commented May 4, 2022

Seems some last PRs we're not paid out.
Last time I did nothing and gh webhook hit auto code gw well

Maybe add a reply if the payout bot at least received the request lol

edit
payout to @KngZhi
https://beta.kodadot.xyz/transfer?target=DaWoVNNhBTdqJ5iPN3UcaLeamkPpJeGWdrs8LhvX9TQbadc

https://github.com/kodadot/nft-gallery/pulls?q=is%3Apr+sort%3Aupdated-desc+is%3Amerged+-label%3Apaid+

Fix address matching

This one apparently doesn't work for

  • DaWoVNNhBTdqJ5iPN3UcaLeamkPpJeGWdrs8LhvX9TQbadc
  • 15YEYP65NQbmXu6LhTiEguW7A31so66Q1oXPfFNG1Dhu4Nd9
const lookupForAddress = /kodadot.xyz\/transfer\/\?target=\w[a-zA-Z0-9]{46}\b/g;
const matchAddress = /\w[a-zA-Z0-9]{46}\b/g;

Usual behaviour

Usually, logs look like it found the address in PR template

image

Haven't matched the address

image

Ref

  • kodadot/research#42

Check to pay out

@yangwao yangwao added p1 preventing everyone from using app πŸ§™β€β™€οΈ - bug-hunt labels May 4, 2022
@yangwao yangwao self-assigned this May 4, 2022
@yangwao yangwao closed this as completed May 4, 2022
@yangwao yangwao reopened this May 4, 2022
@yangwao yangwao added the $ ~<50usd label May 6, 2022
@KngZhi
Copy link
Contributor

KngZhi commented May 6, 2022

seems #2927 is also not working

@KngZhi
Copy link
Contributor

KngZhi commented May 6, 2022

Okay, I will check this naughty πŸ€–οΈ.. beep...

@yangwao yangwao assigned yangwao and KngZhi and unassigned yangwao May 6, 2022
@kodabot
Copy link
Collaborator

kodabot commented May 6, 2022

ASSIGNED - @KngZhi πŸ”’ LOCKED -> Saturday, May 7th 2022, 08:28:29 UTC -> 24 hours

@KngZhi
Copy link
Contributor

KngZhi commented May 6, 2022

const lookupForAddress = /kodadot\.xyz\/transfer\?target=\w[a-zA-Z0-9]{46,}\b/g
const matchAddress = /\w[a-zA-Z0-9]{46,}\b/g;

const links = [
"https://beta.kodadot.xyz/transfer?target=DaWoVNNhBTdqJ5iPN3UcaLeamkPpJeGWdrs8LhvX9TQbadc",
"https://beta.kodadot.xyz/transfer?target=15YEYP65NQbmXu6LhTiEguW7A31so66Q1oXPfFNG1Dhu4Nd9"
]

links.forEach(link => {
   console.log(link.match(lookupForAddress)[0], link.match(matchAddress)[0])
})

@yangwao paste to console, you can see the result.

@yangwao
Copy link
Member Author

yangwao commented May 6, 2022

you added , after 46 ? or I don't see what you have changed

@KngZhi
Copy link
Contributor

KngZhi commented May 6, 2022

Out of computer, will check later.

@KngZhi
Copy link
Contributor

KngZhi commented May 6, 2022

New Regex:

const lookupForAddress = /kodadot\.xyz\/transfer\/?\?target=\w[a-zA-Z0-9]{46,}\b/g
const matchAddress = /\w[a-zA-Z0-9]{46,}\b/g

Reason for this bug:
the COPY REWARD ME BUTTON would return
https://beta.kodadot.xyz/transfer?target=DaWoVNNhBTdqJ5iPN3UcaLeamkPpJeGWdrs8LhvX9TQbadc&usdamount=0&donation=true

  1. the transfer does not append /, but the original regex would require that, transfer\/
  2. for 15YEYP65NQbmXu6LhTiEguW7A31so66Q1oXPfFNG1Dhu4Nd9, it has 48 lengths, out of scope, thus can not match

The difference with the original regex:

  1. , to enlarge hash address length, match address like or even longer 15YEYP65NQbmXu6LhTiEguW7A31so66Q1oXPfFNG1Dhu4Nd9
  2. transfer\/? make \/ optional
  3. kodadot.xyz should be kodadot\.xzy, to avoid the potential bugs. Otherwise, like kodadot2xyz or any char would match for that.

You can check here for script and result

@yangwao
Copy link
Member Author

yangwao commented May 6, 2022

seems like it's working! #2884 (comment)

@KngZhi
Copy link
Contributor

KngZhi commented May 6, 2022

Good πŸ€–οΈ! hahahaha, beep boop.

@kodabot
Copy link
Collaborator

kodabot commented May 7, 2022

ASSIGNMENT EXPIRED - @KngZhi has been unassigned.

@KngZhi
Copy link
Contributor

KngZhi commented May 8, 2022

hey @yangwao gonna need more infos, I check it at the console, works well.

image

@yangwao
Copy link
Member Author

yangwao commented May 8, 2022

the lookupForAddress should be /kodadot\.xyz\/transfer\/?\?target=\w[a-zA-Z0-9]{46,}\b/g

seems passed here #2970 (comment)

@KngZhi
Copy link
Contributor

KngZhi commented May 15, 2022

@yangwao is it okay to close?

@yangwao
Copy link
Member Author

yangwao commented May 15, 2022

I guess so, I've used your address from last PR
pay 50 usd

@yangwao
Copy link
Member Author

yangwao commented May 15, 2022

😍 Perfect, I’ve sent the payout
πŸ’΅ $50 @ 71.07 USD/KSM ~ 0.704 $KSM
πŸ§— DaWoVNNhBTdqJ5iPN3UcaLeamkPpJeGWdrs8LhvX9TQbadc
πŸ”— 0xd6475c5f4b48ae72835fa09136436ce5504859b077390e715795fbc1ac310d14

πŸͺ… Let’s grab another issue and get rewarded!
πŸͺ„ github.com/kodadot/nft-gallery/issues

@yangwao yangwao added the paid pull-request has been paid label May 15, 2022
@yangwao yangwao closed this as completed May 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
$ ~<50usd πŸ§™β€β™€οΈ - bug-hunt p1 preventing everyone from using app paid pull-request has been paid
Projects
None yet
Development

No branches or pull requests

3 participants