Skip to content

Commit 0b73948

Browse files
Merge branch 'main' into issue-782
2 parents ef08e4b + 2dea817 commit 0b73948

28 files changed

+1052
-79
lines changed

.github/workflows/issue-comment-created.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,19 @@ permissions:
1212
jobs:
1313
remove-labels:
1414
runs-on: ubuntu-latest
15+
# This job contains steps which are expected to fail.
16+
continue-on-error: true
1517
steps:
18+
- name: Is comment from a collaborator?
19+
uses: octokit/[email protected]
20+
with:
21+
route: GET /repos/${{ github.repository }}/collaborators/${{ github.event.sender.login }}
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
# Only remove labels if they are NOT a collaborator.
25+
# Reason being, a collaborator may post a comment and add a waiting-response label.
1626
- uses: actions-ecosystem/action-remove-labels@v1
27+
if: ${{ failure() }}
1728
with:
1829
labels: |
1930
stale

.github/workflows/issue-opened.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,21 @@ permissions:
1212
jobs:
1313
add-labels:
1414
runs-on: ubuntu-latest
15+
# This job contains steps which are expected to fail.
16+
continue-on-error: true
1517
steps:
18+
- name: Is opened by a collaborator?
19+
uses: octokit/[email protected]
20+
with:
21+
route: GET /repos/${{ github.repository }}/collaborators/${{ github.event.sender.login }}
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
# Only add triage labels if they are NOT a collaborator.
25+
# This prevents the needs-triage label from being added.
1626
- uses: actions/checkout@v2
27+
if: ${{ failure() }}
1728
- uses: github/[email protected]
29+
if: ${{ failure() }}
1830
with:
1931
repo-token: "${{ secrets.GITHUB_TOKEN }}"
2032
configuration-path: .github/labeler-issue-triage.yml

docs/data-sources/projects.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ Read-Only:
8282
- **avatar_url** (String)
8383
- **build_coverage_regex** (String)
8484
- **ci_config_path** (String)
85+
- **ci_forward_deployment_enabled** (Boolean)
8586
- **container_registry_enabled** (Boolean)
8687
- **created_at** (String)
8788
- **creator_id** (Number)
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "gitlab_group_access_token Resource - terraform-provider-gitlab"
4+
subcategory: ""
5+
description: |-
6+
This resource allows you to create and manage Group Access Token for your GitLab Groups. (Introduced in GitLab 14.7)
7+
---
8+
9+
# gitlab_group_access_token (Resource)
10+
11+
This resource allows you to create and manage Group Access Token for your GitLab Groups. (Introduced in GitLab 14.7)
12+
13+
## Example Usage
14+
15+
```terraform
16+
resource "gitlab_group_access_token" "example" {
17+
group = "25"
18+
name = "Example project access token"
19+
expires_at = "2020-03-14"
20+
access_level = "developer"
21+
22+
scopes = ["api"]
23+
}
24+
25+
resource "gitlab_group_variable" "example" {
26+
group = "25"
27+
key = "gat"
28+
value = gitlab_group_access_token.example.token
29+
}
30+
```
31+
32+
<!-- schema generated by tfplugindocs -->
33+
## Schema
34+
35+
### Required
36+
37+
- **group** (String) The ID or path of the group to add the group access token to.
38+
- **name** (String) The name of the group access token.
39+
- **scopes** (Set of String) The scope for the group access token. It determines the actions which can be performed when authenticating with this token. Valid values are: `api`, `read_api`, `read_registry`, `write_registry`, `read_repository`, `write_repository`.
40+
41+
### Optional
42+
43+
- **access_level** (String) The access level for the group access token. Valid values are: `guest`, `reporter`, `developer`, `maintainer`.
44+
- **expires_at** (String) The token expires at midnight UTC on that date. The date must be in the format YYYY-MM-DD. Default is never.
45+
- **id** (String) The ID of this resource.
46+
47+
### Read-Only
48+
49+
- **active** (Boolean) True if the token is active.
50+
- **created_at** (String) Time the token has been created, RFC3339 format.
51+
- **revoked** (Boolean) True if the token is revoked.
52+
- **token** (String, Sensitive) The group access token. This is only populated when creating a new group access token. This attribute is not available for imported resources.
53+
- **user_id** (Number) The user id associated to the token.
54+
55+
## Import
56+
57+
Import is supported using the following syntax:
58+
59+
```shell
60+
# A GitLab Group Access Token can be imported using a key composed of `<group-id>:<token-id>`, e.g.
61+
terraform import gitlab_group_access_token.example "12345:1"
62+
63+
# ATTENTION: the `token` resource attribute is not available for imported resources as this information cannot be read from the GitLab API.
64+
```

docs/resources/project.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ resource "gitlab_project" "example-two" {
4848
- **archived** (Boolean) Whether the project is in read-only mode (archived). Repositories can be archived/unarchived by toggling this parameter.
4949
- **build_coverage_regex** (String) Test coverage parsing for the project.
5050
- **ci_config_path** (String) Custom Path to CI config file.
51+
- **ci_forward_deployment_enabled** (Boolean) When a new deployment job starts, skip older deployment jobs that are still pending.
5152
- **container_registry_enabled** (Boolean) Enable container registry for the project.
5253
- **default_branch** (String) The default branch for the project.
5354
- **description** (String) A description of the project.

docs/resources/user.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ resource "gitlab_user" "example" {
5151
- **projects_limit** (Number) Integer, defaults to 0. Number of projects user can create.
5252
- **reset_password** (Boolean) Boolean, defaults to false. Send user password reset link.
5353
- **skip_confirmation** (Boolean) Boolean, defaults to true. Whether to skip confirmation.
54+
- **state** (String) String, defaults to 'active'. The state of the user account. Valid values are either 'active' or 'blocked'
5455

5556
## Import
5657

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# A GitLab Group Access Token can be imported using a key composed of `<group-id>:<token-id>`, e.g.
2+
terraform import gitlab_group_access_token.example "12345:1"
3+
4+
# ATTENTION: the `token` resource attribute is not available for imported resources as this information cannot be read from the GitLab API.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
resource "gitlab_group_access_token" "example" {
2+
group = "25"
3+
name = "Example project access token"
4+
expires_at = "2020-03-14"
5+
access_level = "developer"
6+
7+
scopes = ["api"]
8+
}
9+
10+
resource "gitlab_group_variable" "example" {
11+
group = "25"
12+
key = "gat"
13+
value = gitlab_group_access_token.example.token
14+
}

go.mod

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@ go 1.16
55
require (
66
github.com/apparentlymart/go-cidr v1.1.0 // indirect
77
github.com/aws/aws-sdk-go v1.37.0 // indirect
8+
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320
89
github.com/hashicorp/go-retryablehttp v0.7.0
910
github.com/hashicorp/hcl/v2 v2.8.2 // indirect
1011
github.com/hashicorp/terraform-plugin-sdk/v2 v2.10.1
1112
github.com/mitchellh/hashstructure v1.1.0
1213
github.com/onsi/gomega v1.18.1
13-
github.com/xanzy/go-gitlab v0.54.4
14+
github.com/xanzy/go-gitlab v0.55.0
1415
google.golang.org/api v0.34.0 // indirect
1516
)

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,8 +344,8 @@ github.com/vmihailenco/msgpack v4.0.4+incompatible h1:dSLoQfGFAo3F6OoNhwUmLwVgaU
344344
github.com/vmihailenco/msgpack v4.0.4+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk=
345345
github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4=
346346
github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI=
347-
github.com/xanzy/go-gitlab v0.54.4 h1:3CFEdQ9O+bFx3BsyuOK0gqgLPwnT2rwnPOjudV07wTw=
348-
github.com/xanzy/go-gitlab v0.54.4/go.mod h1:F0QEXwmqiBUxCgJm8fE9S+1veX4XC9Z4cfaAbqwk4YM=
347+
github.com/xanzy/go-gitlab v0.55.0 h1:klg5EgPYtsF6QlnVFpOpv/FmhqQxCUUG7zLJIL1NKz8=
348+
github.com/xanzy/go-gitlab v0.55.0/go.mod h1:F0QEXwmqiBUxCgJm8fE9S+1veX4XC9Z4cfaAbqwk4YM=
349349
github.com/xanzy/ssh-agent v0.3.0 h1:wUMzuKtKilRgBAD1sUb8gOwwRr2FGoBVumcjoOACClI=
350350
github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0=
351351
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=

0 commit comments

Comments
 (0)