Skip to content

Commit 4195ea2

Browse files
authored
feat: Add base URL for GitHub Enterprise (#244)
1 parent cb18382 commit 4195ea2

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

modules/github-repository-webhook/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ No modules.
3030
|------|-------------|------|---------|:--------:|
3131
| <a name="input_atlantis_allowed_repo_names"></a> [atlantis\_allowed\_repo\_names](#input\_atlantis\_allowed\_repo\_names) | List of names of repositories which belong to the owner specified in `github_owner` | `list(string)` | n/a | yes |
3232
| <a name="input_create_github_repository_webhook"></a> [create\_github\_repository\_webhook](#input\_create\_github\_repository\_webhook) | Whether to create Github repository webhook for Atlantis | `bool` | `true` | no |
33+
| <a name="input_github_base_url"></a> [github\_base\_url](#input\_github\_base\_url) | Github base URL to use when creating webhook (when using GitHub Enterprise) | `string` | `null` | no |
3334
| <a name="input_github_owner"></a> [github\_owner](#input\_github\_owner) | Github owner to use when creating webhook | `string` | `""` | no |
3435
| <a name="input_github_token"></a> [github\_token](#input\_github\_token) | Github token to use when creating webhook | `string` | `""` | no |
3536
| <a name="input_webhook_secret"></a> [webhook\_secret](#input\_webhook\_secret) | Webhook secret | `string` | `""` | no |

modules/github-repository-webhook/main.tf

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
provider "github" {
2-
token = var.github_token
3-
owner = var.github_owner
2+
base_url = var.github_base_url
3+
token = var.github_token
4+
owner = var.github_owner
45
}
56

67
resource "github_repository_webhook" "this" {

modules/github-repository-webhook/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ variable "create_github_repository_webhook" {
44
default = true
55
}
66

7+
variable "github_base_url" {
8+
description = "Github base URL to use when creating webhook (when using GitHub Enterprise)"
9+
type = string
10+
default = null
11+
}
12+
713
variable "github_token" {
814
description = "Github token to use when creating webhook"
915
type = string

0 commit comments

Comments
 (0)