Skip to content

Commit f0f191f

Browse files
authored
Merge branch 'main' into workflow/release-notes
2 parents fe469a6 + af6bcd4 commit f0f191f

23 files changed

+865
-37
lines changed

.github/workflows/issue-opened.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2424
# Only add triage labels if they are NOT a collaborator.
2525
# This prevents the needs-triage label from being added.
26-
- uses: actions/checkout@v2
26+
- uses: actions/checkout@v3
2727
if: ${{ failure() }}
2828
- uses: github/[email protected]
2929
if: ${{ failure() }}

.github/workflows/pr-acceptance-ce.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
outputs:
2323
go-version: ${{ steps.go-version.outputs.go-version }}
2424
steps:
25-
- uses: actions/checkout@v2
25+
- uses: actions/checkout@v3
2626
# Read the .go-version file and output it for other jobs to use.
2727
- id: go-version
2828
run: echo "::set-output name=go-version::$(cat .go-version)"
@@ -35,7 +35,7 @@ jobs:
3535
- uses: actions/setup-go@v2
3636
with:
3737
go-version: ${{ needs.go-version.outputs.go-version }}
38-
- uses: actions/checkout@v2
38+
- uses: actions/checkout@v3
3939
# Cache the Go modules.
4040
- uses: actions/cache@v2
4141
with:

.github/workflows/pr-acceptance-ee.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
go-version: ${{ steps.go-version.outputs.go-version }}
3939
steps:
4040
# Check out the pull request code (as opposed to the target project).
41-
- uses: actions/checkout@v2
41+
- uses: actions/checkout@v3
4242
with:
4343
ref: ${{ github.event.pull_request.head.sha }}
4444
persist-credentials: false
@@ -72,7 +72,7 @@ jobs:
7272
go-version: ${{ needs.go-version.outputs.go-version }}
7373
# Check out the target project (as opposed to the pull request code).
7474
# Yes, this is intentional. We are using trusted code while working with the GitLab license.
75-
- uses: actions/checkout@v2
75+
- uses: actions/checkout@v3
7676
with:
7777
ref: ${{ github.event.repository.default_branch }}
7878
persist-credentials: false
@@ -84,7 +84,7 @@ jobs:
8484
# Check out the pull request code (as opposed to the target project).
8585
# This overwrites the entire directory and deleted the unencrypted GitLab license file. The
8686
# service has already started and continues using the license even though the file is deleted.
87-
- uses: actions/checkout@v2
87+
- uses: actions/checkout@v3
8888
with:
8989
ref: ${{ github.event.pull_request.head.sha }}
9090
persist-credentials: false

.github/workflows/pr-lint.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
outputs:
1515
go-version: ${{ steps.go-version.outputs.go-version }}
1616
steps:
17-
- uses: actions/checkout@v2
17+
- uses: actions/checkout@v3
1818
# Read the .go-version file and output it for other jobs to use.
1919
- id: go-version
2020
run: echo "::set-output name=go-version::$(cat .go-version)"
@@ -36,7 +36,7 @@ jobs:
3636
- uses: actions/setup-go@v2
3737
with:
3838
go-version: ${{ needs.go-version.outputs.go-version }}
39-
- uses: actions/checkout@v2
39+
- uses: actions/checkout@v3
4040
# Cache the Go modules and compiled tools for the specific lint target.
4141
- uses: actions/cache@v2
4242
with:
@@ -57,7 +57,7 @@ jobs:
5757
- uses: actions/setup-go@v2
5858
with:
5959
go-version: ${{ needs.go-version.outputs.go-version }}
60-
- uses: actions/checkout@v2
60+
- uses: actions/checkout@v3
6161
# Cache the Go modules.
6262
- uses: actions/cache@v2
6363
with:

.github/workflows/pr-target.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
labels:
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v2
16+
- uses: actions/checkout@v3
1717
- uses: actions/labeler@v3
1818
with:
1919
configuration-path: .github/labeler-pr-triage.yml

.github/workflows/push.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
outputs:
2727
go-version: ${{ steps.go-version.outputs.go-version }}
2828
steps:
29-
- uses: actions/checkout@v2
29+
- uses: actions/checkout@v3
3030
# Read the .go-version file and output it for other jobs to use.
3131
- id: go-version
3232
run: echo "::set-output name=go-version::$(cat .go-version)"
@@ -48,7 +48,7 @@ jobs:
4848
- uses: actions/setup-go@v2
4949
with:
5050
go-version: ${{ needs.go-version.outputs.go-version }}
51-
- uses: actions/checkout@v2
51+
- uses: actions/checkout@v3
5252
# Cache the Go modules and compiled tools for the specific lint target.
5353
- uses: actions/cache@v2
5454
with:
@@ -69,7 +69,7 @@ jobs:
6969
- uses: actions/setup-go@v2
7070
with:
7171
go-version: ${{ needs.go-version.outputs.go-version }}
72-
- uses: actions/checkout@v2
72+
- uses: actions/checkout@v3
7373
# Cache the Go modules.
7474
- uses: actions/cache@v2
7575
with:
@@ -98,7 +98,7 @@ jobs:
9898
- uses: actions/setup-go@v2
9999
with:
100100
go-version: ${{ needs.go-version.outputs.go-version }}
101-
- uses: actions/checkout@v2
101+
- uses: actions/checkout@v3
102102
# Cache the Go modules.
103103
- uses: actions/cache@v2
104104
with:
@@ -118,7 +118,7 @@ jobs:
118118
- uses: actions/setup-go@v2
119119
with:
120120
go-version: ${{ needs.go-version.outputs.go-version }}
121-
- uses: actions/checkout@v2
121+
- uses: actions/checkout@v3
122122
# Cache the Go modules.
123123
- uses: actions/cache@v2
124124
with:

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
outputs:
2121
go-version: ${{ steps.go-version.outputs.go-version }}
2222
steps:
23-
- uses: actions/checkout@v2
23+
- uses: actions/checkout@v3
2424
# Read the .go-version file and output it for other jobs to use.
2525
- id: go-version
2626
run: echo "::set-output name=go-version::$(cat .go-version)"
@@ -29,7 +29,7 @@ jobs:
2929
needs: [go-version]
3030
steps:
3131
- name: Checkout
32-
uses: actions/checkout@v2.4.0
32+
uses: actions/checkout@v3
3333
- name: Unshallow
3434
run: git fetch --prune --unshallow
3535
- name: Set up Go
@@ -50,7 +50,7 @@ jobs:
5050
sed -n "/## $LATEST_TAG/,/## $PREVIOUS_TAG"'/{//!p;}' CHANGELOG.md > /tmp/RELEASE-NOTES.md
5151
cat /tmp/RELEASE-NOTES.md
5252
- name: Run GoReleaser
53-
uses: goreleaser/goreleaser-action@v2.8.1
53+
uses: goreleaser/goreleaser-action@v2.9.1
5454
with:
5555
version: latest
5656
args: release --release-notes /tmp/RELEASE-NOTES.md --rm-dist

docs/data-sources/project_tag.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "gitlab_project_tag Data Source - terraform-provider-gitlab"
4+
subcategory: ""
5+
description: |-
6+
The gitlab_project_tag data source allows details of a project tag to be retrieved by its name.
7+
Upstream API : GitLab API docs https://docs.gitlab.com/ee/api/tags.html
8+
---
9+
10+
# gitlab_project_tag (Data Source)
11+
12+
The `gitlab_project_tag` data source allows details of a project tag to be retrieved by its name.
13+
14+
**Upstream API** : [GitLab API docs](https://docs.gitlab.com/ee/api/tags.html)
15+
16+
## Example Usage
17+
18+
```terraform
19+
# By project ID
20+
data "gitlab_project_tag" "foo" {
21+
name = "example"
22+
project = "12345"
23+
}
24+
25+
# By project full path
26+
data "gitlab_project_tag" "foo" {
27+
name = "example"
28+
project = "foo/bar"
29+
}
30+
```
31+
32+
<!-- schema generated by tfplugindocs -->
33+
## Schema
34+
35+
### Required
36+
37+
- **name** (String) The name of a tag.
38+
- **project** (String) The ID or URL-encoded path of the project owned by the authenticated user.
39+
40+
### Optional
41+
42+
- **id** (String) The ID of this resource.
43+
44+
### Read-Only
45+
46+
- **commit** (Set of Object) The commit associated with the tag ref. (see [below for nested schema](#nestedatt--commit))
47+
- **message** (String) Creates annotated tag.
48+
- **protected** (Boolean) Bool, true if tag has tag protection.
49+
- **release** (Set of Object) The release associated with the tag. (see [below for nested schema](#nestedatt--release))
50+
- **target** (String) The unique id assigned to the commit by Gitlab.
51+
52+
<a id="nestedatt--commit"></a>
53+
### Nested Schema for `commit`
54+
55+
Read-Only:
56+
57+
- **author_email** (String)
58+
- **author_name** (String)
59+
- **authored_date** (String)
60+
- **committed_date** (String)
61+
- **committer_email** (String)
62+
- **committer_name** (String)
63+
- **id** (String)
64+
- **message** (String)
65+
- **parent_ids** (Set of String)
66+
- **short_id** (String)
67+
- **title** (String)
68+
69+
70+
<a id="nestedatt--release"></a>
71+
### Nested Schema for `release`
72+
73+
Read-Only:
74+
75+
- **description** (String)
76+
- **tag_name** (String)
77+
78+

docs/resources/project_approval_rule.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,14 @@ resource "gitlab_project_approval_rule" "example-three" {
5454
approvals_required = 3
5555
user_ids = [for user in data.gitlab_user.users : user.id]
5656
}
57+
58+
# Example using `approval_rule`
59+
resource "gitlab_branch_protection" "any-approver" {
60+
project = 5
61+
name = "Any name"
62+
rule_type = "any_approver"
63+
approvals_required = 1
64+
}
5765
```
5866

5967
<!-- schema generated by tfplugindocs -->
@@ -70,6 +78,7 @@ resource "gitlab_project_approval_rule" "example-three" {
7078
- **group_ids** (Set of Number) A list of group IDs whose members can approve of the merge request.
7179
- **id** (String) The ID of this resource.
7280
- **protected_branch_ids** (Set of Number) A list of protected branch IDs (not branch names) for which the rule applies.
81+
- **rule_type** (String) String, defaults to 'regular'. The type of rule. `any_approver` is a pre-configured default rule with `approvals_required` at `0`. Valid values are `regular`, `any_approver`.
7382
- **user_ids** (Set of Number) A list of specific User IDs to add to the list of approvers.
7483

7584
## Import

docs/resources/project_tag.md

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "gitlab_project_tag Resource - terraform-provider-gitlab"
4+
subcategory: ""
5+
description: |-
6+
The gitlab_project_tag resource allows to manage the lifecycle of a tag in a project.
7+
Upstream API : GitLab API docs https://docs.gitlab.com/ee/api/tags.html
8+
---
9+
10+
# gitlab_project_tag (Resource)
11+
12+
The `gitlab_project_tag` resource allows to manage the lifecycle of a tag in a project.
13+
14+
**Upstream API** : [GitLab API docs](https://docs.gitlab.com/ee/api/tags.html)
15+
16+
## Example Usage
17+
18+
```terraform
19+
# Create a project for the tag to use
20+
resource "gitlab_project" "example" {
21+
name = "example"
22+
description = "An example project"
23+
namespace_id = gitlab_group.example.id
24+
}
25+
26+
resource "gitlab_project_tag" "example" {
27+
name = "example"
28+
ref = "main"
29+
project = gitlab_project.example.id
30+
}
31+
```
32+
33+
<!-- schema generated by tfplugindocs -->
34+
## Schema
35+
36+
### Required
37+
38+
- **name** (String) The name of a tag.
39+
- **project** (String) The ID or URL-encoded path of the project owned by the authenticated user.
40+
- **ref** (String) Create tag using commit SHA, another tag name, or branch name. This attribute is not available for imported resources.
41+
42+
### Optional
43+
44+
- **id** (String) The ID of this resource.
45+
- **message** (String) Creates annotated tag.
46+
47+
### Read-Only
48+
49+
- **commit** (Set of Object) The commit associated with the tag. (see [below for nested schema](#nestedatt--commit))
50+
- **protected** (Boolean) Bool, true if tag has tag protection.
51+
- **release** (Set of Object) The release associated with the tag. (see [below for nested schema](#nestedatt--release))
52+
- **target** (String) The unique id assigned to the commit by Gitlab.
53+
54+
<a id="nestedatt--commit"></a>
55+
### Nested Schema for `commit`
56+
57+
Read-Only:
58+
59+
- **author_email** (String)
60+
- **author_name** (String)
61+
- **authored_date** (String)
62+
- **committed_date** (String)
63+
- **committer_email** (String)
64+
- **committer_name** (String)
65+
- **id** (String)
66+
- **message** (String)
67+
- **parent_ids** (Set of String)
68+
- **short_id** (String)
69+
- **title** (String)
70+
71+
72+
<a id="nestedatt--release"></a>
73+
### Nested Schema for `release`
74+
75+
Read-Only:
76+
77+
- **description** (String)
78+
- **tag_name** (String)
79+
80+
## Import
81+
82+
Import is supported using the following syntax:
83+
84+
```shell
85+
# Gitlab project tags can be imported with a key composed of `<project_id>:<tag_name>`, e.g.
86+
terraform import gitlab_project_tag.example "12345:develop"
87+
88+
# NOTE: the `ref` attribute won't be available for imported `gitlab_project_tag` resources.
89+
```

0 commit comments

Comments
 (0)