@@ -633,29 +633,31 @@ func (c *Compiler) extractAllowBotAuthoredTriggerComment(frontmatter map[string]
633633 return false
634634}
635635
636- // mergeStringSlicesDedup merges two string slices with deduplication (preserving order of first occurrence).
637- // Logs the merged result under the given logLabel when the result is non-empty.
638- func mergeStringSlicesDedup (top , imported []string , logLabel string ) []string {
639- result := sliceutil .Deduplicate (append (top , imported ... ))
636+ // mergeSkipRoles merges top-level skip-roles with imported skip-roles (union)
637+ func (c * Compiler ) mergeSkipRoles (topSkipRoles []string , importedSkipRoles []string ) []string {
638+ result := sliceutil .MergeUnique (topSkipRoles , importedSkipRoles ... )
640639 if len (result ) > 0 {
641- roleLog .Printf ("Merged %s: %v (top=%d, imported=%d, total=%d)" , logLabel , result , len (top ), len (imported ), len (result ))
640+ roleLog .Printf ("Merged %s: %v (top=%d, imported=%d, total=%d)" , "skip-roles" , result , len (topSkipRoles ), len (importedSkipRoles ), len (result ))
642641 }
643642 return result
644643}
645644
646- // mergeSkipRoles merges top-level skip-roles with imported skip-roles (union)
647- func (c * Compiler ) mergeSkipRoles (topSkipRoles []string , importedSkipRoles []string ) []string {
648- return mergeStringSlicesDedup (topSkipRoles , importedSkipRoles , "skip-roles" )
649- }
650-
651645// mergeSkipBots merges top-level skip-bots with imported skip-bots (union)
652646func (c * Compiler ) mergeSkipBots (topSkipBots []string , importedSkipBots []string ) []string {
653- return mergeStringSlicesDedup (topSkipBots , importedSkipBots , "skip-bots" )
647+ result := sliceutil .MergeUnique (topSkipBots , importedSkipBots ... )
648+ if len (result ) > 0 {
649+ roleLog .Printf ("Merged %s: %v (top=%d, imported=%d, total=%d)" , "skip-bots" , result , len (topSkipBots ), len (importedSkipBots ), len (result ))
650+ }
651+ return result
654652}
655653
656654// mergeBots merges top-level bots with imported bots (union)
657655func (c * Compiler ) mergeBots (topBots []string , importedBots []string ) []string {
658- return mergeStringSlicesDedup (topBots , importedBots , "bots" )
656+ result := sliceutil .MergeUnique (topBots , importedBots ... )
657+ if len (result ) > 0 {
658+ roleLog .Printf ("Merged %s: %v (top=%d, imported=%d, total=%d)" , "bots" , result , len (topBots ), len (importedBots ), len (result ))
659+ }
660+ return result
659661}
660662
661663// extractActivationGitHubToken extracts the 'github-token' field from the 'on:' section of frontmatter.
0 commit comments