Skip to content

feat: added relay subsidy balance tracker script and workflow#211

Merged
Matt561 merged 4 commits intomainfrom
feat/relay-subsidy-slack-bot
Jan 30, 2026
Merged

feat: added relay subsidy balance tracker script and workflow#211
Matt561 merged 4 commits intomainfrom
feat/relay-subsidy-slack-bot

Conversation

@Matt561
Copy link
Contributor

@Matt561 Matt561 commented Jan 29, 2026

This PR adds a workflow to fetch the Relay subsidy balance and posts it to Slack. This is used by the mUSD/Earn team


Note

Low Risk
Low risk: adds a new scheduled GitHub Actions workflow and a standalone Node script; main impact is external calls to Relay/Slack and potential alert noise if misconfigured.

Overview
Adds a new scheduled/dispatchable workflow, post-relay-subsidy-balance, that generates a Slack Incoming Webhook payload and posts Relay subsidy balance updates to Slack every 12 hours.

Introduces .github/scripts/post-relay-subsidy-balance.mjs to fetch balances from Relay, sum amountUsd, apply configurable alert thresholds/timeouts via env vars, and emit a Block Kit message that flags low balances and mentions the top-up team.

Updates CHANGELOG.md to record the new workflow.

Written by Cursor Bugbot for commit a720ed2. This will update automatically on new commits. Configure here.

@Matt561 Matt561 force-pushed the feat/relay-subsidy-slack-bot branch 2 times, most recently from 4321c89 to a7fd490 Compare January 30, 2026 00:13
@Matt561 Matt561 requested a review from mcmire January 30, 2026 00:18
@Matt561 Matt561 force-pushed the feat/relay-subsidy-slack-bot branch from a7fd490 to 41d62f2 Compare January 30, 2026 00:19
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Copy link
Contributor

@mcmire mcmire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had a comment below about the workflow file.

Can you add an entry to CHANGELOG.md as well?

mcmire
mcmire previously approved these changes Jan 30, 2026
Copy link
Contributor

@mcmire mcmire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a comment but it is non-blocking. LGTM.

@Matt561 Matt561 requested a review from mcmire January 30, 2026 15:40
CHANGELOG.md Outdated

### Added

- Add workflow **post-relay-subsidy-balance** to post Relay subsidy balance reports to Slack (via `.github/workflows/post-relay-subsidy-balance.yml` and `.github/scripts/post-relay-subsidy-balance.mjs`)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah good memory, I'd forgotten about this.

One more thing, can you add a link to the current PR to this entry? This way we know where it came from.

Suggested change
- Add workflow **post-relay-subsidy-balance** to post Relay subsidy balance reports to Slack (via `.github/workflows/post-relay-subsidy-balance.yml` and `.github/scripts/post-relay-subsidy-balance.mjs`)
- Add workflow **post-relay-subsidy-balance** to post Relay subsidy balance reports to Slack (via `.github/workflows/post-relay-subsidy-balance.yml` and `.github/scripts/post-relay-subsidy-balance.mjs`) ([#211](https://github.com/MetaMask/github-tools/pull/211))

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's hilarious. I had the same thought and added it locally but never saved my file 😂.

One moment!

@Matt561 Matt561 requested a review from mcmire January 30, 2026 15:53
Copy link
Contributor

@mcmire mcmire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@Matt561 Matt561 merged commit 563e3d6 into main Jan 30, 2026
21 checks passed
@Matt561 Matt561 deleted the feat/relay-subsidy-slack-bot branch January 30, 2026 16:05
@christopherferreira9 christopherferreira9 mentioned this pull request Feb 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants