Name: slack-mention-converter
Owner: Wantedly, Inc.
Description: Convert login name or account name to Slack mention format.
Created: 2016-04-12 04:55:28.0
Updated: 2016-12-11 08:45:20.0
Pushed: 2017-01-26 10:14:00.0
Size: 7032
Language: Go
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This project is no longer actively maintained by Wantedly, Inc. Newly developed developers-account-mapper covers almost all features on this project. Please consider using this.
Convert login name or account name to Slack mention format.
ack-mention-converter to-slack-mention dtan4
2XXXXXX|dai>
Convert login name or account name to slack mention format. Mappings of login_name and account_name are stored at Amazon DynamoDB.
The most simple example usage is
ack-mention-converter register your_login_name your_slack_name
your_login_name:@your_slack_name added.
ack-mention-converter to-slack-mention your_login_name
2XXXXXX|your_slack_name>
2 DynamoDB tables named SlackNames
and SlackIDs
must be created.
SlackNames
table|Key|Type| | |—|—-|—| |LoginName|String|Primary key| |SlackName|String||
SlackIDs
table|Key|Type| | |—|—-|—| |SlackName|String|Primary key| |SlackID|String||
In addition, AWS_ACCESS_KEY_ID
, AWS_SECRET_ACCESS_KEY
and AWS_REGION
must be set at your shell. This IAM user/role must be allowed to read/write the DynamoDB tables above.
e: slack-mention-converter [--version] [--help] <command> [<args>]
lable commands are:
list List mapping of <login_name> and <slack_name>
register Register LoginName and SlackName mapping
slack-name-list List up slack users id and name mapping
to-slack-mention Get slack mention format from login name
to-slack-name Get slack name from login name
version Print slack-mention-converter version and quit
ke docker-build
er run --rm \
SLACK_API_TOKEN=<slack token get by https://api.slack.com/docs/oauth-test-tokens> \
AWS_ACCESS_KEY_ID=yourawsaccesskeyid \
AWS_SECRET_ACCESS_KEY=yourawssecretaccesskey \
AWS_REGION=ap-northeast-1 \
ay.io/wantedly/slack-mention-converter \
ommand>
To install, use go get
and make
:
get -d github.com/wantedly/slack-mention-converter
ke
ke install
go test ./...
command and confirm that it passesgofmt -s