-
Notifications
You must be signed in to change notification settings - Fork 8
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
Tip referendum creation link #151
Conversation
createReferendumLink = tipLink.extrinsicCreationLink; | ||
} catch (e) { | ||
bot.log.error("Failed to encode and create a link to tip referendum creation."); | ||
bot.log.error(e.message); |
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.
if that's failed to create, then we have to return success:false
and send this error to matrix and to user in PR?
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.
I decided not to do it, because we have the fallback in the form of a link to Polkassembly docs, so this is not a critical issue I think.
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.
ok, so if this happens 100% of the time or intermittently , and this link will never be created, do we need to know about it and chime in - like investigate why it's failed to create and followup?
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.
True. We still get the regular matrix notification that a tip is requested - I usually look at it anyway so I can see it that way that something is wrong.
Made sure it continues to work locally: https://github.com/paritytech-stg/playground/pull/24#issuecomment-2074758454 |
Closes #150
If the user is not in the privileged GitHub team, the bot will try to produce a tip referendum creation link instead.
To achieve it, I extracted some functionality like preparing an extrinsic to separate functions.
If it works, it looks like this.
If there is an issue with generating the PolkadotJS-Apps link, it will fall back to a message without, like this.