Skip to content

Fix build pagination iteration parameters#34

Merged
rconner46 merged 1 commit intomasterfrom
auto-build-helper-fixes
Jan 15, 2025
Merged

Fix build pagination iteration parameters#34
rconner46 merged 1 commit intomasterfrom
auto-build-helper-fixes

Conversation

@rconner46
Copy link
Contributor

What changed?

The AutoBuilderHelper handles communication with PublicApi for autodetecting the latest version of an app. To handle this, we need to handle the pagination of the public API responses to ensure that we get the latest build containing an attachment.

Public API Pagination is 1 index, as opposed to 0 indexed, so we needed to extend out for loop to include the "totalPages" index, which would be the last page.

Additionally, we were not passing a field into the sort parameter, which caused us to get an unsorted response. This shouldn't affect the results, but we would rather receive the newest builds in earlier pages, in case we want to make this more efficient in the future.

I also added more unit tests to test this functionality to ensure that it does not break in future versions

@rconner46 rconner46 merged commit 518bade into master Jan 15, 2025
1 check passed
@rconner46 rconner46 deleted the auto-build-helper-fixes branch January 15, 2025 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments