From 3cfae3990171eb035aedb871dbb8d792ab84a940 Mon Sep 17 00:00:00 2001 From: aknysh Date: Mon, 13 May 2019 21:34:07 -0400 Subject: [PATCH 1/2] Remove unused `name` variable --- LICENSE | 2 +- README.md | 10 +++++++--- docs/terraform.md | 1 - variables.tf | 8 -------- 4 files changed, 8 insertions(+), 13 deletions(-) diff --git a/LICENSE b/LICENSE index 261eeb9..eb114f2 100644 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [yyyy] [name of copyright owner] + Copyright 2018-2019 Cloud Posse, LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/README.md b/README.md index 80c9cc9..92a0f0a 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,11 @@ We literally have [*hundreds of terraform modules*][terraform_modules] that are ## Usage + +**IMPORTANT:** The `master` branch is used in `source` just as an example. In your code, do not pin to `master` because there may be breaking changes between releases. +Instead pin to the release tag (e.g. `?ref=tags/x.y.z`) of one of our [latest releases](https://github.com/cloudposse/terraform-github-repository-webhooks/releases). + + Create a GitHub Personal Access Token that has `admin:repo_hook` for full control of repository hooks; in otherwords, we need `write:repo_hook` to write repository hooks and `read:repo_hook` to read repository hooks. ```hcl @@ -54,7 +59,7 @@ module "github_webhooks" { github_token = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" github_repositories = "geodesic" webhook_url = "https://atlantis.prod.company.com/" - content_type = "json" + content_type = "application/json" events = ["issues"] } ``` @@ -84,7 +89,6 @@ Available targets: | github_organization | GitHub organization to use when creating webhook | string | - | yes | | github_repositories | List of repository names which should be associated with the webhook | list | `` | no | | github_token | GitHub token used for API access | string | - | yes | -| name | The type of webhook | string | `web` | no | | webhook_content_type | Webhook Content Type (E.g. json) | string | `json` | no | | webhook_insecure_ssl | Webhook Insecure SSL (E.g. trust self-signed certificates) | string | `false` | no | | webhook_secret | Webhook secret | string | `` | no | @@ -180,7 +184,7 @@ In general, PRs are welcome. We follow the typical "fork-and-pull" Git workflow. ## Copyright -Copyright © 2017-2018 [Cloud Posse, LLC](https://cpco.io/copyright) +Copyright © 2017-2019 [Cloud Posse, LLC](https://cpco.io/copyright) diff --git a/docs/terraform.md b/docs/terraform.md index 3674568..6d58999 100644 --- a/docs/terraform.md +++ b/docs/terraform.md @@ -8,7 +8,6 @@ | github_organization | GitHub organization to use when creating webhook | string | - | yes | | github_repositories | List of repository names which should be associated with the webhook | list | `` | no | | github_token | GitHub token used for API access | string | - | yes | -| name | The type of webhook | string | `web` | no | | webhook_content_type | Webhook Content Type (E.g. json) | string | `json` | no | | webhook_insecure_ssl | Webhook Insecure SSL (E.g. trust self-signed certificates) | string | `false` | no | | webhook_secret | Webhook secret | string | `` | no | diff --git a/variables.tf b/variables.tf index 5ec07c7..7c86662 100644 --- a/variables.tf +++ b/variables.tf @@ -3,14 +3,6 @@ variable "enabled" { default = "true" } -variable "name" { - # This is what GitHub calls it. It's must be one of these predefined types. - # https://api.github.com/hooks - description = "The type of webhook" - - default = "web" -} - variable "github_token" { description = "GitHub token used for API access" } From 5531dc249f51e0259438f397ea59f60ba96b909b Mon Sep 17 00:00:00 2001 From: aknysh Date: Mon, 13 May 2019 21:38:22 -0400 Subject: [PATCH 2/2] Remove unused `name` variable --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index eb114f2..588757c 100644 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2019 Cloud Posse, LLC + Copyright 2017-2019 Cloud Posse, LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.