Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit a19bede

Browse files
authored
Add scripts/find_git_conflicts.sh (#12343)
1 parent 52602ea commit a19bede

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

‎scripts/find_git_conflicts.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /