This repository contains tools to automate the addition of standardized static analysis workflows to organization repositories.
# Install dependencies
pip install -r requirements.txt
# Add workflow to current repository
python3 add-static-analysis-workflow.py
# Or process multiple repositories
python3 batch-add-workflows.py --repo-file repos.txt- ✅ Automatically detects repository default branch
- ✅ Creates standardized
.github/workflows/static-analysis.yamlfiles - ✅ Skips repositories that already have matching workflows
- ✅ Validates YAML syntax
- ✅ Tracks all operations in logs
- ✅ Supports batch processing of multiple repositories
- ✅ Parallel processing for large-scale operations
- Quick Start Guide - Get started in 5 minutes
- Full Documentation - Complete reference guide
- Usage Examples - Common usage scenarios
add-static-analysis-workflow.py- Add workflow to a single repositorybatch-add-workflows.py- Process multiple repositoriestest_workflow_implementation.py- Test suiterequirements.txt- Python dependencies
Run the test suite to verify everything works:
python3 test_workflow_implementation.pyThe automation creates a workflow file that references the shared static analysis workflow:
name: Static Analysis
on:
push:
branches:
- main # Automatically detected
pull_request:
branches:
- main # Automatically detected
jobs:
static-analysis:
uses: opslevel/.github/.github/workflows/static-analysis.yaml@main