Automatically delete branch when PR is merged
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.circleci
.gitignore
.secret.sample
Gopkg.lock
Gopkg.toml
LICENSE
README.md
delete-branch.png Update README Sep 18, 2018
init.sh
json.go
lambda.tf
main.go
test.json
variables.tf Add tf file for API-gateway as delete-branch2 Oct 6, 2018

README.md

delete-branch

Automatically delete branch when PR is merged

delete-branch

Install

Go to the App page and select the repository you want to install

Deployment

  1. Set environment variable for terraformuser
    • export TF_VAR_aws_access_key=""
    • export TF_VAR_aws_secret_key=""
  2. terraform init
  3. terraform plan to confirm that it will be created aws_lambda_function.delete_branch_bot
  4. terraform apply
  5. Go to API-Gateway GUI
    • Create New API and select Regional Endpoint Type
    • Actions -> Create Method -> POST
    • Select Lambda Function Integration type and set delete_branch_bot to Lambda Function form
    • Actions -> Deploy API -> Set prod stage name
    • You can see the Invoke URL
  6. Set Invoke URL to Webhook URL in GitHubApp setting