psikai/GitHub to Slack Lookup
Resolve a GitHub username to a Slack user ID on-the-fly. No mapping file required. Email-first match, name-search fallback, JSON overrides for edge cases.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| github-username | The GitHub login to resolve. Defaults to `github.actor` (the user who triggered the workflow). Override with e.g. the PR author login when running on `workflow_run` or pulling from a different event. | no | ${{ github.actor }} |
| slack-token | Slack token with scopes `users:read` and `users:read.email`. A bot token (xoxb-) works. | yes | — |
| github-token | GitHub token used to read the user profile (`GET /users/{login}`). The default `secrets.GITHUB_TOKEN` is sufficient. | no | ${{ github.token }} |
| email-domain | Optional fallback corporate email domain (e.g. `coalesce.io`). Only used when the user has no commit history in the calling repo AND no public email — in that case, the action derives `{first}.{last}@<domain>` from the GitHub `name` field and tries one more Slack lookup. Safe to omit for most repos. | no | "" |
| overrides | Optional JSON object mapping GitHub login → Slack user ID, applied before any lookup. Example: `{"mhagglund":"U07NK4YPC02","beckjake":"U03PR4KH51R"}`. Useful for renamed accounts or name-change edge cases. | no | {} |
| fallback-mention-format | Template returned as `mention` output when no Slack user is found. `{login}` is substituted with the GitHub username. | no | `@{login}` _(Slack ID not found — add yourself to the org Slack or contact infra)_ |
Outputs
| name | description |
|---|---|
| slack-id | Resolved Slack user ID (e.g. `U05UCB72807`), or empty string if no match. |
| found | `true` if a Slack user was matched, else `false`. |
| match-method | `override` | `email-public` | `email-derived` | `name-search` | `none`. |
| mention | `<@U123ABC>` when found (renders as a Slack mention), otherwise the rendered `fallback-mention-format`. Drop this directly into a Slack message body. |