emberpost
Introduction
emberpost keeps Slack aligned with the current PagerDuty on-call rotation. It reads a YAML schedule definition, resolves the active on-call users from PagerDuty, maps them to Slack users by email, and then updates the configured Slack channel.
Use it to post an on-call summary, update a channel topic, or keep a Slack user group in sync with the people currently carrying the pager. Schedule files can be marked as daily, weekly, or manual, which makes the same command safe to run from automation while only processing the rotations due for that run.
Start with examples/01-minimal.yaml for the smallest working schedule shape, then add channel topics, user groups, headers, or footers as needed.
Usage
Install the project and its dependencies with uv:
uv sync
Commands can then be run through uv run, which uses the project environment automatically. The --frequency flag is an automation guardrail: a weekly schedule is skipped during a daily run. Set slack.set_channel_topic: true to update a channel topic instead of posting a message.
Run a dry run before writing to Slack:
uv run emberpost --schedule-file schedules/oncall.yaml --frequency weekly --dry-run
Run the weekly schedule and update Slack:
uv run emberpost --schedule-file schedules/oncall.yaml --frequency weekly
Process more than one schedule file in a single run:
uv run emberpost --schedule-file schedules/oncall.yaml examples/03-full.yaml --frequency weekly
Run a manual schedule file:
uv run emberpost --schedule-file examples/01-minimal.yaml --frequency manual --dry-run
Run with more logging while troubleshooting:
uv run emberpost --schedule-file schedules/oncall.yaml --frequency weekly --dry-run --log-level DEBUG
Add slack_group_id under a schedule group heading to sync that heading's resolved users to a Slack user group:
pagerduty:
tenant: example.pagerduty.com
schedule_groups:
Platform Coverage:
slack_group_id: S0123456789
entries:
- schedule_id: PEXAMPLE1
label: "Primary Responder"
- schedule_id: PEXAMPLE2
label: "Backup Responder"
The top-level slack block is the default destination for every schedule group.
Any group can override slack_space, slack_channel_id, or
set_channel_topic; values omitted from the group inherit from the top-level
block:
pagerduty:
tenant: example.pagerduty.com
schedule_groups:
Platform Coverage:
entries:
- schedule_id: PEXAMPLE1
label: "Primary Responder"
Database Coverage:
slack_space: database-team.slack.com
slack_channel_id: C0987654321
set_channel_topic: true
entries:
- schedule_id: PEXAMPLE2
label: "Database Responder"
slack:
slack_space: example.slack.com
slack_channel_id: C0123456789
set_channel_topic: false
Here, Platform Coverage uses all three top-level defaults. Database Coverage
uses its own workspace and channel and updates that channel's topic.
Setting up your Slack Bot
Bot Information
This section is just an example manifest, to show what is needed to get the bot working for the posting use.
display_information:
name: Notification
description: Notification webhook/app
background_color: "#2c2d30"
features:
bot_user:
display_name: Notification
always_online: false
oauth_config:
scopes:
bot:
- channels:write.topic
- chat:write
- chat:write.customize
- chat:write.public
- files:read
- files:write
- users:read
- users:read.email
- groups:write.topic
- mpim:history
- im:write.topic
- mpim:write.topic
- usergroups:write
pkce_enabled: false
settings:
interactivity:
is_enabled: true
request_url: https://example.com/ignore
org_deploy_enabled: false
socket_mode_enabled: false
token_rotation_enabled: false
is_mcp_enabled: false
Create a slack app
- Set Up Your App
- Go to the Slack API portal.
- Click Create New App.
- Choose From scratch and give your app a name and select the workspace where it will be installed.
- Or if you are choosing to copy one of the above templates/manifests then you can choose From a manifest and speed up the process.
- Configure App Features
- Depending on what your app needs to do, you can enable features like:
- Bot Token: For sending messages and interacting with users.
- Event Subscriptions: To listen for events like messages or reactions.
- Depending on what your app needs to do, you can enable features like:
- Set Permissions (Scopes)
- Go to OAuth & Permissions.
- Add the necessary OAuth scopes (e.g., chat:write, commands, users:read).
- These define what your app is allowed to do in the workspace.
- Install the App
- Still in the OAuth & Permissions section, click "Install to Workspace".
- Authorize the app to access your workspace.
- A Slack Admin for your organization will need to review the request
- You’ll receive a Bot User OAuth Token once approved
- save this securely.
Setup GitHub Repository Slack Notification
- Create a slack app, if you haven't already
- Go to the GitHub repository → Select Settings → select Secrets and variables → Select Actions → Add these three secrets under New repository secret and under Dependabot
SLACK_BOT_TOKEN- This is the authentication token you receive after creating and installing your Slack app. It allows your app to interact with the Slack API and post messages as a bot.SLACK_CHANNEL_ID- The ID of the primary Slack channel where you want production alerts or notifications to be sent.- To find a channel ID, right-click on any Slack channel you have access to and select Copy then Copy link. The URL will look something like this:
https://xxxxx.slack.com/archives/Cxxxxx. The part at the end that starts with a 'C' is the channel ID you’ll need.
- To find a channel ID, right-click on any Slack channel you have access to and select Copy then Copy link. The URL will look something like this:
SLACK_CHANNEL_ID_TEST- An optional separate channel ID used for testing purposes. It's recommended to use this during development to avoid cluttering your main channel with test messages.
Metadata
Release files for emberpost 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| emberpost-0.2.0.tar.gz | 12.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| emberpost-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 27.5 kB
Release files / emberpost-0.2.0.tar.gz
| Download URL | emberpost-0.2.0.tar.gz |
|---|---|
| Size | 12.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bc2425f32acd37729582ad528c425c242e5f26da9d5a40b233170d43be10e8c5
|
|
BLAKE2b-256 checksum How to use checksums |
f595649624edeb08eb03b01d25a6438fabf105f09611a7eae7aea5f319320b9b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.15 {"installer":{"name":"uv","version":"0.12.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / emberpost-0.2.0-py3-none-any.whl
| Download URL | emberpost-0.2.0-py3-none-any.whl |
|---|---|
| Size | 15.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9d878ad9d6b09cd73388a36a86333abe2aa80fdbd41ddcceb7a4262f6970f9ae
|
|
BLAKE2b-256 checksum How to use checksums |
4e8d2d5e0113c5183ac580729303877dac1a1566250d71c1f2ae03e030f49af9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.15 {"installer":{"name":"uv","version":"0.12.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|