mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-02-14 00:35:02 -05:00
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.
38 lines
890 B
YAML
38 lines
890 B
YAML
name: PR Overlap Detection
|
|
|
|
on:
|
|
pull_request:
|
|
types: [opened, synchronize, reopened]
|
|
branches:
|
|
- dev
|
|
- master
|
|
|
|
permissions:
|
|
contents: read
|
|
pull-requests: write
|
|
|
|
jobs:
|
|
check-overlaps:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0 # Need full history for merge testing
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.11'
|
|
|
|
- name: Configure git
|
|
run: |
|
|
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
git config user.name "github-actions[bot]"
|
|
|
|
- name: Run overlap detection
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
python .github/scripts/detect_overlaps.py ${{ github.event.pull_request.number }}
|