Address @stevehipwell review: code idioms, lint, docs#4
Merged
sprioriello merged 3 commits intoJun 24, 2026
Conversation
Per @stevehipwell review on integrations#3284: - Remove the '**Note:**' prefix from the ~> callout (Registry callout syntax) - Add import {} block examples (import-by-string-id.tf) alongside the terraform import command, for both resources
Per @stevehipwell review on integrations#3284, across both resources' CRUD: - meta param: func(... m any) + meta, _ := m.(*Owner); client := meta.v3client - comma-ok type assertions on d.Get for required fields - single-line tflog calls - errors.AsType[*github.ErrorResponse] instead of errors.As + var decl
…n; satisfy linters - Drop the generic util_ filename prefix (go.instructions.md: avoid util/common/base). Functions remain shared between the org and enterprise resources (the enterprise config is the org config minus delegated bypass) and keep their table-driven unit tests, so they are not duplicated into each resource file. - golangci-lint --fix: godot (comment periods), modernize (Ptr(x) -> new(x)), gofmt.
sprioriello
approved these changes
Jun 24, 2026
6690cc5
into
sprioriello:feat/organization-security-configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses the review comments from @stevehipwell on integrations#3284 (follow-up to the now-merged #3).
Review comments addressed
**Note:**prefix from the~>callouts (Registry callout syntax), both templates.import {}block examples (import-by-string-id.tf) alongside theterraform importcommand, both resources.metapattern —func(..., m any)+meta, _ := m.(*Owner)+client := meta.v3client, across all CRUD in both resources.d.Getfor required fields.tflog— collapsed to single-line calls.errors.AsType— replacederrors.As+vardeclaration witherrors.AsType[*github.ErrorResponse].util_filename (the two structural comments)Renamed
util_security_configuration.go→security_configuration.goto drop the genericutil_prefix (pergo.instructions.md). I keptexpandCodeSecurityConfigurationCommon/setCodeSecurityConfigurationStateshared rather than colocating/duplicating them into each resource file: the enterprise config is the org config minus delegated bypass, so duplicating would copy ~200 lines across both resources and duplicate the table-driven unit tests added in earlier review. Happy to fully inline them into each resource file instead if you'd prefer — just say the word.Data sources
Re your question about matching data sources: agree those make sense as a separate follow-up PR/issue rather than expanding this one.
Verification
go build,go vet,golangci-lint(0 issues),gofmt, andtfplugindocs validateall clean. Full org acceptance suite 6/6 against a real GHAS org; no leftover resources. Enterprise CRUD assertions mirror the org tests and compile, but skip without a live enterprise.