Skip to content

Commit

Permalink
Docs cleanup (ksatirli#31)
Browse files Browse the repository at this point in the history
* removes outdated `CHANGELOG.md`

* cleans up example READMEs, adds ToC and removes unmaintained `usage` sections
  • Loading branch information
ksatirli authored Oct 1, 2022
1 parent 54a315d commit d13618d
Show file tree
Hide file tree
Showing 25 changed files with 181 additions and 498 deletions.
30 changes: 0 additions & 30 deletions .release-it.json

This file was deleted.

28 changes: 0 additions & 28 deletions CHANGELOG.md

This file was deleted.

34 changes: 18 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,18 @@
## Table of Contents

- [GitHub Repository](#github-repository)
- [Table of Contents](#table-of-contents)
- [Requirements](#requirements)
- [Dependencies](#dependencies)
- [Usage](#usage)
- [Notes](#notes)
- [Author Information](#author-information)
- [License](#license)
<!-- TOC -->
* [GitHub Repository](#github-repository)
* [Table of Contents](#table-of-contents)
* [Requirements](#requirements)
* [Dependencies](#dependencies)
* [Usage](#usage)
* [Inputs](#inputs)
* [Outputs](#outputs)
* [Notes](#notes)
* [Author Information](#author-information)
* [License](#license)
<!-- TOC -->

## Requirements

Expand All @@ -28,17 +32,17 @@ Add the module to your Terraform resources like so:

```hcl
module "simple_example" {
source = "operatehappy/repository/github"
source = "ksatirli/repository/github"
version = "4.0.0"
name = "oh-demo-simple-example"
name = "simple-example"
visibility = false
}
```

Then, fetch the module from the [Terraform Registry](https://registry.terraform.io/modules/operatehappy/repository/github) using `terraform get`.
Then, fetch the module from the [Terraform Registry](https://registry.terraform.io/modules/ksatirli/repository/github) using `terraform get`.

Additional usage examples are available in the `examples` directory via [GitHub](https://github.com/operatehappy/terraform-github-repository/tree/main/examples).
Additional usage examples are available in the `examples` directory via [GitHub](https://github.com/ksatirli/terraform-github-repository/tree/main/examples).

<!-- BEGIN_TF_DOCS -->
### Inputs
Expand Down Expand Up @@ -98,7 +102,7 @@ Additional usage examples are available in the `examples` directory via [GitHub]
### Upgrades from `3.0.0` to `4.x.x`

As part of the updates and upgrades that were made for the `4.x.x` release, all Terraform resource identifiers were renamed from `this` to `main`.
See [`./moved.tf`](https://github.com/operatehappy/terraform-github-repository/blob/main/moved.tf) and the [Terraform documentation](https://www.terraform.io/language/modules/develop/refactoring#moved-block-syntax) for more information.
See [`./moved.tf`](https://github.com/ksatirli/terraform-github-repository/blob/main/moved.tf) and the [Terraform documentation](https://developer.hashicorp.com/terraform/language/modules/develop/refactoring#moved-block-syntax) for more information.

#### Branch for GitHub Pages

Expand Down Expand Up @@ -150,9 +154,7 @@ Replace `module.my_repository` with the Module identifier in use and replace `"m

## Author Information

This module is maintained by the contributors listed on [GitHub](https://github.com/operatehappy/terraform-github-repository/graphs/contributors).

Development of this module was sponsored by [Operate Happy](https://github.com/operatehappy).
This module is maintained by the contributors listed on [GitHub](https://github.com/ksatirli/terraform-github-repository/graphs/contributors).

## License

Expand Down
36 changes: 12 additions & 24 deletions examples/basic/README.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,25 @@
# Example: `basic`

> This is an example of a _basic_ configuration of the [terraform-github-repository Module](https://registry.terraform.io/modules/operatehappy/repository/github)
> This is an example of a _basic_ configuration of the [terraform-github-repository Module](https://registry.terraform.io/modules/ksatirli/repository/github)
## Table of Contents

- [Example: `basic`](#example-basic)
- [Table of Contents](#table-of-contents)
- [Installation](#installation)
- [Usage](#usage)
- [Module Variables and Outputs](#module-variables-and-outputs)
<!-- TOC -->
* [Example: `basic`](#example--basic)
* [Table of Contents](#table-of-contents)
* [Installation](#installation)
* [Module Variables and Outputs](#module-variables-and-outputs)
* [Inputs](#inputs)
* [Outputs](#outputs)
<!-- TOC -->

## Installation

For a list of installation instructions, see the [Readme document](https://registry.terraform.io/modules/operatehappy/repository/github) on the Terraform Registry.

## Usage

A _basic_ configuration of the `terraform-github-repository` Module could look like this:

```hcl
module "basic_example" {
source = "../.."
name = "oh-demo-basic-example"
private = false
}
```
For a list of installation instructions, see the [Readme document](https://registry.terraform.io/modules/ksatirli/repository/github) on the Terraform Registry.

## Module Variables and Outputs

For a list of available variables and outputs, see the [Readme document](https://registry.terraform.io/modules/operatehappy/repository/github) on the Terraform Registry.

A copy of this document (as `README.md`) is also available on [GitHub](https://github.com/operatehappy/terraform-github-repository/blob/main/README.md#readme).
For a list of available variables and outputs, see the [Readme document](https://registry.terraform.io/modules/ksatirli/repository/github) on the Terraform Registry.

<!-- BEGIN_TF_DOCS -->
### Inputs
Expand All @@ -41,4 +29,4 @@ No inputs.
### Outputs

No outputs.
<!-- END_TF_DOCS -->
<!-- END_TF_DOCS -->
2 changes: 1 addition & 1 deletion examples/basic/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ provider "github" {
module "basic_example" {
source = "../../"

name = "oh-demo-basic-example"
name = "basic-example"
visibility = "public"
}
62 changes: 12 additions & 50 deletions examples/branch_protection/README.md
Original file line number Diff line number Diff line change
@@ -1,63 +1,25 @@
# Example: `branch_protection`

> This is an example of a _branch-protection_ configuration of the [terraform-github-repository Module](https://registry.terraform.io/modules/operatehappy/repository/github)
> This is an example of a _branch-protection_ configuration of the [terraform-github-repository Module](https://registry.terraform.io/modules/ksatirli/repository/github)
## Table of Contents

- [Example: `branch_protection`](#example-branch_protection)
- [Table of Contents](#table-of-contents)
- [Installation](#installation)
- [Usage](#usage)
- [Module Variables and Outputs](#module-variables-and-outputs)
<!-- TOC -->
* [Example: `branch_protection`](#example--branch_protection)
* [Table of Contents](#table-of-contents)
* [Installation](#installation)
* [Module Variables and Outputs](#module-variables-and-outputs)
* [Inputs](#inputs)
* [Outputs](#outputs)
<!-- TOC -->

## Installation

For a list of installation instructions, see the [Readme document](https://registry.terraform.io/modules/operatehappy/repository/github) on the Terraform Registry.

## Usage

A _branch-protection_ configuration of the `terraform-github-repository` Module could look like this:

```hcl
module "branch_protection_example" {
source = "../../"
name = "oh-demo-branch-protection-example"
visibility = "public"
branch_protections = [
{
branch = "main"
enforce_admins = true
require_signed_commits = true
required_status_checks = {
strict = false
contexts = ["ci/sentinel"]
}
required_pull_request_reviews = {
dismiss_stale_reviews = true
dismissal_users = ["operatehappy-bot"]
dismissal_teams = []
require_code_owner_reviews = false,
required_approving_review_count = null
}
restrictions = {
users = ["operatehappy-bot"]
teams = []
}
}
]
}
```
For a list of installation instructions, see the [Readme document](https://registry.terraform.io/modules//repository/github) on the Terraform Registry.

## Module Variables and Outputs

For a list of available variables and outputs, see the [Readme document](https://registry.terraform.io/modules/operatehappy/repository/github) on the Terraform Registry.

A copy of this document (as `README.md`) is also available on [GitHub](https://github.com/operatehappy/terraform-github-repository/blob/main/README.md#readme).
For a list of available variables and outputs, see the [Readme document](https://registry.terraform.io/modules/ksatirli/repository/github) on the Terraform Registry.

<!-- BEGIN_TF_DOCS -->
### Inputs
Expand All @@ -67,4 +29,4 @@ No inputs.
### Outputs

No outputs.
<!-- END_TF_DOCS -->
<!-- END_TF_DOCS -->
25 changes: 18 additions & 7 deletions examples/branch_protection/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ provider "github" {
module "branch_protection_example" {
source = "../../"

name = "oh-demo-branch-protection-example"
name = "branch-protection-example"
visibility = "public"
auto_init = true

Expand All @@ -16,20 +16,31 @@ module "branch_protection_example" {
require_signed_commits = true

required_status_checks = {
strict = false
contexts = ["ci/sentinel"]
strict = false

contexts = [
"ci/sentinel"
]
}

required_pull_request_reviews = {
dismiss_stale_reviews = true
dismissal_users = ["ksatirli"]
dismissal_teams = []
dismiss_stale_reviews = true

dismissal_users = [
"ksatirli"
]

dismissal_teams = []

require_code_owner_reviews = false,
required_approving_review_count = null
}

restrictions = {
users = ["ksatirli"]
users = [
"ksatirli"
]

teams = []
}
}
Expand Down
49 changes: 12 additions & 37 deletions examples/complex/README.md
Original file line number Diff line number Diff line change
@@ -1,50 +1,25 @@
# Example: `complex`

> This is an example of a _complex_ configuration of the [terraform-github-repository Module](https://registry.terraform.io/modules/operatehappy/repository/github)
> This is an example of a _complex_ configuration of the [terraform-github-repository Module](https://registry.terraform.io/modules/ksatirli/repository/github)
## Table of Contents

- [Example: `complex`](#example-complex)
- [Table of Contents](#table-of-contents)
- [Installation](#installation)
- [Usage](#usage)
- [Module Variables and Outputs](#module-variables-and-outputs)
<!-- TOC -->
* [Example: `complex`](#example--complex)
* [Table of Contents](#table-of-contents)
* [Installation](#installation)
* [Module Variables and Outputs](#module-variables-and-outputs)
* [Inputs](#inputs)
* [Outputs](#outputs)
<!-- TOC -->

## Installation

For a list of installation instructions, see the [Readme document](https://registry.terraform.io/modules/operatehappy/repository/github) on the Terraform Registry.

## Usage

A _complex_ configuration of the `terraform-github-repository` Module could look like this:

```hcl
module "complex_example" {
source = "../.."
name = "oh-demo-complex-example"
description = "Complex Repository Example"
homepage_url = "https://operatehappy.com/"
private = false
has_issues = true
has_projects = true
has_wiki = false
allow_merge_commit = false
allow_squash_merge = true
allow_rebase_merge = false
has_downloads = false
auto_init = false
default_branch = "main"
archived = false
topics = ["topic-1", "topic-2"]
}
```
For a list of installation instructions, see the [Readme document](https://registry.terraform.io/modules/ksatirli/repository/github) on the Terraform Registry.

## Module Variables and Outputs

For a list of available variables and outputs, see the [Readme document](https://registry.terraform.io/modules/operatehappy/repository/github) on the Terraform Registry.

A copy of this document (as `README.md`) is also available on [GitHub](https://github.com/operatehappy/terraform-github-repository/blob/main/README.md#readme).
For a list of available variables and outputs, see the [Readme document](https://registry.terraform.io/modules/ksatirli/repository/github) on the Terraform Registry.

<!-- BEGIN_TF_DOCS -->
### Inputs
Expand All @@ -54,4 +29,4 @@ No inputs.
### Outputs

No outputs.
<!-- END_TF_DOCS -->
<!-- END_TF_DOCS -->
Loading

0 comments on commit d13618d

Please sign in to comment.