From 1287dd93ca63d3a401a46d57c7d38fd1cb33999a Mon Sep 17 00:00:00 2001 From: Viacheslav Kudinov Date: Thu, 7 May 2026 17:00:13 +0200 Subject: [PATCH 1/4] doc: Update github_repository_webhook doc --- docs/resources/repository_webhook.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/docs/resources/repository_webhook.md b/docs/resources/repository_webhook.md index 3b85b418ec..244058e228 100644 --- a/docs/resources/repository_webhook.md +++ b/docs/resources/repository_webhook.md @@ -13,16 +13,16 @@ This resource allows you to create and manage webhooks for repositories within y ## Example Usage ```terraform -resource "github_repository" "repo" { - name = "foo" +resource "github_repository" "example_repo" { + name = "example-repo" description = "Terraform acceptance tests" homepage_url = "http://example.com/" visibility = "public" } -resource "github_repository_webhook" "foo" { - repository = github_repository.repo.name +resource "github_repository_webhook" "example_webhook" { + repository = github_repository.example_repo.name configuration { url = "https://google.de/" @@ -66,12 +66,13 @@ The following additional attributes are exported: ## Import -Repository webhooks can be imported using the `name` of the repository, combined with the `id` of the webhook, separated by a `/` character. The `id` of the webhook can be found in the URL of the webhook. For example: `"https://github.com/foo-org/foo-repo/settings/hooks/14711452"`. +Repository webhooks can be imported using the `name` of the repository, combined with the `id` of the webhook, separated by a `/` character. +The `id` of the webhook can be found in the URL of the webhook. For example: `"https://github.com/example-org/example-repo/settings/hooks/14711452"`, where `14711452` is the ID of the webhook. Importing uses the name of the repository, as well as the ID of the webhook, e.g. -```shell -terraform import github_repository_webhook.terraform terraform/11235813 +```sh +terraform import github_repository_webhook.example_webhook example-repo/14711452 ``` If secret is populated in the webhook's configuration, the value will be imported as "********". From 199780c0c35f82a7baa3c1a2ab088d303b26da52 Mon Sep 17 00:00:00 2001 From: Viacheslav Kudinov Date: Sat, 9 May 2026 12:03:57 +0200 Subject: [PATCH 2/4] doc: Update github_repository_webhook doc --- docs/resources/repository_webhook.md | 7 +++---- examples/resources/repository_webhook/example_1.tf | 8 ++++---- templates/resources/repository_webhook.md.tmpl | 6 +++--- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/docs/resources/repository_webhook.md b/docs/resources/repository_webhook.md index 244058e228..10b404fa70 100644 --- a/docs/resources/repository_webhook.md +++ b/docs/resources/repository_webhook.md @@ -66,12 +66,11 @@ The following additional attributes are exported: ## Import -Repository webhooks can be imported using the `name` of the repository, combined with the `id` of the webhook, separated by a `/` character. -The `id` of the webhook can be found in the URL of the webhook. For example: `"https://github.com/example-org/example-repo/settings/hooks/14711452"`, where `14711452` is the ID of the webhook. +Repository webhooks can be imported using the `name` of the repository, combined with the `id` of the webhook, separated by a `/` character. The `id` of the webhook can be found in the URL of the webhook. For example: `"https://github.com/example-org/example-repo/settings/hooks/14711452"`, where 14711452 is the `id` of the webhook. -Importing uses the name of the repository, as well as the ID of the webhook, e.g. +Importing uses the `name` of the repository, as well as the `id` of the webhook, e.g. -```sh +```shell terraform import github_repository_webhook.example_webhook example-repo/14711452 ``` diff --git a/examples/resources/repository_webhook/example_1.tf b/examples/resources/repository_webhook/example_1.tf index 07ce862c9e..31619327ae 100644 --- a/examples/resources/repository_webhook/example_1.tf +++ b/examples/resources/repository_webhook/example_1.tf @@ -1,13 +1,13 @@ -resource "github_repository" "repo" { - name = "foo" +resource "github_repository" "example_repo" { + name = "example-repo" description = "Terraform acceptance tests" homepage_url = "http://example.com/" visibility = "public" } -resource "github_repository_webhook" "foo" { - repository = github_repository.repo.name +resource "github_repository_webhook" "example_webhook" { + repository = github_repository.example_repo.name configuration { url = "https://google.de/" diff --git a/templates/resources/repository_webhook.md.tmpl b/templates/resources/repository_webhook.md.tmpl index e0ffdc111f..9c50978654 100644 --- a/templates/resources/repository_webhook.md.tmpl +++ b/templates/resources/repository_webhook.md.tmpl @@ -44,12 +44,12 @@ The following additional attributes are exported: ## Import -Repository webhooks can be imported using the `name` of the repository, combined with the `id` of the webhook, separated by a `/` character. The `id` of the webhook can be found in the URL of the webhook. For example: `"https://github.com/foo-org/foo-repo/settings/hooks/14711452"`. +Repository webhooks can be imported using the `name` of the repository, combined with the `id` of the webhook, separated by a `/` character. The `id` of the webhook can be found in the URL of the webhook. For example: `"https://github.com/example-org/example-repo/settings/hooks/14711452"`, where 14711452 is the `id` of the webhook. -Importing uses the name of the repository, as well as the ID of the webhook, e.g. +Importing uses the `name` of the repository, as well as the `id` of the webhook, e.g. ```shell -terraform import github_repository_webhook.terraform terraform/11235813 +terraform import github_repository_webhook.example_webhook example-repo/14711452 ``` If secret is populated in the webhook's configuration, the value will be imported as "********". From 05a7f526fa2f45366d685b27c985a018376c15ce Mon Sep 17 00:00:00 2001 From: Viacheslav Kudinov Date: Thu, 7 May 2026 17:00:13 +0200 Subject: [PATCH 3/4] doc: Update github_repository_webhook doc --- docs/resources/repository_webhook.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/docs/resources/repository_webhook.md b/docs/resources/repository_webhook.md index 3b85b418ec..244058e228 100644 --- a/docs/resources/repository_webhook.md +++ b/docs/resources/repository_webhook.md @@ -13,16 +13,16 @@ This resource allows you to create and manage webhooks for repositories within y ## Example Usage ```terraform -resource "github_repository" "repo" { - name = "foo" +resource "github_repository" "example_repo" { + name = "example-repo" description = "Terraform acceptance tests" homepage_url = "http://example.com/" visibility = "public" } -resource "github_repository_webhook" "foo" { - repository = github_repository.repo.name +resource "github_repository_webhook" "example_webhook" { + repository = github_repository.example_repo.name configuration { url = "https://google.de/" @@ -66,12 +66,13 @@ The following additional attributes are exported: ## Import -Repository webhooks can be imported using the `name` of the repository, combined with the `id` of the webhook, separated by a `/` character. The `id` of the webhook can be found in the URL of the webhook. For example: `"https://github.com/foo-org/foo-repo/settings/hooks/14711452"`. +Repository webhooks can be imported using the `name` of the repository, combined with the `id` of the webhook, separated by a `/` character. +The `id` of the webhook can be found in the URL of the webhook. For example: `"https://github.com/example-org/example-repo/settings/hooks/14711452"`, where `14711452` is the ID of the webhook. Importing uses the name of the repository, as well as the ID of the webhook, e.g. -```shell -terraform import github_repository_webhook.terraform terraform/11235813 +```sh +terraform import github_repository_webhook.example_webhook example-repo/14711452 ``` If secret is populated in the webhook's configuration, the value will be imported as "********". From ca72df004ac1e9a4aac66246a55351f2a6100e2f Mon Sep 17 00:00:00 2001 From: Viacheslav Kudinov Date: Sat, 9 May 2026 12:03:57 +0200 Subject: [PATCH 4/4] doc: Update github_repository_webhook doc --- docs/resources/repository_webhook.md | 7 +++---- examples/resources/repository_webhook/example_1.tf | 8 ++++---- templates/resources/repository_webhook.md.tmpl | 6 +++--- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/docs/resources/repository_webhook.md b/docs/resources/repository_webhook.md index 244058e228..10b404fa70 100644 --- a/docs/resources/repository_webhook.md +++ b/docs/resources/repository_webhook.md @@ -66,12 +66,11 @@ The following additional attributes are exported: ## Import -Repository webhooks can be imported using the `name` of the repository, combined with the `id` of the webhook, separated by a `/` character. -The `id` of the webhook can be found in the URL of the webhook. For example: `"https://github.com/example-org/example-repo/settings/hooks/14711452"`, where `14711452` is the ID of the webhook. +Repository webhooks can be imported using the `name` of the repository, combined with the `id` of the webhook, separated by a `/` character. The `id` of the webhook can be found in the URL of the webhook. For example: `"https://github.com/example-org/example-repo/settings/hooks/14711452"`, where 14711452 is the `id` of the webhook. -Importing uses the name of the repository, as well as the ID of the webhook, e.g. +Importing uses the `name` of the repository, as well as the `id` of the webhook, e.g. -```sh +```shell terraform import github_repository_webhook.example_webhook example-repo/14711452 ``` diff --git a/examples/resources/repository_webhook/example_1.tf b/examples/resources/repository_webhook/example_1.tf index 07ce862c9e..31619327ae 100644 --- a/examples/resources/repository_webhook/example_1.tf +++ b/examples/resources/repository_webhook/example_1.tf @@ -1,13 +1,13 @@ -resource "github_repository" "repo" { - name = "foo" +resource "github_repository" "example_repo" { + name = "example-repo" description = "Terraform acceptance tests" homepage_url = "http://example.com/" visibility = "public" } -resource "github_repository_webhook" "foo" { - repository = github_repository.repo.name +resource "github_repository_webhook" "example_webhook" { + repository = github_repository.example_repo.name configuration { url = "https://google.de/" diff --git a/templates/resources/repository_webhook.md.tmpl b/templates/resources/repository_webhook.md.tmpl index e0ffdc111f..9c50978654 100644 --- a/templates/resources/repository_webhook.md.tmpl +++ b/templates/resources/repository_webhook.md.tmpl @@ -44,12 +44,12 @@ The following additional attributes are exported: ## Import -Repository webhooks can be imported using the `name` of the repository, combined with the `id` of the webhook, separated by a `/` character. The `id` of the webhook can be found in the URL of the webhook. For example: `"https://github.com/foo-org/foo-repo/settings/hooks/14711452"`. +Repository webhooks can be imported using the `name` of the repository, combined with the `id` of the webhook, separated by a `/` character. The `id` of the webhook can be found in the URL of the webhook. For example: `"https://github.com/example-org/example-repo/settings/hooks/14711452"`, where 14711452 is the `id` of the webhook. -Importing uses the name of the repository, as well as the ID of the webhook, e.g. +Importing uses the `name` of the repository, as well as the `id` of the webhook, e.g. ```shell -terraform import github_repository_webhook.terraform terraform/11235813 +terraform import github_repository_webhook.example_webhook example-repo/14711452 ``` If secret is populated in the webhook's configuration, the value will be imported as "********".