Skip to content

Commit d373a4f

Browse files
authored
Merge branch 'main' into terrabitz/fix-github-hosted-runner-image-import
2 parents 9abbe99 + 23f7983 commit d373a4f

79 files changed

Lines changed: 374 additions & 349 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/ISSUE_TEMPLATE/bug.yml

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ body:
77
attributes:
88
value: |
99
Hi there,
10-
Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.
10+
Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests.
11+
For general usage questions, please see: https://github.com/integrations/terraform-provider-github/discussions.
1112
1213
- type: textarea
1314
id: expected-behavior
@@ -31,9 +32,24 @@ body:
3132
label: Terraform Version
3233
description: Run `terraform -v` to show the version. If you are not running the latest version of Terraform, please upgrade because your issue may have already been fixed.
3334
placeholder: |
34-
Terraform v1.2.3
35+
Terraform vX.Y.Z
3536
on linux_amd64
36-
+ provider registry.terraform.io/integrations/github v5.32.0
37+
+ provider registry.terraform.io/integrations/github vX.Y.Z
38+
validations:
39+
required: true
40+
41+
- type: checkboxes
42+
id: github-installation
43+
attributes:
44+
label: GitHub Installation Type
45+
description: What type of GitHub installation are you using?
46+
options:
47+
- label: GitHub.com (Free, Pro, or Team)
48+
- label: GitHub Enterprise Server (on-premises)
49+
- label: GitHub Enterprise Cloud with Personal Accounts (github.com)
50+
- label: GitHub Enterprise Cloud with Managed Users/EMU (github.com)
51+
- label: GitHub Enterprise Cloud with Data Residency (*.ghe.com)
52+
- label: I don't know
3753
validations:
3854
required: true
3955

@@ -55,7 +71,7 @@ body:
5571
label: Terraform Configuration Files
5672
render: hcl
5773
description: |
58-
Please copy and paste any relevant configration files. This will be automatically formatted into code, so no need for backticks.
74+
Please copy and paste any relevant configuration files. This will be automatically formatted into code, so no need for backticks. If this configuration is inside a Module, please mention that.
5975
Please check your configuration before submission to ensure sensitive information is redacted.
6076
validations:
6177
required: false
@@ -64,7 +80,7 @@ body:
6480
id: steps-to-reproduce
6581
attributes:
6682
label: Steps to Reproduce
67-
description: Please list the steps required to reproduce the issue.
83+
description: Please list the steps required to reproduce the issue. Remember to mention any configuration outside of Terraform that could be relevant to the issue.
6884
placeholder: |
6985
```
7086
$ terraform apply
@@ -78,17 +94,7 @@ body:
7894
label: Debug Output
7995
description: |
8096
Please copy and paste any relevant debug output. This will be automatically formatted into code, so no need for backticks.
81-
Please check your logs before submission to ensure sensitive information is redacted.
82-
render: shell
83-
validations:
84-
required: false
85-
86-
- type: textarea
87-
id: panic-output
88-
attributes:
89-
label: Panic Output
90-
description: |
91-
Please copy and paste any relevant panic output. This will be automatically formatted into code, so no need for backticks.
97+
Please run your `terraform` command with `TF_LOG=DEBUG` set, then copy and paste the output. This will be automatically formatted into code, so no need for backticks.
9298
Please check your logs before submission to ensure sensitive information is redacted.
9399
render: shell
94100
validations:

.github/ISSUE_TEMPLATE/documentation.yml

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ body:
77
attributes:
88
value: |
99
Thanks for taking the time to fill this out!
10+
1011
- type: textarea
1112
id: describe-need
1213
attributes:
@@ -15,22 +16,7 @@ body:
1516
placeholder: Describe the need for documentation updates here.
1617
validations:
1718
required: true
18-
- type: input
19-
id: sdk_version
20-
attributes:
21-
label: SDK Version
22-
description: Do these docs apply to a specific SDK version?
23-
placeholder: Octokit.NET v4.0.1
24-
validations:
25-
required: false
26-
- type: input
27-
id: api_version
28-
attributes:
29-
label: API Version
30-
description: Do these docs apply to a specific version of the GitHub REST API or GraphQL API?
31-
placeholder: ex. v1.1.1
32-
validations:
33-
required: false
19+
3420
- type: textarea
3521
id: logs
3622
attributes:
@@ -39,6 +25,7 @@ body:
3925
Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
4026
Please check your logs before submission to ensure sensitive information is redacted.
4127
render: shell
28+
4229
- type: checkboxes
4330
id: terms
4431
attributes:

.github/ISSUE_TEMPLATE/feature.yml

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ body:
77
attributes:
88
value: |
99
Thanks for taking the time to fill this out!
10+
1011
- type: textarea
1112
id: describe-need
1213
attributes:
@@ -15,22 +16,22 @@ body:
1516
placeholder: Describe the need for the feature.
1617
validations:
1718
required: true
18-
- type: input
19-
id: sdk_version
20-
attributes:
21-
label: SDK Version
22-
description: Does this feature suggestion apply to a specific SDK version?
23-
placeholder: Octokit.rb v6.0.0
24-
validations:
25-
required: false
26-
- type: input
27-
id: api_version
19+
20+
- type: checkboxes
21+
id: github-installation
2822
attributes:
29-
label: API Version
30-
description: Does this feature suggestion apply to a specific version of the GitHub REST API or GraphQL API?
31-
placeholder: ex. v1.1.1
23+
label: GitHub Installation Type
24+
description: What type of GitHub installation are you using?
25+
options:
26+
- label: GitHub.com (Free, Pro, or Team)
27+
- label: GitHub Enterprise Server (on-premises)
28+
- label: GitHub Enterprise Cloud with Personal Accounts (github.com)
29+
- label: GitHub Enterprise Cloud with Managed Users/EMU (github.com)
30+
- label: GitHub Enterprise Cloud with Data Residency (*.ghe.com)
31+
- label: I don't know
3232
validations:
33-
required: false
33+
required: true
34+
3435
- type: textarea
3536
id: logs
3637
attributes:
@@ -39,6 +40,7 @@ body:
3940
Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
4041
Please check your logs before submission to ensure sensitive information is redacted.
4142
render: shell
43+
4244
- type: checkboxes
4345
id: terms
4446
attributes:

.github/ISSUE_TEMPLATE/maintenance.yml

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ body:
77
attributes:
88
value: |
99
Thanks for taking the time to fill this out!
10+
1011
- type: textarea
1112
id: describe-need
1213
attributes:
@@ -15,22 +16,7 @@ body:
1516
placeholder: Describe the maintenance need here.
1617
validations:
1718
required: true
18-
- type: input
19-
id: sdk_version
20-
attributes:
21-
label: SDK Version
22-
description: Does this maintenance apply to a specific SDK version?
23-
placeholder: terraform-provider-github v5.7.0
24-
validations:
25-
required: false
26-
- type: input
27-
id: api_version
28-
attributes:
29-
label: API Version
30-
description: Does this maintenance apply to a specific version of the GitHub REST API or GraphQL API?
31-
placeholder: ex. v1.1.1
32-
validations:
33-
required: false
19+
3420
- type: textarea
3521
id: logs
3622
attributes:
@@ -39,6 +25,7 @@ body:
3925
Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
4026
Please check your logs before submission to ensure sensitive information is redacted.
4127
render: shell
28+
4229
- type: checkboxes
4330
id: terms
4431
attributes:

.github/workflows/ci.yaml

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,37 @@ jobs:
3333
with:
3434
go-version-file: go.mod
3535
cache: true
36-
- run: make tools
37-
- run: make build
36+
- name: golangci-lint
37+
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0
38+
with:
39+
version: latest
40+
- run: make build -o lintcheck # Stop running `make lintcheck` before build. Linting is handled separately
3841
- run: make test
3942

43+
lint-new:
44+
name: Strict linting of new code
45+
runs-on: ubuntu-latest
46+
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
47+
permissions:
48+
contents: read
49+
pull-requests: read
50+
steps:
51+
- name: Checkout
52+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
53+
- name: Set-up Go
54+
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
55+
with:
56+
go-version-file: go.mod
57+
cache: true
58+
- run: make .golangci.new.yml
59+
- name: golangci-lint
60+
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0
61+
with:
62+
version: latest
63+
github-token: ${{ secrets.GITHUB_TOKEN }}
64+
only-new-issues: true
65+
args: --config=.golangci.new.yml
66+
4067
docs:
4168
name: Documentation
4269
runs-on: ubuntu-latest
@@ -54,13 +81,13 @@ jobs:
5481
go-version-file: go.mod
5582
cache: true
5683
- name: Set-up Terraform
57-
uses: hashicorp/setup-terraform@5e8dbf3c6d9deaf4193ca7a8fb23f2ac83bb6c85 # v4.0.0
84+
uses: hashicorp/setup-terraform@dfe3c3f87815947d99a8997f908cb6525fc44e9e # v4.0.1
5885
with:
5986
terraform_version: latest
6087
terraform_wrapper: false
6188
- run: make checkdocs
6289
- run: make validatedocs
63-
- uses: rvben/rumdl@9a78b143c00cc273fa0636410b91ec9acde1004a # v0.1.90
90+
- uses: rvben/rumdl@3cf0ff7193ebd32f6f158d1b668592390ceaa696 # v0.1.91
6491
with:
6592
path: ./docs
6693
report-type: annotations
@@ -70,6 +97,7 @@ jobs:
7097
needs:
7198
- ci
7299
- docs
100+
- lint-new
73101
if: always()
74102
runs-on: ubuntu-latest
75103
defaults:

.github/workflows/codeql.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
cache: true
5050

5151
- name: Initialize CodeQL
52-
uses: github/codeql-action/init@e46ed2cbd01164d986452f91f178727624ae40d7 # v4.35.3
52+
uses: github/codeql-action/init@68bde559dea0fdcac2102bfdf6230c5f70eb485e # v4.35.4
5353
with:
5454
languages: ${{ matrix.language }}
5555
build-mode: ${{ matrix.build-mode }}
@@ -60,6 +60,6 @@ jobs:
6060
run: go build ./...
6161

6262
- name: Perform CodeQL Analysis
63-
uses: github/codeql-action/analyze@e46ed2cbd01164d986452f91f178727624ae40d7 # v4.35.3
63+
uses: github/codeql-action/analyze@68bde559dea0fdcac2102bfdf6230c5f70eb485e # v4.35.4
6464
with:
6565
category: "/language:${{matrix.language}}"

.github/workflows/dotcom-acceptance-tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ jobs:
8282
cache: true
8383

8484
- name: Setup Terraform
85-
uses: hashicorp/setup-terraform@5e8dbf3c6d9deaf4193ca7a8fb23f2ac83bb6c85 # v4.0.0
85+
uses: hashicorp/setup-terraform@dfe3c3f87815947d99a8997f908cb6525fc44e9e # v4.0.1
8686
with:
8787
terraform_version: latest
8888
terraform_wrapper: false

.github/workflows/ghes-acceptance-tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ jobs:
9393
cache: true
9494

9595
- name: Setup Terraform
96-
uses: hashicorp/setup-terraform@5e8dbf3c6d9deaf4193ca7a8fb23f2ac83bb6c85 # v4.0.0
96+
uses: hashicorp/setup-terraform@dfe3c3f87815947d99a8997f908cb6525fc44e9e # v4.0.1
9797
with:
9898
terraform_version: latest
9999
terraform_wrapper: false

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ testdata/
3030
website/vendor
3131
terraform-provider-github
3232

33+
# Generated temporary files
34+
.golangci.new.yml
35+
3336
# Test exclusions
3437
!command/test-fixtures/**/*.tfstate
3538
!command/test-fixtures/**/.terraform/

.golangci.strict.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# These rules are enabled for any new code, but not for the whole codebase yet.
2+
# This file is for linting rules we want to start enforcing, but can't enable for the whole codebase yet.
3+
# Always add new rules to .golangci.yml first. If they cause too many issues to fix reasonably, add them here instead.
4+
# Once a rule in here has been fixed across the codebase, remove it from here and add it to .golangci.yml.
5+
version: "2"
6+
7+
linters:
8+
enable:
9+
- forcetypeassert

0 commit comments

Comments
 (0)