Skip to content

Commit a620ff9

Browse files
committed
f
1 parent eef509e commit a620ff9

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

.github/workflows/auto_merge_approved_prs.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,9 @@ jobs:
120120
echo "Authorized user: $authorized_user"
121121
echo "Looking for PRs with exact comment 'merge' from $authorized_user..."
122122
123-
# Get all open PRs
124-
prs=$(gh_with_retry pr list --state open --json number,title,url,author --repo "$GITHUB_REPOSITORY")
123+
# Get all open PRs, paginating through the full result set instead of
124+
# relying on `gh pr list`'s default page size.
125+
prs=$(gh_with_retry api --paginate "repos/$GITHUB_REPOSITORY/pulls?state=open&per_page=100" | jq -s 'add | map({number, title, url: .html_url, author: {login: .user.login}})')
125126
126127
if [ "$prs" = "[]" ]; then
127128
echo "No open PRs found."

0 commit comments

Comments
 (0)