inspired by https://github.com/kawahara/github2slack-lambda
- convert GitHub mention to Slack mention
- reviewers
- assignees
- issue / pr comment
key | value | default | required |
---|---|---|---|
account_map | A object with key of github account and value of slack account | - | o |
repository_map | A object with key of github repository and value of slack channel | - | o |
ignore_event_map | A object with key of github event and value of array of action for github event | - |
sample
{
"account_map": {
"kotatsu360": "tmitsuno"
},
"repository\_map": {
"^gomashio": "#gomashio-dev",
".*": "#general"
},
"ignore_event_map": {
"issue_comment": [
"edited"
]
}
}
GitHub -> Amazon API Gateway -> AWS Lambda -> Slack
- create Slack App
- set Scope
- install Slack App to your Slack Team
- set OAuth Access Token to SSM SecureString
- launch gomashio
- set SSM Parameter Name to
EncryptedTokenName
- set SSM Parameter Name to
- Note
ApiGatewayRestApi
what is CFn Resource Name. - set Endpoint URL to your GitHub Repository
https://<RestApi ID>.execute-api.<Region>.amazonaws.com/production/
- edit
<gomashio root>/config/config.json
zip -r index.zip <gomashio root>/
- upload lambda
- Basic Usage > initialize api gateway / lambda function
- launch gomachio-ci
- set FunctionStackName ( default: gomashio )
- Note
S3BucketCodePipelineSource
what is CFn Resource Name. - create
IAMUserCI
Access Token - set Access Token to CI
- set
AWS_DEFAULT_REGION
to CI - set
S3_BUCKET_CODE_PIPELINE_SOURCE
to CI
- edit
<gomashio root>/config/config.json
- merge or push master branch
- remove gomashio-ci-stack from CFn
- remove gomashio-stack from CFn
- remove gomashio-ci-role from IAM
<gomashio-ci-stack name>-IAMRoleCloudFormation-<Random string>
This software is released under the MIT License, see LICENSE