Skip to content

[log] Add debug logging to utility and validation functions#12196

Merged
pelikhan merged 1 commit intomainfrom
main-765c7ec476e99a00
Jan 28, 2026
Merged

[log] Add debug logging to utility and validation functions#12196
pelikhan merged 1 commit intomainfrom
main-765c7ec476e99a00

Conversation

@github-actions
Copy link
Contributor

Summary

Enhanced 5 Go files with debug logging to improve troubleshooting and development:

  1. pkg/gitutil/gitutil.go - Added logging for authentication error detection
  2. pkg/repoutil/repoutil.go - Added logging for GitHub URL parsing and repository slug splitting
  3. pkg/cli/validators.go - Added logging for workflow name and intent validation
  4. pkg/workflow/github_tool_to_toolset.go - Added logging for GitHub tool validation against toolsets
  5. pkg/workflow/prompts.go - Added logging for comment-related trigger detection and Playwright tool checks

Changes Made

Each file received:

  • Logger declaration using the project's logger package
  • Meaningful debug logging at key decision points
  • Function entry logging with parameters
  • Success/failure outcome logging

All logging follows the project guidelines from AGENTS.md:

  • Used pkg:filename naming convention
  • No side effects in logger arguments
  • Focused on helpful debugging information
  • Log levels appropriate for debug tracing

Validation

  • ✅ Build completed successfully (make build)
  • ✅ Unit tests pass for affected packages
  • ✅ Compile command works correctly
  • ✅ No breaking changes to functionality

Notes

These logging additions will help developers debug issues related to:

  • GitHub URL parsing and repository identification
  • Workflow name and intent validation errors
  • Authentication error detection
  • GitHub tool configuration validation
  • Workflow trigger detection logic

Debug logs can be viewed by setting DEBUG=* environment variable when running gh-aw commands.

🤖 Generated with [Claude Code]((redacted)

AI generated by Go Logger Enhancement

Enhanced 5 Go files with debug logging to improve troubleshooting:
- pkg/gitutil/gitutil.go: Added logging for auth error detection
- pkg/repoutil/repoutil.go: Added logging for URL parsing
- pkg/cli/validators.go: Added logging for validation checks
- pkg/workflow/github_tool_to_toolset.go: Added logging for tool validation
- pkg/workflow/prompts.go: Added logging for trigger detection

All logging follows project guidelines with no side effects.
Build and tests validated successfully.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@github-actions github-actions bot added automation enhancement New feature or request labels Jan 28, 2026
@pelikhan
Copy link
Contributor

@copilot format, lint

Copy link
Contributor

Copilot AI commented Jan 28, 2026

@pelikhan I've opened a new pull request, #12197, to work on those changes. Once the pull request is ready, I'll request review from you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants