- main() and high-level workflow functions at the top
- Comment formatting functions
- Overlap analysis functions
- Merge conflict testing functions
- Diff parsing functions
- GitHub API functions
- Utility functions
- Data classes and constants at the bottom
This makes the code read top-to-bottom, from high-level logic to implementation details.
Automatically detects potential merge conflicts between open PRs:
- Triggered on PR open/push to dev or master
- Compares changed files and line ranges across open PRs
- Tests actual merge conflicts by attempting merges
- Posts a comment on the PR with:
- 🔴 Confirmed merge conflicts (with file paths and conflict sizes)
- 🟠 High risk overlaps (>20 lines overlap)
- 🟡 Medium risk overlaps
- 🟢 Low risk (file overlap only)
- Shows conflict types (content, added, deleted, etc.)
- Includes last-updated timestamps for each PR
This helps contributors coordinate and resolve conflicts proactively.