Add --log-level global flag with per-org info success messages#47
Merged
Merged
Conversation
Agent-Logs-Url: https://github.com/CallMeGreg/gh-security-config/sessions/1892a9d2-3d8b-41c7-8d5a-effca9f37a2e Co-authored-by: CallMeGreg <110078080+CallMeGreg@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
CallMeGreg
April 23, 2026 15:09
View session
CallMeGreg
approved these changes
Apr 24, 2026
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.
Summary
Adds a global, optional
--log-levelpersistent flag to the extension and wires it into the organization processing output. When the level isinfo, a success message is printed for each organization that is processed successfully.This is a non-breaking, patch-level change. The flag is optional and defaults to
warning, which preserves the existing output exactly.Changes
cmd/root.go: register the--log-levelpersistent flag (defaultwarning, valuesinfo/warning/error) and parse it inPersistentPreRunE.internal/ui/log.go(new): log-level state (LogLevelInfo/LogLevelWarning/LogLevelError),ParseLogLevel, and a gatedLogOrgSuccesshelper that usespterm.Successonly when info logging is enabled. State is guarded by async.RWMutexso it is safe to read from concurrent workers.internal/processors/sequential.go&internal/processors/concurrent.go: on a successful organization result, callui.LogOrgSuccess(org)so users running with--log-level infoseeSuccessfully processed organization '<name>'for each org.internal/ui/log_test.go(new): table-driven tests forParseLogLevelandInfoEnabled.README.md: document the new flag under the "Other Flags" section.Verification
go vet ./...passes.go build ./...passes.go test ./...passes.gh security-config --helpshows the new flag with the correct default.Release Type