Skip to content

Standardize Static Analysis Workflow Across Repositories#2

Merged
eapache-opslevel merged 1 commit intomainfrom
tidra-standardize_static_analysis_workflow_across_repositories-6f5ed524
Apr 21, 2026
Merged

Standardize Static Analysis Workflow Across Repositories#2
eapache-opslevel merged 1 commit intomainfrom
tidra-standardize_static_analysis_workflow_across_repositories-6f5ed524

Conversation

@eapache-opslevel
Copy link
Copy Markdown
Owner

Summary

Implemented a comprehensive automation system for standardizing static analysis workflows across organization repositories. The solution includes Python scripts that automatically create and manage .github/workflows/static-analysis.yaml files using a shared workflow template.

Key Implementation

Created a main script that detects each repository's default branch (main, master, develop, etc.) and generates a standardized workflow file that references the shared OpsLevel static analysis template. The implementation intelligently compares existing workflow files against the standard template and skips repositories where files already match, ensuring idempotent behavior. Added comprehensive YAML validation to prevent syntax errors before file creation.

Additional Components

Developed a batch processing script for handling multiple repositories with support for parallel execution, improving efficiency for large-scale operations. Created comprehensive test suites including unit tests and integration tests that verify branch detection, file creation, idempotency, and YAML validation. Included detailed documentation with quick-start guides, usage examples, and troubleshooting information.

Features Delivered

  • Automatic default branch detection from git configuration
  • Repository-agnostic implementation that works with any branch naming convention
  • Smart file comparison to avoid unnecessary updates
  • Detailed tracking logs documenting all operations
  • Batch processing capabilities with parallel execution support
  • Complete test coverage with both unit and integration tests
  • Comprehensive documentation and usage examples

@eapache-opslevel eapache-opslevel merged commit 2dd052d into main Apr 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant