[action] Fix auto merge workflow commit message. (#15450)
Why I did it Refine submodule update commit message. Work item tracking Microsoft ADO (number only): 24253804
This commit is contained in:
parent
08affc9f00
commit
bee87909e7
8
.github/workflows/automerge_scan.yml
vendored
8
.github/workflows/automerge_scan.yml
vendored
@ -26,6 +26,8 @@ jobs:
|
||||
for ((i=0;i<$count;i++))
|
||||
do
|
||||
url=$(cat prs.log | jq -r ".[$i].url")
|
||||
body=$(cat prs.log | jq -r ".[$i].body")
|
||||
title=$(cat prs.log | jq -r ".[$i].title")
|
||||
created_at=$(cat prs.log | jq -r ".[$i].createdAt")
|
||||
echo PR: $(($i+1))/$count, URL: $url, createdAt: $created_at, now: $(date -u +"%FT%TZ")
|
||||
[[ "$url" == "" ]] && continue
|
||||
@ -68,6 +70,10 @@ jobs:
|
||||
done
|
||||
# merge the PR
|
||||
echo ========Merging PR========
|
||||
gh pr merge --rebase --admin -R sonic-net/sonic-buildimage $url || true
|
||||
if echo $title | grep "^\[submodule\]";then
|
||||
gh pr merge --squash --admin -R sonic-net/sonic-buildimage $url -b "$body" || true
|
||||
else
|
||||
gh pr merge --rebase --admin -R sonic-net/sonic-buildimage $url || true
|
||||
fi
|
||||
echo ========Finished PR========
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user