Skip to content

Commit 6a9b778

Browse files
fix: improve conflict detection by checking for partial text or X icon
- Look for 'Can't automatic' partial text to handle truncated responses - Also check for 'octicon octicon-x' which is the conflict indicator icon - This handles cases where the exact text format varies
1 parent 3811f62 commit 6a9b778

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/handle_potential_conflicts.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,8 @@ def main():
155155

156156
if "These branches can be automatically merged." in pre_mergeable.text:
157157
good.append(conflict_pr_num)
158-
elif "Can't automatically merge" in pre_mergeable.text:
158+
elif "Can't automatic" in pre_mergeable.text or "octicon octicon-x" in pre_mergeable.text:
159+
# Check for partial text or the X icon which indicates conflicts
159160
bad.append(conflict_pr_num)
160161
conflict_details.append({
161162
'number': conflict_pr_num,

0 commit comments

Comments
 (0)