Skip to content

Commit baca012

Browse files
authored
Chore: Doc, README fixes, Doc Automation (#107)
## What * Doc fixes * README fixes (contributors) ## Why * Documentation, repository improvements ## Notes <!-- Add any notes here --> ## PR Checklist * [x] _I have read [CONTRIBUTING.md](https://github.com/codefresh-io/terraform-provider-codefresh/blob/master/README.md)._ * [x] _I have [allowed changes to my fork to be made](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork)._ * [x] _I have added tests, assuming new tests are warranted_. * [x] _I have updated the Terraform docs in this repo, assuming any changes to the schema of Resources or Data Sources have been made._ * [x] _I understand that the `/test` comment will be ignored by the CI trigger [unless it is made by a repo admin or collaborator](https://codefresh.io/docs/docs/pipelines/triggers/git-triggers/#support-for-building-pull-requests-from-forks)._ --------- Co-authored-by: Yonatan Koren <[email protected]>
1 parent 69fb34a commit baca012

15 files changed

+27
-62
lines changed

.all-contributorsrc

-18
This file was deleted.

.github/PULL_REQUEST_TEMPLATE.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@
55
## Notes
66
<!-- Add any notes here -->
77

8-
## PR Checklist
8+
## Checklist
99

1010
* [ ] _I have read [CONTRIBUTING.md](https://github.com/codefresh-io/terraform-provider-codefresh/blob/master/README.md)._
1111
* [ ] _I have [allowed changes to my fork to be made](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork)._
1212
* [ ] _I have added tests, assuming new tests are warranted_.
13-
* [ ] _I have updated the Terraform docs in this repo, assuming any changes to the schema of Resources or Data Sources have been made._
1413
* [ ] _I understand that the `/test` comment will be ignored by the CI trigger [unless it is made by a repo admin or collaborator](https://codefresh.io/docs/docs/pipelines/triggers/git-triggers/#support-for-building-pull-requests-from-forks)._

.github/workflows/pull_request.yaml

+2-4
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ jobs:
1515
export PATH=$PATH:/home/runner/go/bin
1616
make docs-prepare
1717
tfplugindocs generate
18-
- id: docs-need-updating
19-
name: Validate No Changes
18+
- name: Validate No Changes
2019
run: |
2120
git diff --exit-code
2221
gofmt:
@@ -30,7 +29,6 @@ jobs:
3029
- name: Run gofmt
3130
run: |
3231
go fmt
33-
- id: go-needs-formatting
34-
name: Validate No Changes
32+
- name: Validate No Changes
3533
run: |
3634
git diff --exit-code

CONTRIBUTING.md

+4-9
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44

55
The documentation is generated using [tfplugindocs](https://github.com/hashicorp/terraform-plugin-docs).
66

7-
`docs/` should never be edited by hand. Instead, update the documentation via updating `Description` fields within the `schema` blocks of the provider's resources and data sources. And if needed, update the templates in `templates/`. Finally, you can run the following command to re-generate the documentation:
7+
`docs/` should never be edited by hand. Instead, update the documentation via updating `Description` fields within the `schema` blocks of the provider's resources and data sources. And if needed, update the templates in `templates/`.
8+
9+
You can always run the following command locally to re-generate the documentation:
810

911
```bash
1012
make docs
@@ -19,11 +21,4 @@ make docs
1921
### PR Requirements
2022

2123
1. Ensure that all tests pass (via commenting `/test` if you are an admin or a contributor with write access on this repo, otherwise wait for a maintainer to submit the comment. The comment will be ignored if you are not an admin or a contributor with write access on this repo. See: https://codefresh.io/docs/docs/pipelines/triggers/git-triggers/#support-for-building-pull-requests-from-forks)
22-
2. Ensure that `make docs` has been run and the changes have been committed.
23-
3. Ensure that `make fmt` has been run and the changes have been committed.
24-
25-
### Adding Yourself to the Contributors List
26-
27-
Comment on the PR with `@all-contributors please add @<username> for <contributions>` and the bot will add you to the contributors list. See: [All Contributors](https://allcontributors.org/docs/en/bot/usage).
28-
29-
For example: `@all-contributors please add @mitchellh for code`.
24+
4. Ensure `make docs` and `make fmt` have been run and the changes have been committed. Otherwise, you will have failing status checks.

README.md

+3-8
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,9 @@ make testacc
7272

7373
## Contributors
7474

75-
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
76-
<!-- prettier-ignore-start -->
77-
<!-- markdownlint-disable -->
78-
79-
<!-- markdownlint-restore -->
80-
<!-- prettier-ignore-end -->
81-
82-
<!-- ALL-CONTRIBUTORS-LIST:END -->
75+
<a href="https://github.com/codefresh-io/terraform-provider-codefresh/graphs/contributors">
76+
<img src="https://contrib.rocks/image?repo=codefresh-io/terraform-provider-codefresh" />
77+
</a>
8378

8479
## Acknowledgements
8580

codefresh.yml

+10-11
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,39 @@
1-
version: '1.0'
1+
version: "1.0"
22
stages:
33
- clone
44
- test
5-
- pakcages
65
- release
76
steps:
87
main_clone:
9-
title: 'Cloning main repository...'
8+
title: "Cloning main repository..."
109
stage: clone
1110
type: git-clone
1211
repo: "${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}"
1312
revision: "${{CF_REVISION}}"
1413
git: cf_github
1514

1615
go_fmt:
17-
title: 'Formatting'
16+
title: "Formatting"
1817
stage: test
19-
image: goreleaser/goreleaser:v1.11.3
18+
image: goreleaser/goreleaser:v1.15.2
2019
commands:
2120
- go fmt
22-
21+
2322
go_test:
24-
title: 'Run tests'
23+
title: "Run tests"
2524
stage: test
26-
image: goreleaser/goreleaser:v1.11.3
25+
image: goreleaser/goreleaser:v1.15.2
2726
environment:
2827
- TF_ACC="test"
2928
commands:
30-
- go test -v ./...
29+
- go test -v ./...
3130
retry:
3231
maxAttempts: 3
3332
delay: 5
3433
exponentialFactor: 2
3534

3635
prepare_env_vars:
37-
title: 'Preparing environment variables...'
36+
title: "Preparing environment variables..."
3837
stage: release
3938
image: codefreshio/ci-helpers
4039
environment:
@@ -53,7 +52,7 @@ steps:
5352

5453
release_binaries:
5554
title: Create release in Github
56-
image: goreleaser/goreleaser:v1.11.3
55+
image: goreleaser/goreleaser:v1.15.2
5756
stage: release
5857
environment:
5958
- GPG_FINGERPRINT=${{GPG_FINGERPRINT}}

docs/data-sources/current_account.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ output "current_ac" {
2828
```
2929

3030
The output example:
31-
```
31+
```hcl
3232
Outputs:
3333
3434
current_ac = {

docs/data-sources/idps.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ This data source retrieves all Identity Providers (IdPs) in the system.
1111

1212
## Example Usage
1313

14-
```
14+
```hcl
1515
data "codefresh_idps" "idp_azure" {
1616
display_name = "codefresh-onprem-tst-2"
1717
# client_name = "2222"

docs/guides/development.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ It is possible that we will switch to the [Terraform Plugin Framework](https://g
77
### Prerequisites (other than Terraform)
88

99
- GNU Make
10-
- [Go](https://golang.org/doc/install) `1.(n-2).x` (minimum supported Go version required to build the provider; n is the latest minor version listed [here](https://go.dev/dl/)).
10+
- [Go](https://golang.org/doc/install) `1.18.x` (minimum supported Go version required to build the provider).
1111

1212
### Building and Running a Local Build of the Provider
1313

docs/index.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ For example:
3535
provider "codefresh" {
3636
api_key = "..."
3737
}
38-
3938
provider "codefresh" {
4039
api_key = "..."
4140
alias = "acme-dev"
@@ -49,4 +48,4 @@ resource "codefresh_pipeline" "pipeline-dev" {
4948
provider = codefresh.acme-dev
5049
... # Omited for brevity
5150
}
52-
```
51+
```

docs/resources/step_types.md

-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ resource "codefresh_step_types_versions" "my-custom-step" {
4848
}
4949
....
5050
}
51-
}
5251
```
5352

5453
<!-- schema generated by tfplugindocs -->

templates/data-sources/current_account.md.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ output "current_ac" {
2828
```
2929

3030
The output example:
31-
```
31+
```hcl
3232
Outputs:
3333

3434
current_ac = {

templates/data-sources/idps.md.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ description: |-
1111

1212
## Example Usage
1313

14-
```
14+
```hcl
1515
data "codefresh_idps" "idp_azure" {
1616
display_name = "codefresh-onprem-tst-2"
1717
# client_name = "2222"

templates/guides/development.md.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ It is possible that we will switch to the [Terraform Plugin Framework](https://g
77
### Prerequisites (other than Terraform)
88

99
- GNU Make
10-
- [Go](https://golang.org/doc/install) `1.(n-2).x` (minimum supported Go version required to build the provider; n is the latest minor version listed [here](https://go.dev/dl/)).
10+
- [Go](https://golang.org/doc/install) `1.18.x` (minimum supported Go version required to build the provider).
1111

1212
### Building and Running a Local Build of the Provider
1313

templates/resources/step_types.md.tmpl

-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ resource "codefresh_step_types_versions" "my-custom-step" {
4646
}
4747
....
4848
}
49-
}
5049
```
5150

5251
{{ .SchemaMarkdown | trimspace }}

0 commit comments

Comments
 (0)