update-slack-users

Installation
SKILL.md

Update the GitHub → Slack user map

.github/slack-users.json maps GitHub logins to Slack member IDs:

{
  "octocat": "U012AB3CD4E"
}

CI alerts look GitHub logins up in this file. One example is the test-tier escape alert built by scripts/test-tiers/attribute.mjs. A listed login becomes a Slack tag (<@U012AB3CD4E>), and an unlisted one is printed as a plain @login. So a missing entry is harmless, but a wrong entry tags the wrong person. Leave someone out rather than guess.

Who an alert tags: the author of the PR that broke something. When a bot opened that PR, the alert tags a person instead: the human who merged it, then the humans who approved it, then the human credited on the most commits (including Co-authored-by trailers). It falls back to @here only when it can't tell who the person is. So the map needs everyone who authors, merges or approves PRs on main, everyone co-credited on main, and everyone credited on a bot PR's own commits.

What you need

  • The workspace's Slack user list, from someone with a token that has the users:read scope. That is the only scope the steps below need: matching never uses emails, so users:read.email isn't needed. The token holder can run step 2 and hand you the resulting file, or set SLACK_TOKEN in your environment. Never print the token, write it to a file, or put it in a commit or PR.
  • gh, authenticated with read access to this repo, and jq.
Installs
1
GitHub Stars
29.9K
First Seen
5 days ago