https://github.com/scribd/find-slack-user-action
GitHub Action that retrieves a Slack username for the author of the most recent commit (or provided email).
https://github.com/scribd/find-slack-user-action
javascript managed-by-terraform mobile-build-tooling
Last synced: about 1 month ago
JSON representation
GitHub Action that retrieves a Slack username for the author of the most recent commit (or provided email).
- Host: GitHub
- URL: https://github.com/scribd/find-slack-user-action
- Owner: scribd
- License: mit
- Created: 2021-01-08T19:38:13.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-08-02T20:08:53.000Z (10 months ago)
- Last Synced: 2025-04-11T15:48:55.895Z (about 1 month ago)
- Topics: javascript, managed-by-terraform, mobile-build-tooling
- Language: JavaScript
- Homepage: https://github.com/scribd/find-slack-user-action
- Size: 127 KB
- Stars: 10
- Watchers: 4
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Find Slack User Action
GitHub Action that retrieves a Slack username for the author of the most recent commit (or provided email).
## Example usage
```yaml
- name: Find Slack user
id: find-slack-user
uses: scribd/find-slack-user-action@v1
with:
slack-token: ${{ secrets.SLACK_API_TOKEN }}- name: Print Slack user
run: echo "${{ steps.find-slack-user.outputs.username }}"- name: Mention the user in Slack
uses: archive/[email protected]
with:
slack-function: send-message
slack-bot-user-oauth-access-token: ${{ secrets.SLACK_API_TOKEN }}
slack-channel: ABC123
slack-text: |
"Hello, <@${{ steps.find-slack-user.outputs.member-id }}>!"
```## Inputs
### `email`
**Required** The email to convert to slack user. *Defaults to whomever pushed the last commit*
### `slack-token`
**Required** The Slack API token.
### `default-username`
The username to use if the email address does not match a Slack user.
### `default-member-id`
The member ID to use if the email address does not match a Slack user.
### `include-at-symbol`
Include @ as a prefix to the found user. *Defaults to false*
## Outputs
### `username`
The retrieved Slack username.
### `member-id`
The retrieved Slack user's member ID. This is what you'll use to [mention your user](https://api.slack.com/reference/surfaces/formatting#mentioning-users):
> Hey <@U024BE7LH>, thanks for submitting your report.### `found-user`
Boolean indicating if a matching Slack username was found.
## Permissions
You'll need to provide the following permissions for the slack bot:
- https://api.slack.com/scopes/users:read.email