Name: developers-account-mapper
Owner: Wantedly, Inc.
Description: Convert a username to other account usernames associated with the user.
Created: 2016-12-13 06:50:01.0
Updated: 2018-05-17 21:40:05.0
Pushed: 2018-02-06 09:00:10.0
Size: 91
Language: Go
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Manage developers' accounts list.
velopers-account-mapper to-slack-mention potsbo
XXXXXXX|shimpei>
Convert a key username, which is recommended to be unique among the developers group, to other username. Currently, we support Slack and GitHub.
Especially about Slack, developers-account-mapper is able to fetch Slack ID by Slack username and output it as a Slack mention format.
One DynamoDB tables named DevelopersAccountMap
has to be created.
DevelopersAccountMap
table|Key|Type| | |—|—-|—| |LoginName|String|Primary key|
In Terraform, you can create the table with below.
urce "aws_dynamodb_table" "developers-account-map" {
me = "DevelopersAccountMap"
ad_capacity = 5 # or anything you want
ite_capacity = 5 # or anything you want
sh_key = "LoginName"
tribute {
name = "LoginName"
type = "S"
In addition, AWS_ACCESS_KEY_ID
, AWS_SECRET_ACCESS_KEY
, AWS_REGION
and SLACK_API_TOKEN
must be set at your shell.
This IAM user/role must be allowed to read/write the DynamoDB table above.
e: developers-account-mapper [--version] [--help] <command> [<args>]
lable commands are:
delete Delete record with <login_name>
exec Set account information as env vars and exec commands
list List mapping of <login_name> and mapped accounts
register Register LoginName and other accounts mapping
to-github-name Get <github_username> from <login_name>
to-slack-mention Get <slack_mention> from <login_name>
version Print developers-account-mapper version and quit
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/developers-account-mapper \
ommand>
To install, use go get
:
get -d github.com/wantedly/developers-account-mapper
go test ./...
command and confirm that it passesgofmt -s