Add repository webhook resource (#28)

Co-authored-by: techknowlogick <techknowlogick@noreply.gitea.com>
Reviewed-on: https://gitea.com/gitea/terraform-provider-gitea/pulls/28
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.com>
Co-authored-by: Petar Nikolovski <petar.nikolovski@protonmail.com>
Co-committed-by: Petar Nikolovski <petar.nikolovski@protonmail.com>
This commit is contained in:
Petar Nikolovski
2023-10-24 19:46:11 +00:00
committed by techknowlogick
parent f59aab3d1f
commit 683696a756
18 changed files with 290 additions and 38 deletions

View File

@ -57,5 +57,3 @@ resource "gitea_fork" "org2_fork_of_repo1_in_org1" {
### Read-Only
- `id` (String) The ID of this resource.

View File

@ -51,5 +51,3 @@ resource "gitea_git_hook" "org_repo_post_receive" {
### Read-Only
- `id` (String) The ID of this resource.

View File

@ -29,5 +29,3 @@ Handling [gitea oauth application](https://docs.gitea.io/en-us/oauth2-provider/)
- `client_id` (String) OAuth2 Application client id
- `client_secret` (String, Sensitive) Oauth2 Application client secret
- `id` (String) The ID of this resource.

View File

@ -47,5 +47,3 @@ resource "gitea_repository" "org_repo" {
- `avatar_url` (String)
- `id` (String) The ID of this resource.
- `repos` (List of String) List of all Repositories that are part of this organisation

View File

@ -48,5 +48,3 @@ resource "gitea_public_key" "test_user_key" {
- `fingerprint` (String)
- `id` (String) The ID of this resource.
- `type` (String)

View File

@ -111,5 +111,3 @@ Need to exist in the gitea instance
- `permission_push` (Boolean)
- `ssh_url` (String)
- `updated` (String)

View File

@ -59,5 +59,3 @@ resource "gitea_repository_key" "example" {
### Read-Only
- `id` (String) The ID of this resource.

View File

@ -0,0 +1,36 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "gitea_repository_webhook Resource - terraform-provider-gitea"
subcategory: ""
description: |-
This resource allows you to create and manage webhooks for repositories.
---
# gitea_repository_webhook (Resource)
This resource allows you to create and manage webhooks for repositories.
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `active` (Boolean) Set webhook to active, e.g. `true`
- `branch_filter` (String) Set branch filter on the webhook, e.g. `"*"`
- `content_type` (String) The content type of the payload. It can be `json`, or `form`
- `events` (List of String) A list of events that will trigger the webhool, e.g. `["push"]`
- `name` (String) Repository name
- `type` (String) Webhook type, e.g. `gitea`
- `url` (String) Target URL of the webhook
- `username` (String) User name or organization name
### Optional
- `secret` (String) Webhook secret
### Read-Only
- `created_at` (String) Webhook creation timestamp
- `id` (String) The ID of this resource.

View File

@ -79,5 +79,3 @@ Can be `repo.code`, `repo.issues`, `repo.ext_issues`, `repo.wiki`, `repo.pulls`,
### Read-Only
- `id` (String) The ID of this resource.

View File

@ -63,5 +63,3 @@ output "token" {
- `id` (String) The ID of this resource.
- `last_eight` (String)
- `token` (String, Sensitive) The actual Access Token

View File

@ -56,5 +56,3 @@ resource "gitea_user" "test" {
### Read-Only
- `id` (String) The ID of this resource.