polkadot-fellows/RFCs

Bot: Notify people about new fellowship referendas

Closed this issue ยท 19 comments

bkchr commented

We should have some bot that is notifying people about new fellowship referendas. The idea was that this bot is maybe posting to the fellowship channel or to some dedicated notifications channel. In a future version it would be also nice to ping people directly when a RFC they commented is put on for voting.

CC @Bullrich @mordamax

we have similar telegram bots for public referendas - @subvt_kusama_bot and @subvt_polkadot_bot
not sure if telegram works for everyone. can be matrix

bkchr commented

I'm personally against telegram :P But maybe if we have a bot that can work for telegram/matrix, I will not complain.

Where can this bot be found?

I would say matrix even have a higher priority since all our communication rooms set there now
Here the telagram's bot - https://github.com/helikon-labs/subvt-backend/tree/main/subvt-telegram-bot

Here's an initial draft of a matrix bot for referenda announcements, implemented on nodejs

https://github.com/pandres95/fellowship-referenda-bot


Update: Just pushed a couple of commits to update the look of it, making it also readable on mobile devices

Desktop view Mobile view

I believe that @rzadp has a bot that already interacts with voting and RFCs. I'll get in contact with him as maybe he can easily adapt it.

ggwpez commented

This is not restricted to RFC referendas, can we move this to https://github.com/polkadot-fellows/help-center ?

bkchr commented

This is not restricted to RFC referendas, can we move this to https://github.com/polkadot-fellows/help-center ?

As we don't want to have a general referenda bot (which probably already exist), I think it is fine to keep the discussion here. We want to improve the communication around the RFC proposals.

From what I've done so far with the Matrix box, here's what I consider are the next steps:

  • Defining the output format (here's a suggestion for how it may look like).
  • Setting up the announcements channel.
  • Setting up an account for the bot.
    • Set up the account.
    • Create an announcements channel.
    • Invite to the announcements channel.
  • Fixing an issue that makes the bot send unencrypted messages.
  • Filtering for RFC-related referenda (@olanod suggested creating a specific RFC track / another suggestion might be adding a tag on Subsquare).
    • Hint: Lookup the referendum preimage. If the remark contains RFC in it, then that's a RFC-related referendum.
  • Deploying the bot on a scheduler.
    • Once, twice a week, maybe?
    • Deploy on this repo as a scheduled GitHub Action.
    • Maybe building a small tool Use this repo's settings to handle the scheduling and the input variables.

Nice to have / Next version:

  • Keep stored the earliest ongoing referendum index, to optimize the fetching of referendum info.
  • More types of announcements
  • Listening to on-chain events to notify on votes
  • Talking to Subsquare guys to have a proper API (that doesn't depend on their Next build hash).

cc/ @bkchr


Update: changed deployment on serverless platform for schedule action within this repository (thanks to @bkchr for the suggestion).

bkchr commented
  • Maybe, deploy on a serverless platform where it doesn't cost too much

We could probably put it into an action in this repo?

Updates:

  • Now the Matrix Box it handles E2EE.
  • Now it's filtered by RFC remark
    Screenshot 2023-12-06 at 04 05 02
  • Now it keeps the earliest ongoing referendum index to reduce fetching time.

I think is safe to say we can discuss deployment. Wdyt @bkchr?

rzadp commented

we don't want to have a general referenda bot (which probably already exist)

Indeed - There are even email/telegram notifications about fellowship referenda right in Subsquare (no matrix support though):

So I understand that in this issue we want to focus on RFC referenda specifically.


@pandres95 I see you're on top of the matrix bot, but I don't see integration with github in your plan.
(Talking about this: ping people directly when a RFC they commented is put on for voting)
(I'm assuming we're talking about comments in PRs and pinging github handles)

We already have a github action in this repo that understands RFC PRs and is able to match them with corresponding ongoing referenda. I can work on extending this action with the functionality of posting updates in the PRs and pinging people - this could work in parallel to the matrix bot.

(Talking about this: ping people directly when a RFC they commented is put on for voting)
(I'm assuming we're talking about comments in PRs and pinging github handles)

The GitHub part is not that hard. We can always connect through GitHub Actions, triggered by PR comments and make the association between commenters and the actual referendum, and since both the github profiles and matrix users are tied to each member's identities (or at least, they should be, i.e. I haven't setup my GitHub profile into my identity yet), there's a chance of doing so.

The only question is: should those pings be via DMs, or via a threaded reply under the notifications room.

But yeah, this can be in parallel. The first part of scheduling notifications to everyone can always be a first release, an MVP of how that'd work in the future.

bkchr commented

I think is safe to say we can discuss deployment. Wdyt @bkchr?

What you need to know?

The idea was that this bot is maybe posting to the fellowship channel or to some dedicated notifications channel
In a future version it would be also nice to ping people directly when a RFC they commented is put on for voting.

ping people in DM? did you mean mention their GH handle or in matrix 1:1 ? If someone has an RFC PR open the conversations are already happening there, right? So if someone has commented on PR - they get notification (either push or email) and react, so they subscribe already via github.

What's missing for sure - is referenda status changes in scope of Open RFC PR - whether it's Submitted or Confirmed [rejected/approved], which could also potentially be tracked per PR via GitHub notifications. Then on status change - we could add comment IN the PR.
Why PR - because it already has a channel of communication (push/email) to author and to whoever commented (subscribed).
Why not DM - because it's not guaranteed that everyone who will ever submit RFC will have DM credentials set in identity/bio, so the comment in PR is more reliable source.

Re. sending to matrix channel - it could also be addition to comment in RFC PR, but what would be a goal?
As I understand (i could be wrong for sure) - If the referendum started - people need to act and vote, so would be good to post RFC-related proposals? or perhaps all kinds of referendums? I guess any fellowship referenda ideally deserve attention of voters once it's there, so limiting only to RFC type doesn't sound correct to me, but could be that currently that's the expectation though

  1. So for "commenters" - to notify PR subscribers that this RFC has put on Vote, and it's time to act - we could try to add some monitoring for the PRs additionally to rfc-action (paritytech/eng-automation#2 -> @rzadp)
  2. For Matrix - it could easily be the solution which @pandres95 build, and they could work in parallel. And either exclusively only RFCs or all of them to any desired channel

I think is safe to say we can discuss deployment. Wdyt @bkchr?

What you need to know?

Basically, whether it would be possible to set the bot using username/password, or an access token is preferred. Meanwhile, I'm working on building the GitHub Action to deploy the bot.

Aside from that, would be good to know who's the person on the matrix homeserver's end, so they would be able to do the following:

  • Setting up the announcements channel.
  • Setting up an account for the bot.
    • Set up the account.
    • Create an announcements channel.
    • Invite to the announcements channel.
bkchr commented

Aside from that, would be good to know who's the person on the matrix homeserver's end, so they would be able to do the following:

Matrix is a decentralized messaging solution. This means that anyone can create a channel (including you). This requires no special permissions.

Oh, I know that ๐Ÿ˜…

I was just wondering if there's anyone who can make it "official". But I guess that option of releasing the bot and channel by my own, and then using an invite link for everyone to join is possible, too.

I'll do that, then. Releasing tomorrow afternoon for the first announcement next Friday. ๐Ÿš€

Update: The bot is up!

  • Find the notifications channel here.
  • Also, the README has been updated.

cc/ @bkchr @Bullrich @mordamax @muharem

Additionally to #68 @Bullrich have added an auto-message on after confirmation RFC proposal with a command which is easy to copy & paste

Going forward, if it works as intended, we could let it auto-merge / close the PR accordingly to a result of a proposal, if that makes sense. For now it's still manual action to process

image

Thanks @Bullrich!