chofnar / release-bot

release-bot - A Telegram Bot (@prgitrelbot) that notifies you of new Github releases
MIT License
24 stars 2 forks source link

Spamming one release #115

Closed UltraFeed closed 9 months ago

UltraFeed commented 10 months ago

bot spamming one release, "see all repos" button not responding image

chofnar commented 9 months ago

Sorry, I was away for the holidays and did not notice your issue. Does this still happen? At a first inspection I don't see anything wrong with the repo or the database

UltraFeed commented 9 months ago

I blocked bot, because it was spamming, now restarted it and "see all repos" still unresponsive.

Upd: still spamming one release Screenshot_20240106-161546_Plus

Upd2: bot sent another release, once, as expected

chofnar commented 9 months ago

I did some updates to the logic alongside some cleanup. If you're still willing to test it, please have another go. You will have to add the repo again though.

UltraFeed commented 9 months ago

Added repo again. Buttons are working, but this repo doesn't have "delete" or "enable pre releases" buttons

Screenshot_20240123-002555_AyuGram

chofnar commented 9 months ago

Can you give me a link to that repo, please?

UltraFeed commented 9 months ago

https://github.com/WSTxda/MicroG-RE

chofnar commented 9 months ago

I think this happens because of the amount of buttons in the message. I will need to implement some sort of pagination. For the moment, the buttons should show if you delete one or two of your other repos. I will implement this functionality in the coming days. Anyway, even if you don't see the buttons right now, you will still be notified, as the repo is registered in the database.

UltraFeed commented 9 months ago

Deleted one repo and buttons appeared. So the limit now is 25 repos.

chofnar commented 9 months ago

Hey, I implemented pagination for the repo list. The limit should be gone now. I also improved the navigation a bit. You will also hopefully find that the bot is a lot more responsive now, as it's running continuously now. Please let me know how this works for you :)

UltraFeed commented 9 months ago

I have 25 repos added. First and second page of list are working well, and I can switch between them, but when I try to switch to the third page, button "next" not responding. Maybe this bug happening because you are expecting list of 10 elements, but the last page could contain list from 1 to 10 elements?

Upd1: bot responding time has increased twice or more, according to my feelings. Upd2: added 5 more repos, so my total repos is 30. Still can't switch to the last page. Needs investigation.

Upd3: Also, I think that you should think about sorting of repos, for example: First step: sorting all repos by autor Second step: sorting all repos by their names (respecting sorting by autor)

Example unsorted:

Alex/website Alex/app John/application John/tests Alex/parser John/bot

Example sorted:

Alex/app Alex/parser Alex/website John/application John/bot John/tests

Upd4: make "pre", "delete", "latest release" buttons smaller and "autor/repo" button bigger if possible

chofnar commented 9 months ago
UltraFeed commented 9 months ago

Bot is running faster, you misunderstood me. Everything works as expected, so I'm closing the issue.