a node.js lambda function that publishes authorized github events to SNS
# clone this repository
$ git clone git@github.com/cludden/tf-github-webhooks.git
# if developing locally
$ cd tf-github-webhooks && nvm use && npm install- Clone it (
git clone git@github.com:cludden/tf-github-webhooks.git) - Create your feature branch (
git checkout -b my-new-feature) - Commit your changes using conventional changelog standards (
git commit -am 'feat: adds my new feature') - Push to the branch (
git push origin my-new-feature) - Ensure linting/security/tests are all passing
- Create new Pull Request
This project uses:
- docker for consistent testing and build environments.
Prerequisities:
Testing:
# run all tests
$ docker-compose run tf-github-webhooksLinting:
# run lint
$ docker-compose run tf-github-webhooks npm run lintSecurity:
# run security check
$ docker-compose run tf-github-webhooks npm run secTo build locally:
$ docker-compose run tf-github-webhooks npm run build- Merge fixes & features to master
- Run lint check
npm run lint - Run security check
npm run sec - Run full test suite
docker-compose run tf-github-webhooks - Run release script
npm run release - Push release & release tag to github
git push --follow-tags - Publish new release in github, using the release notes from the CHANGELOG
- Build the artifact and push to
s3 - Use the terraform module
module "github_webhooks" {
source = "git::git@github.com:cludden/tf-github-webhooks.git//terraform?ref={version}"
config_parameter_name = "/secrets/tf-github-webhooks"
debug = ""
log_level = "info"
memory_size = 128
name = "github-webhooks"
node_env = "production"
region = "us-west-2"
s3_bucket = "my-artifact-bucket"
s3_key = "path/to/my/artifact.zip"
timeout = 10
}
Licensed under the MIT License
Copyright (c) 2017 Chris Ludden
