Skip to content

Commit 92a2c60

Browse files
Documentation improvements (#642)
* Documentation improvements * More Markdown lint fixes * Add golangci-lint to the pipeline Fixes #361
1 parent f980f39 commit 92a2c60

29 files changed

+140
-92
lines changed

.github/workflows/golangci-lint.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: golangci-lint
2+
3+
on: push
4+
5+
jobs:
6+
golangci:
7+
name: lint
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
- name: golangci-lint
12+
uses: golangci/golangci-lint-action@v2

.github/workflows/markdown-lint.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Markdown lint
2+
3+
on: push
4+
5+
jobs:
6+
markdown-lint:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- uses: avto-dev/markdown-lint@v1
11+
with:
12+
args: 'docs'

.gitignore

Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,31 @@
1+
!command/test-fixtures/**/*.tfstate
2+
!command/test-fixtures/**/.terraform/
3+
*.backup
4+
*.bak
15
*.dll
26
*.exe
7+
*.iml
8+
*.iml
9+
*.log
10+
*.test
11+
*~
12+
.*.swp
13+
./*.tfstate
314
.DS_Store
15+
.envrc
16+
.idea
17+
.terraform/
18+
.vagrant/
19+
/pkg/
20+
Gitlab-license.txt
21+
bin/
422
example.tf
23+
license/*
24+
modules-dev/
525
terraform.tfplan
626
terraform.tfstate
7-
bin/
8-
modules-dev/
9-
/pkg/
10-
website/.vagrant
1127
website/.bundle
28+
website/.vagrant
1229
website/build
1330
website/node_modules
14-
.vagrant/
15-
*.backup
16-
./*.tfstate
17-
.terraform/
18-
*.log
19-
*.bak
20-
*~
21-
.*.swp
22-
.idea
23-
*.iml
24-
*.test
25-
*.iml
26-
.envrc
27-
2831
website/vendor
29-
30-
# Test exclusions
31-
!command/test-fixtures/**/*.tfstate
32-
!command/test-fixtures/**/.terraform/
33-
34-
license/*
35-
Gitlab-license.txt

.markdownlint.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Configuration for markdownlint
2+
# https://github.com/DavidAnson/markdownlint#configuration
3+
4+
# Disabled Rules
5+
# https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md
6+
MD013: false
7+
MD014: false
8+
MD034: false
9+
MD040: false

docs/data-sources/group.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
# gitlab\_group
22

3-
Provides details about a specific group in the gitlab provider.
3+
Provide details about a specific group in the gitlab provider.
44

55
## Example Usage
66

7-
**By group's ID**
7+
### By group's ID
88

99
```hcl
1010
data "gitlab_group" "foo" {
1111
group_id = 123
1212
}
1313
```
1414

15-
**By group's full path**
15+
### By group's full path
1616

1717
```hcl
1818
data "gitlab_group" "foo" {
@@ -28,7 +28,7 @@ The following arguments are supported:
2828

2929
* `full_path` - (Optional) The full path of the group.
3030

31-
**Note**: exactly one of group_id or full_path must be provided.
31+
> **Note**: exactly one of group_id or full_path must be provided.
3232
3333
## Attributes Reference
3434

docs/data-sources/group_membership.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
# gitlab\_group\_membership
22

3-
Provides details about a list of group members in the gitlab provider. The results include id, username, name and more about the requested members.
3+
Provide details about a list of group members in the gitlab provider. The results include id, username, name and more about the requested members.
44

55
## Example Usage
66

7-
**By group's ID**
7+
### By group's ID
88

99
```hcl
1010
data "gitlab_group_membership" "example" {
1111
group_id = 123
1212
}
1313
```
1414

15-
**By group's full path**
15+
### By group's full path
1616

1717
```hcl
1818
data "gitlab_group_membership" "example" {
@@ -28,9 +28,9 @@ The following arguments are supported:
2828

2929
* `full_path` - (Optional) The full path of the group.
3030

31-
* `access_level` - (Optional) Only return members with the desidered access level. Acceptable values are: `guest`, `reporter`, `developer`, `maintainer`, `owner`.
31+
* `access_level` - (Optional) Only return members with the desired access level. Acceptable values are: `guest`, `reporter`, `developer`, `maintainer`, `owner`.
3232

33-
**Note**: exactly one of group_id or full_path must be provided.
33+
> **Note**: exactly one of group_id or full_path must be provided.
3434
3535
## Attributes Reference
3636

@@ -45,4 +45,3 @@ The following attributes are exported:
4545
* `web_url` - User's website URL.
4646
* `access_level` - One of five levels of access to the group.
4747
* `expires_at` - Expiration date for the group membership.
48-

docs/data-sources/project.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
# gitlab\_project
22

3-
Provides details about a specific project in the gitlab provider. The results include the name of the project, path, description, default branch, etc.
3+
Provide details about a specific project in the gitlab provider. The results include the name of the project, path, description, default branch, etc.
44

55
## Example Usage
66

77
```hcl
88
data "gitlab_project" "example" {
9-
id = 30
9+
id = 30
1010
}
1111
```
1212

1313
```hcl
1414
data "gitlab_project" "example" {
15-
id = "foo/bar/baz"
15+
id = "foo/bar/baz"
1616
}
1717
```
1818

docs/data-sources/projects.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# gitlab\_projects
22

3-
Provides details about a list of projects in the Gitlab provider. Listing all projects and group projects with [project filtering](https://docs.gitlab.com/ee/api/projects.html#list-user-projects) or [group project filtering](https://docs.gitlab.com/ee/api/groups.html#list-a-groups-projects) is supported.
3+
Provide details about a list of projects in the Gitlab provider. Listing all projects and group projects with [project filtering](https://docs.gitlab.com/ee/api/projects.html#list-user-projects) or [group project filtering](https://docs.gitlab.com/ee/api/groups.html#list-a-groups-projects) is supported.
44

5-
~> NOTE: This data source supports all available filters exposed by the `xanzy/go-gitlab` package, which might not expose all available filters exposed by the Gitlab APIs.
5+
> **NOTE**: This data source supports all available filters exposed by the `xanzy/go-gitlab` package, which might not expose all available filters exposed by the Gitlab APIs.
66
77
## Example Usage
88

@@ -74,7 +74,6 @@ The following arguments are supported:
7474

7575
* `with_programming_language` - (Optional) Limit by projects which use the given programming language. Cannot be used with `group_id`.
7676

77-
7877
## Attributes Reference
7978

8079
The following attributes are exported:
@@ -193,7 +192,7 @@ Projects items have the following fields:
193192

194193
The `owner` attribute exposes the following sub-attributes:
195194

196-
~> NOTE: These sub-attributes are only populated if the Gitlab token used has an administrator scope.
195+
> **NOTE**: These sub-attributes are only populated if the Gitlab token used has an administrator scope.
197196
198197
* `id`
199198

docs/data-sources/users.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# gitlab\_users
22

3-
Provides details about a list of users in the gitlab provider. The results include id, username, email, name and more about the requested users. Users can also be sorted and filtered using several options.
3+
Provide details about a list of users in the gitlab provider. The results include id, username, email, name and more about the requested users. Users can also be sorted and filtered using several options.
44

5-
**NOTE**: Some of the available options require administrator privileges. Please visit [Gitlab API documentation][users_for_admins] for more information.
5+
**NOTE**: Some available options require administrator privileges. Please visit [Gitlab API documentation][users_for_admins] for more information.
66

77
## Example Usage
88

@@ -12,6 +12,10 @@ data "gitlab_users" "example" {
1212
order_by = "name"
1313
created_before = "2019-01-01"
1414
}
15+
16+
data "gitlab_users" "example-two" {
17+
search = "username"
18+
}
1519
```
1620

1721
## Argument Reference
@@ -36,7 +40,6 @@ The following arguments are supported:
3640

3741
* `created_after` - (Optional) Search for users created after a specific date. (Requires administrator privileges)
3842

39-
4043
## Attributes Reference
4144

4245
The following attributes are exported:
@@ -56,19 +59,18 @@ The following attributes are exported:
5659
* `extern_uid` - The external UID of the user.
5760
* `provider` - The UID provider of the user.
5861
* `organization` - The organization of the user.
59-
* `two_factor_enabled` - Whether user's two factor auth is enabled.
62+
* `two_factor_enabled` - Whether user's two-factor auth is enabled.
6063
* `note` - The note associated to the user.
6164
* `avatar_url` - The avatar URL of the user.
6265
* `bio` - The bio of the user.
6366
* `location` - The location of the user.
6467
* `skype` - Skype username of the user.
65-
* `linkedin` - Linkedin profile of the user.
68+
* `linkedin` - LinkedIn profile of the user.
6669
* `twitter` - Twitter username of the user.
6770
* `website_url` - User's website URL.
6871
* `theme_id` - User's theme ID.
6972
* `color_scheme_id` - User's color scheme ID.
7073
* `last_sign_in_at` - Last user's sign-in date.
7174
* `current_sign_in_at` - Current user's sign-in date.
7275

73-
7476
[users_for_admins]: https://docs.gitlab.com/ce/api/users.html#for-admins

docs/resources/deploy_key.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# gitlab\_deploy\_key
22

3-
This resource allows you to create and manage deploy keys for your GitLab projects.
4-
3+
This resource allows you to create and manage [deploy keys](https://docs.gitlab.com/ee/user/project/deploy_keys/) for your GitLab projects.
54

65
## Example Usage
76

0 commit comments

Comments
 (0)