Skip to content

Fix pagination to fetch all release assets #140

Merged
taylorsilva merged 1 commit intoconcourse:masterfrom
IvanChalukov:issue-139
Jul 12, 2025
Merged

Fix pagination to fetch all release assets #140
taylorsilva merged 1 commit intoconcourse:masterfrom
IvanChalukov:issue-139

Conversation

@IvanChalukov
Copy link
Copy Markdown
Contributor

@IvanChalukov IvanChalukov commented Jul 11, 2025

Closes: #139

Fix pagination to fetch all release assets and add coverage tests.

Related:
#133
#134

Notes to reviewer

Eliminates the premature break to correctly iterate over all pages of assets using res.NextPage,
resolving the previous limitation where only the first 100 assets were retrieved.

I've tested it with custom resource based on github-release-resource and following pipeline:

resource_types:
- name: custom-resource
  type: registry-image
  source:
    repository: ichalukov/custom-resource
    tag: latest

resources:
- name: openjdk-release
  type: custom-resource
  source:
    owner: bell-sw
    repository: Liberica
    access_token: ((github_token))
    semver_constraint: "~23"

jobs:
  - name: check-openjdk-release
    plan:
      - get: openjdk-release
        params:
          globs:
            - "bellsoft-jre*-linux-amd64.tar.gz"
      - task: list-assets
        config:
          platform: linux
          image_resource:
            type: registry-image
            source:
              repository: busybox
          inputs:
            - name: openjdk-release
          run:
            path: sh
            args:
              - -c
              - |
                echo "Listing contents of openjdk-release directory:"
                ls -al openjdk-release || echo "(no files downloaded)"

Signed-off-by: IvanChalukov <ichalukov@gmail.com>
@IvanChalukov IvanChalukov requested a review from a team as a code owner July 11, 2025 20:33
@taylorsilva taylorsilva merged commit 33fddb3 into concourse:master Jul 12, 2025
2 checks passed
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.

pagination on github assets lists only first 100 results

2 participants