Skip to content

Commit c46c825

Browse files
committed
feat: Generate docs
Signed-off-by: Steve Hipwell <steve.hipwell@gmail.com>
1 parent 7e16feb commit c46c825

3,298 files changed

Lines changed: 18043 additions & 820811 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/pull_request_template.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ Resolves #ISSUE_NUMBER
77
### Before the change?
88
<!-- Please describe the current behavior that you are modifying. -->
99

10-
-
10+
-
1111

1212
### After the change?
1313
<!-- Please describe the behavior or changes that are being added by this PR. -->
1414

15-
-
15+
-
1616

1717
### Pull request checklist
1818

.github/workflows/ci.yaml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,20 @@ jobs:
3333
with:
3434
go-version-file: go.mod
3535
cache: true
36+
- name: Set-up rumdl
37+
uses: action-stars/install-tool-from-github-release@1fa61c3bea52eca3bcdb1f5c961a3b113fe7fa54 # v0.2.6
38+
with:
39+
github_token: ${{ github.token }}
40+
owner: rvben
41+
repository: rumdl
42+
filename_format: "{name}-v{version}-{arch}-{os}.{ext}"
43+
arch_amd64: x86_64
44+
os_linux: unknown-linux-gnu
45+
check_command: rumdl --version
46+
version: latest
3647
- run: make tools
3748
- run: make lintcheck
38-
- run: make website-lint
3949
- run: make build
4050
- run: make test
51+
- run: make checkdocs
52+
- run: make lintdocs RUMDL_ARGS="--output-format github"

.golangci.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
version: "2"
2-
run:
3-
modules-download-mode: vendor
42

53
linters:
64
default: none

.markdownlint.yaml

Lines changed: 0 additions & 4 deletions
This file was deleted.

.rumdl.toml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[global]
2+
disable = ["MD013", "MD028"]
3+
4+
[per-file-ignores]
5+
".github/pull_request_template.md" = ["MD041"]
6+
"docs/**/*.md" = ["MD059"]
7+
8+
[MD024]
9+
siblings-only = true
10+
11+
[MD033]
12+
allowed-elements = ["a", "br", "details", "img", "summary", "sub", "sup"]
13+
14+
[MD052]
15+
shortcut-syntax = true

CHANGELOG.md

Lines changed: 157 additions & 179 deletions
Large diffs are not rendered by default.

CODE_OF_CONDUCT.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ a project may be further defined and clarified by project maintainers.
5555
## Enforcement
5656

5757
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58-
reported by contacting the project team at opensource@github.com. All
58+
reported by contacting the project team at <opensource@github.com>. All
5959
complaints will be reviewed and investigated and will result in a response that
6060
is deemed necessary and appropriate to the circumstances. The project team is
6161
obligated to maintain confidentiality with regard to the reporter of an incident.
@@ -68,9 +68,9 @@ members of the project's leadership.
6868
## Attribution
6969

7070
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71-
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
71+
available at <https://www.contributor-covenant.org/version/1/4/code-of-conduct.html>
7272

7373
[homepage]: https://www.contributor-covenant.org
7474

7575
For answers to common questions about this code of conduct, see
76-
https://www.contributor-covenant.org/faq
76+
<https://www.contributor-covenant.org/faq>

CONTRIBUTING.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ Before submitting an issue or a pull request, please search the repository for e
1313
1. Fork and clone the repository.
1414
2. Create a new branch: `git switch -c my-branch-name`.
1515
3. Make your change, add tests, and make sure the tests still pass.
16-
4. Push to your fork and submit a pull request.
17-
5. Pat yourself on the back and wait for your pull request to be reviewed and merged.
16+
4. Make sure the documentation has been updated, and run `make generatedocs`.
17+
5. Push to your fork and submit a pull request.
18+
6. Pat yourself on the back and wait for your pull request to be reviewed and merged.
1819

1920
Here are a few things you can do that will increase the likelihood of your pull request being accepted:
2021

GNUmakefile

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
SWEEP?=repositories,teams
22
PKG_NAME=github
33
TEST?=./$(PKG_NAME)/...
4-
WEBSITE_REPO=github.com/hashicorp/terraform-website
54

65
COVERAGEARGS?=-race -coverprofile=coverage.txt -covermode=atomic
76

7+
RUMDL_ARGS?=--output-format text
8+
89
# VARIABLE REFERENCE:
910
#
1011
# Test-specific variables:
@@ -28,7 +29,6 @@ endif
2829
default: build
2930

3031
tools:
31-
go install github.com/client9/misspell/cmd/misspell@v0.3.4
3232
go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.6.0
3333

3434
build: lintcheck
@@ -66,22 +66,21 @@ sweep:
6666
@echo "WARNING: This will destroy infrastructure. Use only in development accounts."
6767
go test $(TEST) -v -sweep=$(SWEEP) $(SWEEPARGS)
6868

69-
website:
70-
ifeq (,$(wildcard $(GOPATH)/src/$(WEBSITE_REPO)))
71-
echo "$(WEBSITE_REPO) not found in your GOPATH (necessary for layouts and assets), get-ting..."
72-
git clone https://$(WEBSITE_REPO) $(GOPATH)/src/$(WEBSITE_REPO)
73-
endif
74-
@$(MAKE) -C $(GOPATH)/src/$(WEBSITE_REPO) website-provider PROVIDER_PATH=$(shell pwd) PROVIDER_NAME=$(PKG_NAME)
69+
generatedocs:
70+
@go generate ./...
7571

76-
website-lint:
77-
@echo "==> Checking website against linters..."
78-
@misspell -error -source=text website/
72+
fmtdocs:
73+
@rumdl fmt --fix .
7974

80-
website-test:
81-
ifeq (,$(wildcard $(GOPATH)/src/$(WEBSITE_REPO)))
82-
echo "$(WEBSITE_REPO) not found in your GOPATH (necessary for layouts and assets), get-ting..."
83-
git clone https://$(WEBSITE_REPO) $(GOPATH)/src/$(WEBSITE_REPO)
84-
endif
85-
@$(MAKE) -C $(GOPATH)/src/$(WEBSITE_REPO) website-provider-test PROVIDER_PATH=$(shell pwd) PROVIDER_NAME=$(PKG_NAME)
75+
lintdocs:
76+
@rumdl check $(RUMDL_ARGS) .
77+
@go tool tfplugindocs validate
78+
79+
checkdocs: generatedocs
80+
@git diff --quiet ||\
81+
{ echo "New file modification detected in the Git working tree. Please check in before commit."; git --no-pager diff --name-only | uniq | awk '{print " - " $$0}'; \
82+
if [ "${CI}" = true ]; then\
83+
exit 1;\
84+
fi;}
8685

87-
.PHONY: build test testacc fmt lint lintcheck tools website website-lint website-test sweep
86+
.PHONY: tools build fmt lint lintcheck test testacc sweep generatedocs fmtdocs lintdocs checkdocs

README.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,21 @@
1-
Terraform Provider GitHub
2-
=========================
1+
# Terraform Provider GitHub
32

4-
<img src="https://cloud.githubusercontent.com/assets/98681/24211275/c4ebd04e-0ee8-11e7-8606-061d656a42df.png" width="72" height="">
3+
|<img src="https://cloud.githubusercontent.com/assets/98681/24211275/c4ebd04e-0ee8-11e7-8606-061d656a42df.png" width="72" height=""> | <img src="https://raw.githubusercontent.com/hashicorp/terraform-website/d841a1e5fca574416b5ca24306f85a0f4f41b36d/content/source/assets/images/logo-terraform-main.svg" width="300px">|
54

6-
<img src="https://raw.githubusercontent.com/hashicorp/terraform-website/d841a1e5fca574416b5ca24306f85a0f4f41b36d/content/source/assets/images/logo-terraform-main.svg" width="300px">
7-
8-
This project is used to manipulate GitHub resources (repositories, teams, files, etc.) using Terraform. Its Terraform Registry page can be found [here](https://registry.terraform.io/providers/integrations/github/).
5+
This project is used to manipulate GitHub resources (repositories, teams, files, etc.) using Terraform; it can be found in the [Terraform Registry](https://registry.terraform.io/providers/integrations/github).
96

107
## Requirements
118

12-
- [Terraform](https://www.terraform.io/downloads.html) 0.10.x
13-
- [Go](https://golang.org/doc/install) 1.24.x (to build the provider plugin)
9+
- [Terraform](https://www.terraform.io/downloads.html) 1.x
10+
- [Go](https://golang.org/doc/install) 1.24.x (to build the provider plugin)
1411

1512
## Usage
1613

17-
Detailed documentation for the GitHub provider can be found [here](https://registry.terraform.io/providers/integrations/github).
14+
Detailed documentation for the GitHub provider can be found in the [Terraform Registry](https://registry.terraform.io/providers/integrations/github).
1815

1916
## Contributing
2017

21-
Detailed documentation for contributing to the GitHub provider can be found [here](CONTRIBUTING.md).
18+
Detailed documentation for contributing to the GitHub provider can be found in the [contributing guide](CONTRIBUTING.md).
2219

2320
## Roadmap
2421

0 commit comments

Comments
 (0)