Skip to content

Commit c09bafa

Browse files
author
GitHub Copilot
committed
update auto-update PR wf
1 parent d5ebe12 commit c09bafa

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

.github/workflows/auto-update-pr-branches.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,14 @@ jobs:
3838
# Jeeves from re-approving and re-enabling auto-merge on that PR.
3939
merge_state=$(gh pr view "$pr" --repo "${{ github.repository }}" \
4040
--json mergeStateStatus --jq '.mergeStateStatus' 2>/dev/null || echo "ERROR")
41+
4142
if [ "$merge_state" = "BEHIND" ]; then
4243
echo "PR #$pr is behind main, triggering Dependabot rebase"
4344
gh pr comment --repo "${{ github.repository }}" "$pr" --body "@dependabot rebase" || true
45+
else
46+
if [ "$merge_state" = "UNKNOWN" ]; then
47+
echo "PR #$pr state UNKNOWN, triggering Dependabot rebase anyway to be safe"
48+
gh pr comment --repo "${{ github.repository }}" "$pr" --body "@dependabot rebase" || true
4449
else
4550
echo "PR #$pr merge state is '$merge_state', no update needed"
4651
fi

0 commit comments

Comments
 (0)