1 parent 52602ea commit a19bedeCopy full SHA for a19bede
1 file changed
scripts/find_git_conflicts.sh
@@ -0,0 +1,16 @@
1
+#!/bin/bash
2
+
3
+# Replace with your repository (format: owner/repo)
4
+REPO="TheAlgorithms/Python"
5
6
+# Fetch open pull requests with conflicts into a variable
7
+echo "Checking for pull requests with conflicts in $REPO..."
8
9
+prs=$(gh pr list --repo "$REPO" --state open --json number,title,mergeable --jq '.[] | select(.mergeable == "CONFLICTING") | {number, title}' --limit 500)
10
11
+# Process each conflicting PR
12
+echo "$prs" | jq -c '.[]' | while read -r pr; do
13
+ PR_NUMBER=$(echo "$pr" | jq -r '.number')
14
+ PR_TITLE=$(echo "$pr" | jq -r '.title')
15
+ echo "PR #$PR_NUMBER - $PR_TITLE has conflicts."
16
+done
0 commit comments