Skip to content

Commit

Permalink
Merge pull request #18 from direct-actions/dev
Browse files Browse the repository at this point in the history
update per_page
  • Loading branch information
robzr authored May 11, 2024
2 parents 1829028 + b46625b commit 03bf8bd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,6 @@ different repo, the default token will need to be overridden.
repository: other-org/other-repository
token: ${{ steps.get-token.outputs.token }}
```

## TODO
- add pagination iteration / merging routing
6 changes: 3 additions & 3 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ runs:
PULL_REQUEST=${PULL_REQUEST:-${{ github.event.number }}}
if [ -z "$PULL_REQUEST" ] ; then
API_OUTPUT=$(mktemp)
gh_api 'get-pr-associated-with-commit' GET "/repos/${REPOSITORY}/commits/${SHA}/pulls" '' "$API_OUTPUT"
gh_api 'get-pr-associated-with-commit' GET "/repos/${REPOSITORY}/commits/${SHA}/pulls?per_page=100" '' "$API_OUTPUT"
PULL_REQUEST=$(jq first.number "$API_OUTPUT")
if [ -z "$PULL_REQUEST" ] ; then
if [ "$QUIET" = 'true' ] || [ "$ERROR_ON_MISSING_PR" != 'true' ] ; then
Expand All @@ -191,7 +191,7 @@ runs:
"explicitly via repository input."
exit 1
else
gh_api 'get-existing-comments' GET "/repos/${REPOSITORY}/issues/${PULL_REQUEST}/comments" '' "$ALL_COMMENTS"
gh_api 'get-existing-comments' GET "/repos/${REPOSITORY}/issues/${PULL_REQUEST}/comments?per_page=100" '' "$ALL_COMMENTS"
fi
if [ "$ACTIONS_RUNNER_DEBUG" == 'true' ] ; then echo ::group::all_comments.json
Expand Down Expand Up @@ -285,7 +285,7 @@ runs:
;;
get)
ID=$(jq --arg index "$x" -r '.[$index | tonumber].id' "$COMMENTS")
gh_api "$OPERATION" GET "repos/${REPOSITORY}/issues/comments/${ID}" "$COMMENT"
gh_api "$OPERATION" GET "repos/${REPOSITORY}/issues/comments/${ID}?per_page=100" "$COMMENT"
;;
minimize)
NODE_ID=$(jq --arg index "$x" -r '.[$index | tonumber].node_id' "$COMMENTS")
Expand Down

0 comments on commit 03bf8bd

Please sign in to comment.