feat(actions_permissions): sha_pinning_required#2870
Conversation
6289202 to
49ad201
Compare
b88390d to
6e23078
Compare
|
I ran |
|
@nickfloyd, thanks! I guess I will only update this pull request once the provider supports go-github v79.. 🙇 |
|
@sheeeng We now have |
e98cc10 to
1bbc69f
Compare
9e57d44 to
4850248
Compare
Could you try to click on the |
|
@sheeeng you've just added an image of a link not the contents. |
Those lines to skip tests are defined already in the current file in default branch. terraform-provider-github/GNUmakefile Lines 56 to 57 in 15fff78 Sorry that I don't get what you meant by Which environment variables do you have in mind? Ran both |
You need to run |
|
Thanks for the tips, @deiga. I will need to spend a bit more time on getting the tests to work properly. |
71a4408 to
98f02f7
Compare
Tests$ cat .envrc
# Enable debug logging
export TF_LOG="WARN"
# Enables acceptance tests
export TF_ACC="1"
# Use local provider build for testing
export TF_CLI_CONFIG_FILE="$PWD/examples/dev.tfrc"
# Configure acceptance testing mode; one of anonymous, individual, organization, team or enterprise. If not set will default to anonymous
export GH_TEST_AUTH_MODE="individual"
# Configure authentication for testing
export GITHUB_OWNER="mock-organization"
export GITHUB_USERNAME="mock-user"
export GITHUB_TOKEN="ghp_ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"$ cat examples/dev.tfrc
provider_installation {
dev_overrides {
"integrations/github" = "~/go/bin/"
}
direct {}
}$ go build -gcflags="all=-N -l" -o ~/go/bin/
$
$ direnv allow
$
$ source .envrc
$
$ TF_ACC=1 go test -v ./github -run 'TestAccGithubActionsOrganizationPermissions' -timeout 120m -count=1
=== RUN TestAccGithubActionsOrganizationPermissions
=== RUN TestAccGithubActionsOrganizationPermissions/test_setting_of_basic_actions_organization_permissions
2026-01-22T11:37:26.312+0100 [WARN] sdk.helper_schema: Previously configured provider being re-configured. This can cause issues in concurrent testing if the configurations are not equal.: tf_provider_addr=registry.terraform.io/hashicorp/github tf_rpc=Configure tf_req_id=cbeda95f-1900-1f8e-0583-46e6e5755f07
=== RUN TestAccGithubActionsOrganizationPermissions/imports_entire_set_of_github_action_organization_permissions_without_error
2026-01-22T11:37:49.688+0100 [WARN] sdk.helper_schema: Previously configured provider being re-configured. This can cause issues in concurrent testing if the configurations are not equal.: tf_req_id=cf969af4-5af9-27d8-1e96-de1a314acd8b tf_provider_addr=registry.terraform.io/hashicorp/github tf_rpc=Configure
=== RUN TestAccGithubActionsOrganizationPermissions/test_setting_of_organization_allowed_actions
2026-01-22T11:38:01.628+0100 [WARN] sdk.helper_schema: Previously configured provider being re-configured. This can cause issues in concurrent testing if the configurations are not equal.: tf_provider_addr=registry.terraform.io/hashicorp/github tf_rpc=Configure tf_req_id=3ce1a899-2960-e626-9ab3-0d1c1341bd05
=== RUN TestAccGithubActionsOrganizationPermissions/test_not_setting_of_organization_allowed_actions_without_error
2026-01-22T11:38:07.416+0100 [WARN] sdk.helper_schema: Previously configured provider being re-configured. This can cause issues in concurrent testing if the configurations are not equal.: tf_req_id=6c46b2ff-0123-1190-4dca-fd7e3e73f8d2 tf_provider_addr=registry.terraform.io/hashicorp/github tf_rpc=Configure
=== RUN TestAccGithubActionsOrganizationPermissions/test_setting_of_organization_enabled_repositories
2026-01-22T11:38:38.038+0100 [WARN] sdk.helper_schema: Previously configured provider being re-configured. This can cause issues in concurrent testing if the configurations are not equal.: tf_rpc=Configure tf_req_id=fee86850-87e8-7568-227a-7510a42f0999 tf_provider_addr=registry.terraform.io/hashicorp/github
--- PASS: TestAccGithubActionsOrganizationPermissions (80.50s)
--- PASS: TestAccGithubActionsOrganizationPermissions/test_setting_of_basic_actions_organization_permissions (5.74s)
--- PASS: TestAccGithubActionsOrganizationPermissions/imports_entire_set_of_github_action_organization_permissions_without_error (25.08s)
--- PASS: TestAccGithubActionsOrganizationPermissions/test_setting_of_organization_allowed_actions (10.19s)
--- PASS: TestAccGithubActionsOrganizationPermissions/test_not_setting_of_organization_allowed_actions_without_error (6.00s)
--- PASS: TestAccGithubActionsOrganizationPermissions/test_setting_of_organization_enabled_repositories (33.50s)
PASS
ok github.com/integrations/terraform-provider-github/v6/github 81.103s
Time: 0h:01m:34s
$
$ TF_ACC=1 go test -v ./github -run 'TestAccGithubActionsRepositoryPermissions' -timeout 120m -count=1
=== RUN TestAccGithubActionsRepositoryPermissions
=== RUN TestAccGithubActionsRepositoryPermissions/test_setting_of_basic_actions_repository_permissions
2026-01-22T11:35:08.893+0100 [WARN] sdk.helper_schema: Previously configured provider being re-configured. This can cause issues in concurrent testing if the configurations are not equal.: tf_provider_addr=registry.terraform.io/hashicorp/github tf_rpc=Configure tf_req_id=1d3518bc-9a59-dbaf-04b3-316d769dba1d
=== RUN TestAccGithubActionsRepositoryPermissions/imports_entire_set_of_github_action_repository_permissions_without_error
2026-01-22T11:35:34.185+0100 [WARN] sdk.helper_schema: Previously configured provider being re-configured. This can cause issues in concurrent testing if the configurations are not equal.: tf_req_id=0d682b0b-4a92-1eac-f7a8-73f83532f305 tf_provider_addr=registry.terraform.io/hashicorp/github tf_rpc=Configure
=== RUN TestAccGithubActionsRepositoryPermissions/test_setting_of_repository_allowed_actions
2026-01-22T11:35:54.779+0100 [WARN] sdk.helper_schema: Previously configured provider being re-configured. This can cause issues in concurrent testing if the configurations are not equal.: tf_req_id=610af776-4da8-ba8f-1b79-5e3079103cc6 tf_provider_addr=registry.terraform.io/hashicorp/github tf_rpc=Configure
=== RUN TestAccGithubActionsRepositoryPermissions/test_not_setting_of_repository_allowed_actions_without_error
2026-01-22T11:36:13.712+0100 [WARN] sdk.helper_schema: Previously configured provider being re-configured. This can cause issues in concurrent testing if the configurations are not equal.: tf_req_id=e3ad1dc8-f47f-38e5-6881-f98b12b9986f tf_provider_addr=registry.terraform.io/hashicorp/github tf_rpc=Configure
=== RUN TestAccGithubActionsRepositoryPermissions/test_disabling_actions_on_a_repository
2026-01-22T11:36:34.737+0100 [WARN] sdk.helper_schema: Previously configured provider being re-configured. This can cause issues in concurrent testing if the configurations are not equal.: tf_req_id=2fddd04d-7619-64d3-4ffe-30ffae525760 tf_provider_addr=registry.terraform.io/hashicorp/github tf_rpc=Configure
=== RUN TestAccGithubActionsRepositoryPermissions/test_load_with_disabled_actions
2026-01-22T11:36:54.293+0100 [WARN] sdk.helper_schema: Previously configured provider being re-configured. This can cause issues in concurrent testing if the configurations are not equal.: tf_req_id=03bc7e76-ae7f-d57e-8748-e729288e3a6b tf_provider_addr=registry.terraform.io/hashicorp/github tf_rpc=Configure
--- PASS: TestAccGithubActionsRepositoryPermissions (124.38s)
--- PASS: TestAccGithubActionsRepositoryPermissions/test_setting_of_basic_actions_repository_permissions (18.83s)
--- PASS: TestAccGithubActionsRepositoryPermissions/imports_entire_set_of_github_action_repository_permissions_without_error (25.29s)
--- PASS: TestAccGithubActionsRepositoryPermissions/test_setting_of_repository_allowed_actions (20.59s)
--- PASS: TestAccGithubActionsRepositoryPermissions/test_not_setting_of_repository_allowed_actions_without_error (18.74s)
--- PASS: TestAccGithubActionsRepositoryPermissions/test_disabling_actions_on_a_repository (21.38s)
--- PASS: TestAccGithubActionsRepositoryPermissions/test_load_with_disabled_actions (19.55s)
PASS
ok github.com/integrations/terraform-provider-github/v6/github 124.921s |
|
@sheeeng please could you rebase this PR so we can get it merged? |
Fix integrations#2869. Signed-off-by: Leonard Sheng Sheng Lee <leonard.sheng.sheng.lee@gmail.com> Signed-off-by: Leonard Sheng Sheng Lee <305414+sheeeng@users.noreply.github.com>
98f02f7 to
a81c4b8
Compare
@stevehipwell, rebase done. |
Fix integrations#2869. Signed-off-by: Leonard Sheng Sheng Lee <leonard.sheng.sheng.lee@gmail.com> Signed-off-by: Leonard Sheng Sheng Lee <305414+sheeeng@users.noreply.github.com>
|
Wanted to check the docs for this, but noticed the docs might be missing? |
|
Thank you @nnellanspdl, could you please open an issue for the missing docs? |
Created #3181. I will work on it. |

Wait until google/go-github#3807 is being included in the next release.Resolves #2869.
Before the change?
sha_pinning_requiredoption for actions permissions is not supported.After the change?
sha_pinning_requiredoption actions permissions is supported.Pull request checklist
See plain-text output from `make test` command.
Does this introduce a breaking change?
Please see our docs on breaking changes to help!