Skip to content

Commit 56bf3b8

Browse files
ci: ignore failed PR lookups when bumping ocv
1 parent 74cb66c commit 56bf3b8

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

.github/workflows/sync-upstream.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,10 @@ jobs:
5454
git fetch origin ocv:refs/remotes/origin/ocv
5555
scan_ref=$(git rev-parse --verify --quiet origin/ocv >/dev/null && printf origin/ocv || printf HEAD)
5656
git log --first-parent --reverse --format='%H' "$previous..$scan_ref" | while read -r sha; do
57-
pull_requests=$(gh api "repos/${{ github.repository }}/commits/$sha/pulls" -q '.[] | select(.base.ref == "ocv") | "#\(.number) \(.title)"' 2>/dev/null || true)
58-
if [ -n "$pull_requests" ]; then
59-
printf '%s\n' "$pull_requests"
57+
if pull_requests=$(gh api "repos/${{ github.repository }}/commits/$sha/pulls" -q '.[] | select(.base.ref == "ocv") | "#\(.number) \(.title)"' 2>/dev/null); then
58+
if [ -n "$pull_requests" ]; then
59+
printf '%s\n' "$pull_requests"
60+
fi
6061
fi
6162
done | awk '!seen[$1]++' > "$prs"
6263

0 commit comments

Comments
 (0)