Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/bot-detection.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions pkg/workflow/claude_tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -389,9 +389,7 @@ func (e *ClaudeEngine) computeAllowedClaudeToolsString(tools map[string]any, saf
// Sort the allowed tools alphabetically for consistent output
sort.Strings(allowedTools)

if log.Enabled() {
claudeToolsLog.Printf("Generated allowed tools string with %d tools", len(allowedTools))
}
claudeToolsLog.Printf("Generated allowed tools string with %d tools", len(allowedTools))

return strings.Join(allowedTools, ",")
}
Expand Down
4 changes: 1 addition & 3 deletions pkg/workflow/compiler.go
Original file line number Diff line number Diff line change
Expand Up @@ -517,9 +517,7 @@ func (c *Compiler) CompileWorkflowData(workflowData *WorkflowData, markdownPath
// Track compilation time for performance monitoring
startTime := time.Now()
defer func() {
if log.Enabled() {
log.Printf("Compilation completed in %v", time.Since(startTime))
}
log.Printf("Compilation completed in %v", time.Since(startTime))
}()

// Reset the step order tracker for this compilation
Expand Down
4 changes: 1 addition & 3 deletions pkg/workflow/concurrency_validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,7 @@ func validateExpressionSyntax(group string) error {
expressionPattern := regexp.MustCompile(`\$\{\{([^}]*)\}\}`)
matches := expressionPattern.FindAllStringSubmatch(group, -1)

if log.Enabled() {
concurrencyValidationLog.Printf("Found %d expression(s) to validate", len(matches))
}
concurrencyValidationLog.Printf("Found %d expression(s) to validate", len(matches))

for _, match := range matches {
if len(match) < 2 {
Expand Down
8 changes: 2 additions & 6 deletions pkg/workflow/expression_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,7 @@ func BuildOr(left ConditionNode, right ConditionNode) ConditionNode {

// BuildAnd creates an AND node combining two conditions
func BuildAnd(left ConditionNode, right ConditionNode) ConditionNode {
if log.Enabled() {
expressionBuilderLog.Print("Building AND condition node")
}
expressionBuilderLog.Print("Building AND condition node")
return &AndNode{Left: left, Right: right}
}

Expand All @@ -84,9 +82,7 @@ func BuildReactionCondition() ConditionNode {
}
terms = append(terms, pullRequestCondition)

if log.Enabled() {
expressionBuilderLog.Printf("Created disjunction with %d event type terms", len(terms))
}
expressionBuilderLog.Printf("Created disjunction with %d event type terms", len(terms))

// Use DisjunctionNode to avoid deep nesting
return &DisjunctionNode{Terms: terms}
Expand Down
8 changes: 2 additions & 6 deletions pkg/workflow/markdown_security_scanner.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,7 @@ func ScanMarkdownSecurity(content string) []SecurityFinding {

// Strip frontmatter and get the line offset for correct line number reporting
markdownBody, lineOffset := stripFrontmatter(content)
if log.Enabled() {
markdownSecurityLog.Printf("Stripped frontmatter: %d line(s) removed, scanning %d bytes of markdown", lineOffset, len(markdownBody))
}
markdownSecurityLog.Printf("Stripped frontmatter: %d line(s) removed, scanning %d bytes of markdown", lineOffset, len(markdownBody))

var findings []SecurityFinding

Expand Down Expand Up @@ -197,9 +195,7 @@ func scanUnicodeAbuse(content string) []SecurityFinding {
var findings []SecurityFinding
lines := strings.Split(content, "\n")

if log.Enabled() {
markdownSecurityLog.Printf("Scanning %d line(s) for unicode abuse", len(lines))
}
markdownSecurityLog.Printf("Scanning %d line(s) for unicode abuse", len(lines))

for lineNum, line := range lines {
lineNo := lineNum + 1
Expand Down
4 changes: 1 addition & 3 deletions pkg/workflow/redact_secrets.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ func CollectSecretReferences(yamlContent string) []string {
// Sort for consistent output
SortStrings(secrets)

if log.Enabled() {
secretMaskingLog.Printf("Found %d unique secret reference(s) in workflow", len(secrets))
}
secretMaskingLog.Printf("Found %d unique secret reference(s) in workflow", len(secrets))

return secrets
}
Expand Down
4 changes: 1 addition & 3 deletions pkg/workflow/safe_outputs_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ func (c *Compiler) extractSafeOutputsConfig(frontmatter map[string]any) *SafeOut

if output, exists := frontmatter["safe-outputs"]; exists {
if outputMap, ok := output.(map[string]any); ok {
if log.Enabled() {
safeOutputsConfigLog.Printf("Processing safe-outputs configuration with %d top-level keys", len(outputMap))
}
safeOutputsConfigLog.Printf("Processing safe-outputs configuration with %d top-level keys", len(outputMap))
config = &SafeOutputsConfig{}

// Handle create-issue
Expand Down
Loading