Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pagination handling for find-asset action #767

Merged

Conversation

brayanhenao
Copy link
Member

@brayanhenao brayanhenao commented May 25, 2023

Summary

The action actions/release/find-asset/entrypoint retrieves all the releases with the GitHub API but it does not take into account cases in which pagination is activated (number of releases greater than 100) and therefore generates errors when obtaining them.

For the specific case of Jammy Full Stack, there are 101 releases in total, so the result of the command is something like this:

[
  {"tag": "v0.0.2"}
  {"tag": "v0.0.3"}
  {"tag": "v0.0.4"}
  .
  .
  .
  {"tag": "v0.0.101"}
]
[
  {"tag": "v0.0.1"}
]

Note that the results are 2 sets of JSON arrays. With the proposed change, It will merge the JSON arrays from the GitHub API response using jq into a single JSON.

Fix paketo-buildpacks/jammy-full-stack#14

Checklist

  • I have viewed, signed, and submitted the Contributor License Agreement.
  • I have linked issue(s) that this PR should close using keywords or the Github UI (See docs)
  • I have added an integration test, if necessary.
  • I have reviewed the styleguide for guidance on my code quality.
  • I'm happy with the commit history on this PR (I have rebased/squashed as needed).

@brayanhenao brayanhenao requested a review from a team as a code owner May 25, 2023 19:20
@brayanhenao brayanhenao force-pushed the add-pagination-logic-assets branch from 52a5b3e to 46ff0d4 Compare May 25, 2023 19:23
@brayanhenao brayanhenao force-pushed the add-pagination-logic-assets branch from 46ff0d4 to 7b76ec8 Compare May 25, 2023 19:31
Copy link
Member

@robdimsdale robdimsdale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect - thank you @brayanhenao !

@robdimsdale robdimsdale merged commit 1fba1b2 into paketo-buildpacks:main May 25, 2023
@brayanhenao brayanhenao deleted the add-pagination-logic-assets branch May 25, 2023 19:42
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.

Failure: Create Release workflow
2 participants