fix: bug: dispatcher PR lookup fails — --diff-filter=A misses merge commits (#129) #130

Merged
dev-qwen merged 2 commits from fix/issue-129 into main 2026-04-01 20:32:36 +00:00
Showing only changes of commit 978dd88347 - Show all commits

View file

@ -120,8 +120,9 @@ get_pr_for_file() {
# Step 2: find the merge commit that contains it via ancestry path # Step 2: find the merge commit that contains it via ancestry path
local merge_line local merge_line
# Use --reverse to get the oldest (direct PR merge) first, not the newest
merge_line=$(git -C "$OPS_REPO_ROOT" log --merges --ancestry-path \ merge_line=$(git -C "$OPS_REPO_ROOT" log --merges --ancestry-path \
"${add_commit}..HEAD" --oneline 2>/dev/null | head -1) --reverse "${add_commit}..HEAD" --oneline 2>/dev/null | head -1)
if [ -z "$merge_line" ]; then if [ -z "$merge_line" ]; then
return 1 return 1